diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2019-08-01-preview/examples/CosmosDBPrivateEndpointConnectionDelete.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2019-08-01-preview/examples/CosmosDBPrivateEndpointConnectionDelete.json new file mode 100644 index 000000000000..c00aa0f7f2a4 --- /dev/null +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2019-08-01-preview/examples/CosmosDBPrivateEndpointConnectionDelete.json @@ -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": {} + } +} \ No newline at end of file diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2019-08-01-preview/examples/CosmosDBPrivateEndpointConnectionGet.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2019-08-01-preview/examples/CosmosDBPrivateEndpointConnectionGet.json new file mode 100644 index 000000000000..efaf62a4ab7e --- /dev/null +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2019-08-01-preview/examples/CosmosDBPrivateEndpointConnectionGet.json @@ -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/00000000-1111-2222-3333-444444444444/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" + } + } + } + } + } +} \ No newline at end of file diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2019-08-01-preview/examples/CosmosDBPrivateEndpointConnectionListGet.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2019-08-01-preview/examples/CosmosDBPrivateEndpointConnectionListGet.json new file mode 100644 index 000000000000..1810c8253c06 --- /dev/null +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2019-08-01-preview/examples/CosmosDBPrivateEndpointConnectionListGet.json @@ -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" + } + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2019-08-01-preview/examples/CosmosDBPrivateEndpointConnectionUpdate.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2019-08-01-preview/examples/CosmosDBPrivateEndpointConnectionUpdate.json new file mode 100644 index 000000000000..fd532a08f8f0 --- /dev/null +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2019-08-01-preview/examples/CosmosDBPrivateEndpointConnectionUpdate.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "rg1", + "accountName": "ddb1", + "api-version": "2019-08-01-preview", + "privateEndpointConnectionName": "privateEndpointConnectionName", + "parameters": { + "properties": { + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Approved by johndoe@contoso.com" + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/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" + } + } + } + }, + "202": {} + } +} \ No newline at end of file diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2019-08-01-preview/privateEndpointConnection.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2019-08-01-preview/privateEndpointConnection.json new file mode 100644 index 000000000000..1f60ee390eec --- /dev/null +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2019-08-01-preview/privateEndpointConnection.json @@ -0,0 +1,323 @@ +{ + "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." + } + } + }, + "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." + } + } +} \ No newline at end of file diff --git a/specification/cosmos-db/resource-manager/readme.md b/specification/cosmos-db/resource-manager/readme.md index ecef4cd32fe3..5ef20766c3a0 100644 --- a/specification/cosmos-db/resource-manager/readme.md +++ b/specification/cosmos-db/resource-manager/readme.md @@ -53,6 +53,7 @@ These settings apply only when `--tag=package-2019-08-preview` is specified on t input-file: - Microsoft.DocumentDB/stable/2019-08-01/cosmos-db.json - Microsoft.DocumentDB/preview/2019-08-01-preview/privateLinkResources.json +- Microsoft.DocumentDB/preview/2019-08-01-preview/privateEndpointConnection.json ``` ### Tag: package-2015-04