{ "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": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" }, { "$ref": "#/parameters/accountNameParameter" } ], "responses": { "200": { "description": "Successfully retrieved private endpoint connections.", "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": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" }, { "$ref": "#/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": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" }, { "$ref": "#/parameters/accountNameParameter" }, { "$ref": "#/parameters/PrivateEndpointConnectionNameParameter" }, { "name": "parameters", "in": "body", "required": true, "schema": { "$ref": "#/definitions/PrivateEndpointConnection" } } ], "responses": { "200": { "description": "Successfully approved or rejected private endpoint connection.", "schema": { "$ref": "#/definitions/PrivateEndpointConnection" } }, "202": { "description": "Accepted. The private endpoint connection update will complete asynchronously." }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "#/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": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" }, { "$ref": "#/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": { "ErrorResponse": { "properties": { "code": { "description": "Error code.", "type": "string" }, "message": { "description": "Error message indicating why the operation failed.", "type": "string" } }, "description": "Error Response." }, "PrivateEndpointConnectionListResult": { "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": "../../../../../common-types/resource-management/v1/types.json#/definitions/ProxyResource" } ] }, "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." }, "groupId": { "type": "string", "description": "Group id of the private endpoint." }, "provisioningState": { "type": "string", "description": "Provisioning state of the private endpoint." } } }, "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": { "accountNameParameter": { "name": "accountName", "in": "path", "required": true, "type": "string", "x-ms-parameter-location": "method", "description": "Cosmos DB database account name.", "minLength": 3, "maxLength": 50, "pattern": "^[a-z0-9]+(-[a-z0-9]+)*" }, "PrivateEndpointConnectionNameParameter": { "name": "privateEndpointConnectionName", "in": "path", "required": true, "type": "string", "x-ms-parameter-location": "method", "description": "The name of the private endpoint connection." } } }