From c231d809976867746a6f7629f80569cf104fbeee Mon Sep 17 00:00:00 2001 From: Yang Yuan Date: Thu, 23 Apr 2020 15:57:51 -0700 Subject: [PATCH 1/3] Add private endpoint support for Cognitive Services. --- .../stable/2017-04-18/cognitiveservices.json | 516 +++++++++++++----- .../DeletePrivateEndpointConnection.json | 14 + .../GetPrivateEndpointConnection.json | 30 + .../examples/ListPrivateLinkResources.json | 30 + .../PutPrivateEndpointConnection.json | 38 ++ 5 files changed, 482 insertions(+), 146 deletions(-) create mode 100644 specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/examples/DeletePrivateEndpointConnection.json create mode 100644 specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/examples/GetPrivateEndpointConnection.json create mode 100644 specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/examples/ListPrivateLinkResources.json create mode 100644 specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/examples/PutPrivateEndpointConnection.json diff --git a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/cognitiveservices.json b/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/cognitiveservices.json index 97638fdad4bf..0aa45cad3f18 100644 --- a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/cognitiveservices.json +++ b/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/cognitiveservices.json @@ -44,21 +44,10 @@ }, "parameters": [ { - "name": "resourceGroupName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the resource group within the user's subscription." + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" }, { - "name": "accountName", - "in": "path", - "required": true, - "type": "string", - "maxLength": 64, - "minLength": 2, - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_.-]*$", - "description": "The name of Cognitive Services account." + "$ref": "#/parameters/accountNameParameter" }, { "name": "account", @@ -70,10 +59,10 @@ "description": "The parameters to provide for the created account." }, { - "$ref": "#/parameters/apiVersionParameter" + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "#/parameters/subscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" } ], "responses": { @@ -116,21 +105,10 @@ }, "parameters": [ { - "name": "resourceGroupName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the resource group within the user's subscription." + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" }, { - "name": "accountName", - "in": "path", - "required": true, - "type": "string", - "maxLength": 64, - "minLength": 2, - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_.-]*$", - "description": "The name of Cognitive Services account." + "$ref": "#/parameters/accountNameParameter" }, { "name": "account", @@ -142,10 +120,10 @@ "description": "The parameters to provide for the created account." }, { - "$ref": "#/parameters/apiVersionParameter" + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "#/parameters/subscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" } ], "responses": { @@ -182,27 +160,16 @@ }, "parameters": [ { - "name": "resourceGroupName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the resource group within the user's subscription." + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" }, { - "name": "accountName", - "in": "path", - "required": true, - "type": "string", - "maxLength": 64, - "minLength": 2, - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_.-]*$", - "description": "The name of Cognitive Services account." + "$ref": "#/parameters/accountNameParameter" }, { - "$ref": "#/parameters/apiVersionParameter" + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "#/parameters/subscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" } ], "responses": { @@ -236,27 +203,16 @@ }, "parameters": [ { - "name": "resourceGroupName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the resource group within the user's subscription." + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" }, { - "name": "accountName", - "in": "path", - "required": true, - "type": "string", - "maxLength": 64, - "minLength": 2, - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_.-]*$", - "description": "The name of Cognitive Services account." + "$ref": "#/parameters/accountNameParameter" }, { - "$ref": "#/parameters/apiVersionParameter" + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "#/parameters/subscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" } ], "responses": { @@ -289,17 +245,13 @@ }, "parameters": [ { - "name": "resourceGroupName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the resource group within the user's subscription." + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" }, { - "$ref": "#/parameters/subscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "#/parameters/apiVersionParameter" + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" } ], "responses": { @@ -335,10 +287,10 @@ }, "parameters": [ { - "$ref": "#/parameters/apiVersionParameter" + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "#/parameters/subscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" } ], "responses": { @@ -374,27 +326,16 @@ }, "parameters": [ { - "name": "resourceGroupName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the resource group within the user's subscription." + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" }, { - "name": "accountName", - "in": "path", - "required": true, - "type": "string", - "maxLength": 64, - "minLength": 2, - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_.-]*$", - "description": "The name of Cognitive Services account." + "$ref": "#/parameters/accountNameParameter" }, { - "$ref": "#/parameters/apiVersionParameter" + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "#/parameters/subscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" } ], "responses": { @@ -427,21 +368,10 @@ }, "parameters": [ { - "name": "resourceGroupName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the resource group within the user's subscription." + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" }, { - "name": "accountName", - "in": "path", - "required": true, - "type": "string", - "maxLength": 64, - "minLength": 2, - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_.-]*$", - "description": "The name of Cognitive Services account." + "$ref": "#/parameters/accountNameParameter" }, { "name": "parameters", @@ -454,10 +384,10 @@ "description": "regenerate key parameters." }, { - "$ref": "#/parameters/apiVersionParameter" + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "#/parameters/subscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" } ], "responses": { @@ -491,10 +421,10 @@ }, "parameters": [ { - "$ref": "#/parameters/apiVersionParameter" + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "#/parameters/subscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" } ], "responses": { @@ -524,27 +454,16 @@ "operationId": "Accounts_ListSkus", "parameters": [ { - "name": "resourceGroupName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the resource group within the user's subscription." + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" }, { - "name": "accountName", - "in": "path", - "required": true, - "type": "string", - "maxLength": 64, - "minLength": 2, - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_.-]*$", - "description": "The name of Cognitive Services account." + "$ref": "#/parameters/accountNameParameter" }, { - "$ref": "#/parameters/apiVersionParameter" + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "#/parameters/subscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" } ], "responses": { @@ -577,27 +496,16 @@ "operationId": "Accounts_GetUsages", "parameters": [ { - "name": "resourceGroupName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the resource group within the user's subscription." + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" }, { - "name": "accountName", - "in": "path", - "required": true, - "type": "string", - "maxLength": 64, - "minLength": 2, - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_.-]*$", - "description": "The name of Cognitive Services account." + "$ref": "#/parameters/accountNameParameter" }, { - "$ref": "#/parameters/apiVersionParameter" + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "#/parameters/subscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "#/parameters/usageFilterParameter" @@ -633,7 +541,7 @@ }, "parameters": [ { - "$ref": "#/parameters/apiVersionParameter" + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" } ], "responses": { @@ -664,10 +572,10 @@ }, "parameters": [ { - "$ref": "#/parameters/subscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "#/parameters/apiVersionParameter" + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" }, { "$ref": "#/parameters/locationParameter" @@ -707,10 +615,10 @@ }, "parameters": [ { - "$ref": "#/parameters/subscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "#/parameters/apiVersionParameter" + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" }, { "name": "parameters", @@ -732,6 +640,164 @@ } } } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}": { + "get": { + "tags": [ + "PrivateEndpointConnections" + ], + "operationId": "PrivateEndpointConnections_Get", + "description": "Gets the specified private endpoint connection associated with the Cognitive Services account.", + "x-ms-examples": { + "GetPrivateEndpointConnection": { + "$ref": "./examples/GetPrivateEndpointConnection.json" + } + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/accountNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/privateEndpointConnectionName" + } + ], + "responses": { + "200": { + "description": "OK -- Get the private endpoint connection properties successfully.", + "schema": { + "$ref": "#/definitions/PrivateEndpointConnection" + } + } + } + }, + "put": { + "tags": [ + "PrivateEndpointConnections" + ], + "operationId": "PrivateEndpointConnections_Put", + "description": "Update the state of specified private endpoint connection associated with the Cognitive Services account.", + "x-ms-examples": { + "PutPrivateEndpointConnection": { + "$ref": "./examples/PutPrivateEndpointConnection.json" + } + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/accountNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/privateEndpointConnectionName" + }, + { + "name": "properties", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/PrivateEndpointConnection" + }, + "description": "The private endpoint connection properties." + } + ], + "responses": { + "200": { + "description": "OK -- Update the private endpoint connection properties successfully.", + "schema": { + "$ref": "#/definitions/PrivateEndpointConnection" + } + } + } + }, + "delete": { + "tags": [ + "PrivateEndpointConnections" + ], + "operationId": "PrivateEndpointConnections_Delete", + "description": "Deletes the specified private endpoint connection associated with the Cognitive Services account.", + "x-ms-examples": { + "DeletePrivateEndpointConnection": { + "$ref": "./examples/DeletePrivateEndpointConnection.json" + } + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/accountNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/privateEndpointConnectionName" + } + ], + "responses": { + "200": { + "description": "OK -- Delete the private endpoint connection successfully." + }, + "204": { + "description": "No Content -- The private endpoint connection does not exist." + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/privateLinkResources": { + "get": { + "tags": [ + "PrivateLinkResources" + ], + "operationId": "PrivateLinkResources_List", + "description": "Gets the private link resources that need to be created for a Cognitive Services account.", + "x-ms-examples": { + "ListPrivateLinkResources": { + "$ref": "./examples/ListPrivateLinkResources.json" + } + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/accountNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved private link resources.", + "schema": { + "$ref": "#/definitions/PrivateLinkResourceListResult" + } + } + } + } } }, "definitions": { @@ -887,6 +953,25 @@ "$ref": "#/definitions/UserOwnedStorage" }, "description": "The storage accounts for this resource." + }, + "privateEndpointConnections": { + "type": "array", + "items": { + "$ref": "#/definitions/PrivateEndpointConnection" + }, + "description": "The private endpoint connection associated with the Cognitive Services account." + }, + "publicNetworkAccess": { + "type": "string", + "description": "Whether or not public endpoint access is allowed for this account. Value is optional but if passed in, must be 'Enabled' or 'Disabled'", + "enum": [ + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "PublicNetworkAccess", + "modelAsString": true + } }, "apiProperties": { "$ref": "#/definitions/CognitiveServicesAccountApiProperties", @@ -1551,22 +1636,153 @@ } }, "description": "The user owned storage for Cognitive Services account." + }, + "PrivateEndpointConnection": { + "properties": { + "properties": { + "$ref": "#/definitions/PrivateEndpointConnectionProperties", + "description": "Resource properties." + } + }, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/Resource" + } + ], + "description": "The Private Endpoint Connection resource." + }, + "PrivateEndpointConnectionProperties": { + "properties": { + "privateEndpoint": { + "$ref": "#/definitions/PrivateEndpoint", + "description": "The resource of private end point." + }, + "privateLinkServiceConnectionState": { + "$ref": "#/definitions/PrivateLinkServiceConnectionState", + "description": "A collection of information about the state of the connection between service consumer and provider." + }, + "groupIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The private link resource group ids." + } + }, + "required": [ + "privateLinkServiceConnectionState" + ], + "description": "Properties of the PrivateEndpointConnectProperties." + }, + "PrivateEndpoint": { + "properties": { + "id": { + "readOnly": true, + "type": "string", + "description": "The ARM identifier for Private Endpoint" + } + }, + "description": "The Private Endpoint resource." + }, + "PrivateLinkServiceConnectionState": { + "properties": { + "status": { + "$ref": "#/definitions/PrivateEndpointServiceConnectionStatus", + "description": "Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service." + }, + "description": { + "type": "string", + "description": "The reason for approval/rejection of the connection." + }, + "actionRequired": { + "type": "string", + "description": "A message indicating if changes on the service provider require any updates on the consumer." + } + }, + "description": "A collection of information about the state of the connection between service consumer and provider." + }, + "PrivateEndpointServiceConnectionStatus": { + "type": "string", + "description": "The private endpoint connection status.", + "enum": [ + "Pending", + "Approved", + "Rejected", + "Disconnected" + ], + "x-ms-enum": { + "name": "PrivateEndpointServiceConnectionStatus", + "modelAsString": true + } + }, + "PrivateLinkResourceListResult": { + "properties": { + "value": { + "type": "array", + "description": "Array of private link resources", + "items": { + "$ref": "#/definitions/PrivateLinkResource" + } + } + }, + "description": "A list of private link resources" + }, + "PrivateLinkResource": { + "properties": { + "properties": { + "$ref": "#/definitions/PrivateLinkResourceProperties", + "description": "Resource properties." + } + }, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/Resource" + } + ], + "description": "A private link resource" + }, + "PrivateLinkResourceProperties": { + "properties": { + "groupId": { + "description": "The private link resource group id.", + "type": "string", + "readOnly": true + }, + "displayName": { + "description": "The private link resource display name.", + "type": "string", + "readOnly": true + }, + "requiredMembers": { + "description": "The private link resource required member names.", + "type": "array", + "items": { + "type": "string" + }, + "readOnly": true + }, + "requiredZoneNames": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The private link resource Private link DNS zone name." + } + }, + "description": "Properties of a private link resource." } }, "parameters": { - "subscriptionIdParameter": { - "name": "subscriptionId", + "accountNameParameter": { + "name": "accountName", "in": "path", - "description": "Azure Subscription ID.", - "required": true, - "type": "string" - }, - "apiVersionParameter": { - "name": "api-version", - "in": "query", "required": true, "type": "string", - "description": "Version of the API to be used with the client request. Current version is 2017-04-18" + "maxLength": 64, + "minLength": 2, + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_.-]*$", + "description": "The name of Cognitive Services account.", + "x-ms-parameter-location": "method" }, "locationParameter": { "name": "location", @@ -1583,6 +1799,14 @@ "type": "string", "description": "An OData filter expression that describes a subset of usages to return. The supported parameter is name.value (name of the metric, can have an or of multiple names).", "x-ms-parameter-location": "method" + }, + "privateEndpointConnectionName": { + "name": "privateEndpointConnectionName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the private endpoint connection associated with the Cognitive Services Account", + "x-ms-parameter-location": "method" } } } diff --git a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/examples/DeletePrivateEndpointConnection.json b/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/examples/DeletePrivateEndpointConnection.json new file mode 100644 index 000000000000..00f982aa7123 --- /dev/null +++ b/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/examples/DeletePrivateEndpointConnection.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "res6977", + "accountName": "sto2527", + "privateEndpointConnectionName": "{privateEndpointConnectionName}", + "api-version": "2019-06-01", + "monitor": "true" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/examples/GetPrivateEndpointConnection.json b/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/examples/GetPrivateEndpointConnection.json new file mode 100644 index 000000000000..a0ac550baf61 --- /dev/null +++ b/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/examples/GetPrivateEndpointConnection.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "res6977", + "accountName": "sto2527", + "privateEndpointConnectionName": "{privateEndpointConnectionName}", + "api-version": "2019-06-01", + "monitor": "true" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.CognitiveServices/accounts/sto288/privateEndpointConnections/{privateEndpointConnectionName}", + "name": "{privateEndpointConnectionName}", + "type": "Microsoft.CognitiveServices/accounts/privateEndpointConnections", + "properties": { + "provisioningState": "Succeeded", + "privateEndpoint": { + "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Network/privateEndpoints/petest01" + }, + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Auto-Approved", + "actionRequired": "None" + } + } + } + } + } +} diff --git a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/examples/ListPrivateLinkResources.json b/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/examples/ListPrivateLinkResources.json new file mode 100644 index 000000000000..c35569afa3c2 --- /dev/null +++ b/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/examples/ListPrivateLinkResources.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "res6977", + "accountName": "sto2527", + "api-version": "2019-06-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.CognitiveServices/accounts/sto2527/privateLinkResources/account", + "name": "blob", + "type": "Microsoft.CognitiveServices/accounts/privateLinkResources", + "properties": { + "groupId": "account", + "requiredMembers": [ + "default" + ], + "requiredZoneNames": [ + "privatelink.cognitiveservices.azure.com" + ] + } + } + ] + } + } + } +} diff --git a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/examples/PutPrivateEndpointConnection.json b/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/examples/PutPrivateEndpointConnection.json new file mode 100644 index 000000000000..8e28ba15e0b9 --- /dev/null +++ b/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/examples/PutPrivateEndpointConnection.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "res7687", + "accountName": "sto9699", + "privateEndpointConnectionName": "{privateEndpointConnectionName}", + "api-version": "2019-06-01", + "monitor": "true", + "properties": { + "properties": { + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Auto-Approved" + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.CognitiveServices/accounts/sto288/privateEndpointConnections/{privateEndpointConnectionName}", + "name": "{privateEndpointConnectionName}", + "type": "Microsoft.CognitiveServices/accounts/privateEndpointConnections", + "properties": { + "provisioningState": "Succeeded", + "privateEndpoint": { + "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Network/privateEndpoints/petest01" + }, + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Auto-Approved", + "actionRequired": "None" + } + } + } + } + } +} From 9e20ad528a1bee81682e9273004db5fa33e18034 Mon Sep 17 00:00:00 2001 From: Yang Yuan Date: Tue, 5 May 2020 17:49:38 -0700 Subject: [PATCH 2/3] Address comments --- .../stable/2017-04-18/cognitiveservices.json | 2 +- .../2017-04-18/examples/GetPrivateEndpointConnection.json | 1 - .../2017-04-18/examples/PutPrivateEndpointConnection.json | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/cognitiveservices.json b/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/cognitiveservices.json index 0aa45cad3f18..e861cc26109d 100644 --- a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/cognitiveservices.json +++ b/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/cognitiveservices.json @@ -683,7 +683,7 @@ "tags": [ "PrivateEndpointConnections" ], - "operationId": "PrivateEndpointConnections_Put", + "operationId": "PrivateEndpointConnections_CreateOrUpdate", "description": "Update the state of specified private endpoint connection associated with the Cognitive Services account.", "x-ms-examples": { "PutPrivateEndpointConnection": { diff --git a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/examples/GetPrivateEndpointConnection.json b/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/examples/GetPrivateEndpointConnection.json index a0ac550baf61..89b0fccf74d9 100644 --- a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/examples/GetPrivateEndpointConnection.json +++ b/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/examples/GetPrivateEndpointConnection.json @@ -14,7 +14,6 @@ "name": "{privateEndpointConnectionName}", "type": "Microsoft.CognitiveServices/accounts/privateEndpointConnections", "properties": { - "provisioningState": "Succeeded", "privateEndpoint": { "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Network/privateEndpoints/petest01" }, diff --git a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/examples/PutPrivateEndpointConnection.json b/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/examples/PutPrivateEndpointConnection.json index 8e28ba15e0b9..f1153309ffb0 100644 --- a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/examples/PutPrivateEndpointConnection.json +++ b/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/examples/PutPrivateEndpointConnection.json @@ -22,7 +22,6 @@ "name": "{privateEndpointConnectionName}", "type": "Microsoft.CognitiveServices/accounts/privateEndpointConnections", "properties": { - "provisioningState": "Succeeded", "privateEndpoint": { "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Network/privateEndpoints/petest01" }, From 52683b65cf6ac59ddc81ece0dccea9357b280846 Mon Sep 17 00:00:00 2001 From: Yang Yuan Date: Tue, 5 May 2020 18:01:12 -0700 Subject: [PATCH 3/3] fix prettier --- .../stable/2017-04-18/cognitiveservices.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/cognitiveservices.json b/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/cognitiveservices.json index e861cc26109d..6fd63f97971f 100644 --- a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/cognitiveservices.json +++ b/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/cognitiveservices.json @@ -763,7 +763,7 @@ } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/privateLinkResources": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/privateLinkResources": { "get": { "tags": [ "PrivateLinkResources" @@ -954,14 +954,14 @@ }, "description": "The storage accounts for this resource." }, - "privateEndpointConnections": { + "privateEndpointConnections": { "type": "array", "items": { "$ref": "#/definitions/PrivateEndpointConnection" }, "description": "The private endpoint connection associated with the Cognitive Services account." }, - "publicNetworkAccess": { + "publicNetworkAccess": { "type": "string", "description": "Whether or not public endpoint access is allowed for this account. Value is optional but if passed in, must be 'Enabled' or 'Disabled'", "enum": [