Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cosmos DB Private Link Resources Swagger #7249

Merged
merged 5 commits into from
Oct 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
raych1 marked this conversation as resolved.
Show resolved Hide resolved
},
"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 @@ -3903,6 +3903,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