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 Endpoint Connection Swagger #7563

Merged
merged 10 commits into from
Oct 29, 2019
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"parameters": {
"subscriptionId": "00000000-1111-2222-3333-444444444444",
"resourceGroupName": "rg1",
"accountName": "ddb1",
"api-version": "2019-08-01-preview",
"privateEndpointConnectionName": "privateEndpointConnectionName"
},
"responses": {
"202": {},
"204": {}
}
}
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": "2019-08-01-preview",
"privateEndpointConnectionName": "privateEndpointConnectionName"
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDb/databaseAccounts/ddb1/privateEndpointConnections/privateEndpointConnectionName",
"name": "privateEndpointConnectionName",
"type": "Microsoft.DocumentDb/databaseAccounts/privateEndpointConnections",
"properties": {
"privateEndpoint": {
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg1Network/providers/Microsoft.Network/privateEndpoints/privateEndpointName"
},
"privateLinkServiceConnectionState": {
"status": "Approved",
"description": "Auto-approved",
"actionsRequired": "None"
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"parameters": {
"subscriptionId": "00000000-1111-2222-3333-444444444444",
"resourceGroupName": "rg1",
"accountName": "ddb1",
"api-version": "2019-08-01-preview"
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDb/databaseAccounts/ddb1/privateEndpointConnections/privateEndpointConnectionName",
"name": "privateEndpointConnectionName",
"type": "Microsoft.DocumentDb/databaseAccounts/privateEndpointConnections",
"properties": {
"privateEndpoint": {
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg1Network/providers/Microsoft.Network/privateEndpoints/privateEndpointName"
},
"privateLinkServiceConnectionState": {
"status": "Approved",
"description": "Auto-approved",
"actionsRequired": "None"
}
}
},
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDb/databaseAccounts/ddb1/privateEndpointConnections/privateEndpointConnectionName2",
"name": "privateEndpointConnectionName",
"type": "Microsoft.DocumentDb/databaseAccounts/privateEndpointConnections",
"properties": {
"privateEndpoint": {
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg1Network/providers/Microsoft.Network/privateEndpoints/privateEndpointName2"
},
"privateLinkServiceConnectionState": {
"status": "Approved",
"description": "Auto-approved",
"actionsRequired": "None"
}
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"parameters": {
"subscriptionId": "00000000-1111-2222-3333-444444444444",
"resourceGroupName": "rg1",
"accountName": "ddb1",
"api-version": "2019-08-01-preview",
"privateEndpointConnectionName": "privateEndpointConnectionName"
},
"responses": {
"202": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,285 @@
{
"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}/privateEndpointConnections": {
"get": {
"tags": [
"PrivateEndpointConnections"
],
"description": "List all private endpoint connections on a Cosmos DB account.",
"operationId": "PrivateEndpointConnections_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.",
ayanMSFT marked this conversation as resolved.
Show resolved Hide resolved
"schema": {
"$ref": "#/definitions/PrivateEndpointConnectionListResult"
}
}
},
"x-ms-examples": {
"Gets private endpoint connection.": {
"$ref": "./examples/CosmosDBPrivateEndpointConnectionListGet.json"
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}": {
"get": {
"tags": [
"PrivateEndpointConnections"
],
"description": "Gets a private endpoint connection.",
"operationId": "PrivateEndpointConnections_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/PrivateEndpointConnectionNameParameter"
}
],
"responses": {
"200": {
"description": "Successfully retrieved a specified private endpoint connection.",
"schema": {
"$ref": "#/definitions/PrivateEndpointConnection"
}
}
},
"x-ms-examples": {
"Gets private endpoint connection.": {
"$ref": "./examples/CosmosDBPrivateEndpointConnectionGet.json"
}
}
},
"put": {
"tags": [
"PrivateEndpointConnections"
],
"description": "Approve or reject a private endpoint connection with a given name.",
"operationId": "PrivateEndpointConnections_CreateOrUpdate",
"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/PrivateEndpointConnectionNameParameter"
}
],
"responses": {
"202": {
"description": "Accepted. The private endpoint connection update will complete asynchronously."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "../../stable/2019-08-01/cosmos-db.json#/definitions/ErrorResponse"
}
}
},
"x-ms-long-running-operation": true,
"x-ms-examples": {
"Approve or reject a private endpoint connection with a given name.": {
"$ref": "./examples/CosmosDBPrivateEndpointConnectionUpdate.json"
}
}
},
"delete": {
"tags": [
"PrivateEndpointConnections"
],
"description": "Deletes a private endpoint connection with a given name.",
"operationId": "PrivateEndpointConnections_Delete",
"parameters": [
{
"$ref": "../../stable/2019-08-01/cosmos-db.json#/parameters/subscriptionIdParameter"
ayanMSFT marked this conversation as resolved.
Show resolved Hide resolved
},
{
"$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/PrivateEndpointConnectionNameParameter"
}
],
"responses": {
"202": {
"description": "Accepted. The private endpoint connection delete will complete asynchronously."
},
"204": {
"description": "Private endpoint connection does not exist."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-long-running-operation": true,
"x-ms-examples": {
"Deletes a private endpoint connection with a given name.": {
"$ref": "./examples/CosmosDBPrivateEndpointConnectionDelete.json"
}
}
}
}
},
"definitions": {
"PrivateEndpointConnectionListResult": {
ayanMSFT marked this conversation as resolved.
Show resolved Hide resolved
"description": "A list of private endpoint connections",
"type": "object",
"properties": {
"value": {
"type": "array",
"description": "Array of private endpoint connections",
"items": {
"$ref": "#/definitions/PrivateEndpointConnection"
}
}
}
},
"PrivateEndpointConnection": {
"description": "A private endpoint connection",
"type": "object",
"properties": {
"properties": {
"$ref": "#/definitions/PrivateEndpointConnectionProperties",
"description": "Resource properties.",
"x-ms-client-flatten": true
}
},
"allOf": [
{
"$ref": "../../stable/2019-08-01/cosmos-db.json#/definitions/ARMProxyResource"
}
]
},
"PrivateEndpointConnectionProperties": {
"description": "Properties of a private endpoint connection.",
"type": "object",
"properties": {
"privateEndpoint": {
"$ref": "#/definitions/PrivateEndpointProperty",
"description": "Private endpoint which the connection belongs to."
},
"privateLinkServiceConnectionState": {
"$ref": "#/definitions/PrivateLinkServiceConnectionStateProperty",
"description": "Connection State of the Private Endpoint Connection."
}
}
},
"PrivateEndpointProperty": {
"type": "object",
"description": "Private endpoint which the connection belongs to.",
"properties": {
"id": {
"type": "string",
"description": "Resource id of the private endpoint."
}
}
},
"PrivateLinkServiceConnectionStateProperty": {
"type": "object",
"description": "Connection State of the Private Endpoint Connection.",
"properties": {
"status": {
"type": "string",
"description": "The private link service connection status."
},
"description": {
"type": "string",
"description": "The private link service connection description."
},
"actionsRequired": {
"type": "string",
"description": "Any action that is required beyond basic workflow (approve/ reject/ disconnect)",
"readOnly": true
}
}
}
},
"parameters": {
"PrivateEndpointConnectionNameParameter": {
"name": "privateEndpointConnectionName",
"in": "path",
"required": true,
"type": "string",
"x-ms-parameter-location": "method",
"description": "The name of the private endpoint connection."
}
}
}
Loading