Skip to content

Commit

Permalink
Cosmos DB Private Link Resources Swagger (Azure#7249)
Browse files Browse the repository at this point in the history
* PrivateLinkResources swagger spec

* Added missing files

* Moved PrivateLinkResources to preview

* Removed generated
  • Loading branch information
ayanMSFT authored and raych1 committed Oct 7, 2019
1 parent d1ae45e commit e51f64f
Show file tree
Hide file tree
Showing 5 changed files with 261 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"parameters": {
"subscriptionId": "00000000-1111-2222-3333-444444444444",
"resourceGroupName": "rg1",
"accountName": "ddb1",
"api-version": "2015-04-08",
"groupName": "sql"
},
"responses": {
"200": {
"body": {
"id": "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.DocumentDb/databaseAccounts/ddb1/privateLinkResources/sql",
"name": "sql",
"type": "Microsoft.DocumentDB/databaseAccounts/privateLinkResources",
"properties": {
"groupId": "sql",
"requiredMembers": [
"ddb1",
"ddb1-westus"
]
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"parameters": {
"subscriptionId": "00000000-1111-2222-3333-444444444444",
"resourceGroupName": "rg1",
"accountName": "ddb1",
"api-version": "2015-04-08"
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.DocumentDb/databaseAccounts/ddb1/privateLinkResources/sql",
"name": "sql",
"type": "Microsoft.DocumentDB/databaseAccounts/privateLinkResources",
"properties": {
"groupId": "sql",
"requiredMembers": [
"ddb1",
"ddb1-westus"
]
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
{
"swagger": "2.0",
"info": {
"title": "Cosmos DB",
"description": "Azure Cosmos DB Database Service Resource Provider REST API",
"version": "2019-08-01-preview"
},
"host": "management.azure.com",
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"security": [
{
"azure_auth": [
"user_impersonation"
]
}
],
"securityDefinitions": {
"azure_auth": {
"type": "oauth2",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"flow": "implicit",
"description": "Azure Active Directory OAuth2 Flow",
"scopes": {
"user_impersonation": "Impersonate your user account"
}
}
},
"paths": {
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateLinkResources": {
"get": {
"tags": [
"PrivateLinkResources"
],
"description": "Gets the private link resources that need to be created for a Cosmos DB account.",
"operationId": "PrivateLinkResources_ListByDatabaseAccount",
"x-ms-pageable": {
"nextLinkName": null
},
"parameters": [
{
"$ref": "../../stable/2019-08-01/cosmos-db.json#/parameters/subscriptionIdParameter"
},
{
"$ref": "../../stable/2019-08-01/cosmos-db.json#/parameters/resourceGroupNameParameter"
},
{
"$ref": "../../stable/2019-08-01/cosmos-db.json#/parameters/apiVersionParameter"
},
{
"$ref": "../../stable/2019-08-01/cosmos-db.json#/parameters/accountNameParameter"
}
],
"responses": {
"200": {
"description": "Successfully retrieved private link resources.",
"schema": {
"$ref": "#/definitions/PrivateLinkResourceListResult"
}
}
},
"x-ms-examples": {
"Gets private endpoint connection.": {
"$ref": "./examples/CosmosDBPrivateLinkResourceListGet.json"
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateLinkResources/{groupName}": {
"get": {
"tags": [
"PrivateLinkResources"
],
"description": "Gets the private link resources that need to be created for a Cosmos DB account.",
"operationId": "PrivateLinkResources_Get",
"parameters": [
{
"$ref": "../../stable/2019-08-01/cosmos-db.json#/parameters/subscriptionIdParameter"
},
{
"$ref": "../../stable/2019-08-01/cosmos-db.json#/parameters/resourceGroupNameParameter"
},
{
"$ref": "../../stable/2019-08-01/cosmos-db.json#/parameters/apiVersionParameter"
},
{
"$ref": "../../stable/2019-08-01/cosmos-db.json#/parameters/accountNameParameter"
},
{
"$ref": "#/parameters/GroupNameParameter"
}
],
"responses": {
"200": {
"description": "Successfully retrieved a specified private link resource.",
"schema": {
"$ref": "#/definitions/PrivateLinkResource"
}
}
},
"x-ms-examples": {
"Gets private endpoint connection.": {
"$ref": "./examples/CosmosDBPrivateLinkResourceGet.json"
}
}
}
}
},
"definitions": {
"PrivateLinkResourceListResult": {
"description": "A list of private link resources",
"type": "object",
"properties": {
"value": {
"type": "array",
"description": "Array of private link resources",
"items": {
"$ref": "#/definitions/PrivateLinkResource"
}
}
}
},
"PrivateLinkResource": {
"description": "A private link resource",
"type": "object",
"properties": {
"properties": {
"$ref": "#/definitions/PrivateLinkResourceProperties",
"description": "Resource properties.",
"x-ms-client-flatten": true
}
},
"allOf": [
{
"$ref": "../../stable/2019-08-01/cosmos-db.json#/definitions/ARMProxyResource"
}
]
},
"PrivateLinkResourceProperties": {
"description": "Properties of a private link resource.",
"type": "object",
"properties": {
"groupId": {
"description": "The private link resource group id.",
"type": "string",
"readOnly": true
},
"requiredMembers": {
"description": "The private link resource required member names.",
"type": "array",
"items": {
"type": "string"
},
"readOnly": true
}
}
}
},
"parameters": {
"GroupNameParameter": {
"name": "groupName",
"in": "path",
"description": "The name of the private link resource.",
"required": true,
"x-ms-parameter-location": "method",
"type": "string"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4476,6 +4476,28 @@
},
"x-ms-azure-resource": true
},
"ARMProxyResource": {
"type": "object",
"description": "The resource model definition for a ARM proxy resource. It will have everything other than required location and tags",
"properties": {
"id": {
"readOnly": true,
"type": "string",
"description": "The unique resource identifier of the database account."
},
"name": {
"readOnly": true,
"type": "string",
"description": "The name of the database account."
},
"type": {
"readOnly": true,
"type": "string",
"description": "The type of Azure resource."
}
},
"x-ms-azure-resource": true
},
"DatabaseAccountGetResults": {
"description": "An Azure Cosmos DB database account.",
"type": "object",
Expand Down
10 changes: 10 additions & 0 deletions specification/cosmos-db/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,16 @@ input-file:
- Microsoft.DocumentDB/stable/2019-08-01/cosmos-db.json
```

### Tag: package-2019-08-preview

These settings apply only when `--tag=package-2019-08-preview` is specified on the command line.

``` yaml $(tag) == 'package-2019-08-preview'
input-file:
- Microsoft.DocumentDB/stable/2019-08-01/cosmos-db.json
- Microsoft.DocumentDB/preview/2019-08-01-preview/privateLinkResources.json
```

### Tag: package-2015-04

These settings apply only when `--tag=package-2015-04` is specified on the command line.
Expand Down

0 comments on commit e51f64f

Please sign in to comment.