From a3ccb99d7457400e4691e66ea59612a4aab49f90 Mon Sep 17 00:00:00 2001 From: guwe Date: Wed, 3 Jun 2020 05:36:44 +0000 Subject: [PATCH 1/3] spec for private endpoint connections --- .../PrivateEndpointConnectionsDelete.json | 12 + .../PrivateEndpointConnectionsGet.json | 26 ++ .../PrivateEndpointConnectionsList.json | 29 ++ .../PrivateEndpointConnectionsUpdate.json | 33 ++ .../stable/2020-06-01/managedClusters.json | 295 ++++++++++++++++++ 5 files changed, 395 insertions(+) create mode 100644 specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-06-01/examples/PrivateEndpointConnectionsDelete.json create mode 100644 specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-06-01/examples/PrivateEndpointConnectionsGet.json create mode 100644 specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-06-01/examples/PrivateEndpointConnectionsList.json create mode 100644 specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-06-01/examples/PrivateEndpointConnectionsUpdate.json diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-06-01/examples/PrivateEndpointConnectionsDelete.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-06-01/examples/PrivateEndpointConnectionsDelete.json new file mode 100644 index 000000000000..3692d359a1fd --- /dev/null +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-06-01/examples/PrivateEndpointConnectionsDelete.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "api-version": "2020-06-01", + "subscriptionId": "subid1", + "resourceGroupName": "rg1", + "resourceName": "clustername1", + "privateEndpointConnectionName": "privateendpointconnection1" + }, + "responses": { + "200": {} + } +} diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-06-01/examples/PrivateEndpointConnectionsGet.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-06-01/examples/PrivateEndpointConnectionsGet.json new file mode 100644 index 000000000000..0a18cad228f0 --- /dev/null +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-06-01/examples/PrivateEndpointConnectionsGet.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "api-version": "2020-06-01", + "subscriptionId": "subid1", + "resourceGroupName": "rg1", + "resourceName": "clustername1", + "privateEndpointConnectionName": "privateendpointconnection1" + }, + "responses": { + "200": { + "body": { + "properties": { + "privateEndpoint": { + "id": "/subscriptions/subid2/resourceGroups/rg2/providers/Microsoft.Network/privateEndpoints/pe2" + }, + "privateLinkServiceConnectionState": { + "status": "Approved" + }, + "provisioningState": "Succeeded" + }, + "name": "privateendpointconnection1", + "type": "Microsoft.Network/privateLinkServices/privateEndpointConnections" + } + } + } +} diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-06-01/examples/PrivateEndpointConnectionsList.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-06-01/examples/PrivateEndpointConnectionsList.json new file mode 100644 index 000000000000..ce63ece40250 --- /dev/null +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-06-01/examples/PrivateEndpointConnectionsList.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "api-version": "2020-06-01", + "subscriptionId": "subid1", + "resourceGroupName": "rg1", + "resourceName": "clustername1" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "privateEndpoint": { + "id": "/subscriptions/subid2/resourceGroups/rg2/providers/Microsoft.Network/privateEndpoints/pe2" + }, + "privateLinkServiceConnectionState": { + "status": "Approved" + }, + "provisioningState": "Succeeded" + }, + "name": "privateendpointconnection1", + "type": "Microsoft.Network/privateLinkServices/privateEndpointConnections" + } + ] + } + } + } +} diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-06-01/examples/PrivateEndpointConnectionsUpdate.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-06-01/examples/PrivateEndpointConnectionsUpdate.json new file mode 100644 index 000000000000..3ee7e1bf0c83 --- /dev/null +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-06-01/examples/PrivateEndpointConnectionsUpdate.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "api-version": "2020-06-01", + "subscriptionId": "subid1", + "resourceGroupName": "rg1", + "resourceName": "clustername1", + "privateEndpointConnectionName": "privateendpointconnection1", + "parameters": { + "properties": { + "privateLinkServiceConnectionState": { + "status": "Approved" + } + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "privateEndpoint": { + "id": "/subscriptions/subid2/resourceGroups/rg2/providers/Microsoft.Network/privateEndpoints/pe2" + }, + "privateLinkServiceConnectionState": { + "status": "Approved" + }, + "provisioningState": "Succeeded" + }, + "name": "privateendpointconnection1", + "type": "Microsoft.Network/privateLinkServices/privateEndpointConnections" + } + } + } +} diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-06-01/managedClusters.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-06-01/managedClusters.json index 5989b7ce9857..2c781788e090 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-06-01/managedClusters.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-06-01/managedClusters.json @@ -1015,6 +1015,202 @@ } } } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections": { + "get": { + "tags": [ + "PrivateEndpointConnections" + ], + "operationId": "PrivateEndpointConnections_List", + "summary": "Gets a list of private endpoint connections in the specified managed cluster.", + "description": "Gets a list of private endpoint connections in the specified managed cluster. The operation returns properties of each private endpoint connection.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ResourceNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/PrivateEndpointConnectionListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "List Private Endpoint Connections by Managed Cluster": { + "$ref": "./examples/PrivateEndpointConnectionsList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}": { + "get": { + "tags": [ + "PrivateEndpointConnections" + ], + "operationId": "PrivateEndpointConnections_Get", + "summary": "Gets the private endpoint connection.", + "description": "Gets the details of the private endpoint connection by managed cluster and resource group.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ResourceNameParameter" + }, + { + "name": "privateEndpointConnectionName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the private endpoint connection." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/PrivateEndpointConnection" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "Get Private Endpoint Connection": { + "$ref": "./examples/PrivateEndpointConnectionsGet.json" + } + } + }, + "put": { + "tags": [ + "PrivateEndpointConnections" + ], + "operationId": "PrivateEndpointConnections_Update", + "summary": "Updates a private endpoint connection.", + "description": "Updates a private endpoint connection in the specified managed cluster.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ResourceNameParameter" + }, + { + "name": "privateEndpointConnectionName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the private endpoint connection." + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/PrivateEndpointConnection" + }, + "description": "Parameters supplied to the Update a private endpoint connection operation." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/PrivateEndpointConnection" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "Update Private Endpoint Connection": { + "$ref": "./examples/PrivateEndpointConnectionsUpdate.json" + } + } + }, + "delete": { + "tags": [ + "PrivateEndpointConnections" + ], + "operationId": "PrivateEndpointConnections_Delete", + "summary": "Deletes a private endpoint connection.", + "description": "Deletes the private endpoint connection in the specified managed cluster.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ResourceNameParameter" + }, + { + "name": "privateEndpointConnectionName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the private endpoint connection." + } + ], + "responses": { + "200": { + "description": "OK" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Delete Private Endpoint Connection": { + "$ref": "./examples/PrivateEndpointConnectionsDelete.json" + } + } + } } }, "definitions": { @@ -2566,6 +2762,105 @@ } } } + }, + "PrivateEndpointConnectionListResult": { + "type": "object", + "description": "A list of private endpoint connections", + "properties": { + "value": { + "description": "The collection value.", + "type": "array", + "items": { + "$ref": "#/definitions/PrivateEndpointConnection" + } + } + } + }, + "PrivateEndpointConnection": { + "description": "A private endpoint connection", + "type": "object", + "properties": { + "id": { + "readOnly": true, + "type": "string", + "description": "The ID of the private endpoint connection." + }, + "name": { + "readOnly": true, + "type": "string", + "description": "The name of the private endpoint connection.", + "externalDocs": { + "url": "https://aka.ms/search-naming-rules" + } + }, + "type": { + "readOnly": true, + "type": "string", + "description": "The resource type." + }, + "properties": { + "$ref": "#/definitions/PrivateEndpointConnectionProperties", + "description": "The properties of a private endpoint connection.", + "x-ms-client-flatten": true + } + }, + "x-ms-azure-resource": true + }, + "PrivateEndpointConnectionProperties": { + "type": "object", + "description": "Properties of a private endpoint connection.", + "properties": { + "provisioningState": { + "readOnly": true, + "type": "string", + "description": "The provisioning status of the private endpoint connection." + }, + "privateEndpoint": { + "$ref": "#/definitions/PrivateEndpoint", + "description": "The resource of private endpoint." + }, + "privateLinkServiceConnectionState": { + "$ref": "#/definitions/PrivateLinkServiceConnectionState", + "description": "A collection of information about the state of the connection between service consumer and provider." + } + }, + "required": [ + "privateLinkServiceConnectionState" + ] + }, + "PrivateEndpoint": { + "type": "object", + "description": "Private endpoint which a connection belongs to.", + "properties": { + "id": { + "description": "The resource Id for private endpoint", + "type": "string" + } + } + }, + "PrivateLinkServiceConnectionState": { + "description": "The state of a private link service connection.", + "type": "object", + "properties": { + "status": { + "enum": [ + "Pending", + "Approved", + "Rejected", + "Disconnected" + ], + "type": "string", + "description": "The private link service connection status.", + "x-ms-enum": { + "name": "ConnectionStatus", + "modelAsString": true + } + }, + "description": { + "type": "string", + "description": "The private link service connection description." + } + } } }, "parameters": { From 1c2bcdeea37d2c688758e39a771ef26e514a3800 Mon Sep 17 00:00:00 2001 From: guwe Date: Tue, 9 Jun 2020 06:03:19 +0000 Subject: [PATCH 2/3] Return 204 for delete action when the resource does not exist --- .../2020-06-01/examples/PrivateEndpointConnectionsDelete.json | 3 ++- .../stable/2020-06-01/managedClusters.json | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-06-01/examples/PrivateEndpointConnectionsDelete.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-06-01/examples/PrivateEndpointConnectionsDelete.json index 3692d359a1fd..64c8e8d92e9a 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-06-01/examples/PrivateEndpointConnectionsDelete.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-06-01/examples/PrivateEndpointConnectionsDelete.json @@ -7,6 +7,7 @@ "privateEndpointConnectionName": "privateendpointconnection1" }, "responses": { - "200": {} + "200": {}, + "204": {} } } diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-06-01/managedClusters.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-06-01/managedClusters.json index 2c781788e090..6bf883f81007 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-06-01/managedClusters.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-06-01/managedClusters.json @@ -1197,6 +1197,9 @@ "200": { "description": "OK" }, + "204": { + "description": "No Content -- The private endpoint connection does not exist." + }, "default": { "description": "Error response describing why the operation failed.", "schema": { From 0fd8e5b6b0da67c15cfe8658099ddc7f39305280 Mon Sep 17 00:00:00 2001 From: guwe Date: Wed, 10 Jun 2020 02:23:13 +0000 Subject: [PATCH 3/3] enum for privisioning state --- .../stable/2020-06-01/managedClusters.json | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-06-01/managedClusters.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-06-01/managedClusters.json index 6bf883f81007..6bcddcdef0c9 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-06-01/managedClusters.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-06-01/managedClusters.json @@ -2814,9 +2814,19 @@ "description": "Properties of a private endpoint connection.", "properties": { "provisioningState": { - "readOnly": true, "type": "string", - "description": "The provisioning status of the private endpoint connection." + "readOnly": true, + "description": "The current provisioning state.", + "enum": [ + "Succeeded", + "Creating", + "Deleting", + "Failed" + ], + "x-ms-enum": { + "name": "PrivateEndpointConnectionProvisioningState", + "modelAsString": true + } }, "privateEndpoint": { "$ref": "#/definitions/PrivateEndpoint",