From adf294f0899b0037df7ffce80118d62ad64f01be Mon Sep 17 00:00:00 2001 From: Allen Zhang Date: Fri, 3 Apr 2020 12:31:32 -0700 Subject: [PATCH 1/5] Moved private link related model into common types --- .../resource-management/v1/privatelinks.json | 162 ++++++++++++++++ .../stable/2019-06-01/storage.json | 176 +----------------- 2 files changed, 169 insertions(+), 169 deletions(-) create mode 100644 specification/common-types/resource-management/v1/privatelinks.json diff --git a/specification/common-types/resource-management/v1/privatelinks.json b/specification/common-types/resource-management/v1/privatelinks.json new file mode 100644 index 000000000000..ac5b7e31e498 --- /dev/null +++ b/specification/common-types/resource-management/v1/privatelinks.json @@ -0,0 +1,162 @@ +{ + "swagger": "2.0", + "info": { + "version": "1.0", + "title": "Common types" + }, + "paths": {}, + "definitions": { + "PrivateEndpoint": { + "properties": { + "id": { + "readOnly": true, + "type": "string", + "description": "The ARM identifier for Private Endpoint" + } + }, + "description": "The Private Endpoint resource." + }, + "PrivateEndpointConnection": { + "properties": { + "properties": { + "$ref": "#/definitions/PrivateEndpointConnectionProperties", + "x-ms-client-flatten": true, + "description": "Resource properties." + } + }, + "allOf": [ + { + "$ref": "./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." + }, + "provisioningState": { + "$ref": "#/definitions/PrivateEndpointConnectionProvisioningState", + "description": "The provisioning state of the private endpoint connection resource." + } + }, + "required": [ + "privateLinkServiceConnectionState" + ], + "description": "Properties of the PrivateEndpointConnectProperties." + }, + "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" + ], + "x-ms-enum": { + "name": "PrivateEndpointServiceConnectionStatus", + "modelAsString": true + } + }, + "PrivateEndpointConnectionProvisioningState": { + "type": "string", + "readOnly": true, + "description": "The current provisioning state.", + "enum": [ + "Succeeded", + "Creating", + "Deleting", + "Failed" + ], + "x-ms-enum": { + "name": "PrivateEndpointConnectionProvisioningState", + "modelAsString": true + } + }, + "PrivateLinkResource": { + "properties": { + "properties": { + "$ref": "#/definitions/PrivateLinkResourceProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + }, + "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 + }, + "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." + }, + "PrivateLinkResourceListResult": { + "properties": { + "value": { + "type": "array", + "description": "Array of private link resources", + "items": { + "$ref": "#/definitions/PrivateLinkResource" + } + } + }, + "description": "A list of private link resources" + } + }, + "parameters": { + "PrivateEndpointConnectionName": { + "name": "privateEndpointConnectionName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the private endpoint connection associated with the Azure resource", + "x-ms-parameter-location": "method" + } + } +} \ No newline at end of file diff --git a/specification/storage/resource-manager/Microsoft.Storage/stable/2019-06-01/storage.json b/specification/storage/resource-manager/Microsoft.Storage/stable/2019-06-01/storage.json index 44ff7c9b50eb..2c6fbec75a0e 100644 --- a/specification/storage/resource-manager/Microsoft.Storage/stable/2019-06-01/storage.json +++ b/specification/storage/resource-manager/Microsoft.Storage/stable/2019-06-01/storage.json @@ -880,14 +880,14 @@ "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "#/parameters/PrivateEndpointConnectionName" + "$ref": "../../../../../common-types/resource-management/v1/privatelinks.json#/parameters/PrivateEndpointConnectionName" } ], "responses": { "200": { "description": "OK -- Get the private endpoint connection properties successfully.", "schema": { - "$ref": "#/definitions/PrivateEndpointConnection" + "$ref": "../../../../../common-types/resource-management/v1/privatelinks.json#/definitions/PrivateEndpointConnection" } }, "default": { @@ -930,7 +930,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/PrivateEndpointConnection" + "$ref": "../../../../../common-types/resource-management/v1/privatelinks.json#/definitions/PrivateEndpointConnection" }, "description": "The private endpoint connection properties." } @@ -939,7 +939,7 @@ "200": { "description": "OK -- Update the private endpoint connection properties successfully.", "schema": { - "$ref": "#/definitions/PrivateEndpointConnection" + "$ref": "../../../../../common-types/resource-management/v1/privatelinks.json#/definitions/PrivateEndpointConnection" } }, "default": { @@ -975,7 +975,7 @@ "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "#/parameters/PrivateEndpointConnectionName" + "$ref": "../../../../../common-types/resource-management/v1/privatelinks.json#/parameters/PrivateEndpointConnectionName" } ], "responses": { @@ -1024,7 +1024,7 @@ "200": { "description": "Successfully retrieved private link resources.", "schema": { - "$ref": "#/definitions/PrivateLinkResourceListResult" + "$ref": "../../../../../common-types/resource-management/v1/privatelinks.json#/definitions/PrivateLinkResourceListResult" } } } @@ -2547,7 +2547,7 @@ "readOnly": true, "type": "array", "items": { - "$ref": "#/definitions/PrivateEndpointConnection" + "$ref": "../../../../../common-types/resource-management/v1/privatelinks.json#/definitions/PrivateEndpointConnection" }, "description": "List of private endpoint connection associated with the specified storage account" }, @@ -3339,160 +3339,6 @@ ], "description": "Object to define the number of days after creation." }, - "PrivateEndpointConnection": { - "properties": { - "properties": { - "$ref": "#/definitions/PrivateEndpointConnectionProperties", - "x-ms-client-flatten": true, - "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." - }, - "provisioningState": { - "$ref": "#/definitions/PrivateEndpointConnectionProvisioningState", - "description": "The provisioning state of the private endpoint connection resource." - } - }, - "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" - ], - "x-ms-enum": { - "name": "PrivateEndpointServiceConnectionStatus", - "modelAsString": true - } - }, - "PrivateEndpointConnectionProvisioningState": { - "type": "string", - "readOnly": true, - "description": "The current provisioning state.", - "enum": [ - "Succeeded", - "Creating", - "Deleting", - "Failed" - ], - "x-ms-enum": { - "name": "PrivateEndpointConnectionProvisioningState", - "modelAsString": true - } - }, - "PrivateEndpointConnectionListResult": { - "properties": { - "value": { - "type": "array", - "description": "Array of private endpoint connections", - "items": { - "$ref": "#/definitions/PrivateEndpointConnection" - } - } - }, - "description": "List of private endpoint connection associated with the specified storage account" - }, - "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.", - "x-ms-client-flatten": true - } - }, - "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 - }, - "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." - }, "EncryptionScope": { "properties": { "properties": { @@ -3735,14 +3581,6 @@ }, "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 Storage Account", - "x-ms-parameter-location": "method" - }, "EncryptionScopeName": { "name": "encryptionScopeName", "in": "path", From 7949f3568e67fc654733f6faf8330b8785feaed5 Mon Sep 17 00:00:00 2001 From: Allen Zhang Date: Fri, 10 Apr 2020 11:18:28 -0700 Subject: [PATCH 2/5] Fix path to common types.json --- .../common-types/resource-management/v1/privatelinks.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/common-types/resource-management/v1/privatelinks.json b/specification/common-types/resource-management/v1/privatelinks.json index ac5b7e31e498..3ffdfe26faf2 100644 --- a/specification/common-types/resource-management/v1/privatelinks.json +++ b/specification/common-types/resource-management/v1/privatelinks.json @@ -106,7 +106,7 @@ }, "allOf": [ { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/Resource" + "$ref": "./types.json#/definitions/Resource" } ], "description": "A private link resource" From 43cfb186e3a5f2ca89700d688e351fd4c605bc2e Mon Sep 17 00:00:00 2001 From: Allen Zhang Date: Fri, 10 Apr 2020 11:35:45 -0700 Subject: [PATCH 3/5] Fix parameter reference --- custom-words.txt | 1 + .../Microsoft.Storage/stable/2019-06-01/storage.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/custom-words.txt b/custom-words.txt index f8ea265b2c45..3a5c2da39997 100644 --- a/custom-words.txt +++ b/custom-words.txt @@ -1128,6 +1128,7 @@ pricesheets pricings primarybytes privatedns +privatelinks privatepreview projectable Protectable diff --git a/specification/storage/resource-manager/Microsoft.Storage/stable/2019-06-01/storage.json b/specification/storage/resource-manager/Microsoft.Storage/stable/2019-06-01/storage.json index 2c6fbec75a0e..b0ee65cd4e3b 100644 --- a/specification/storage/resource-manager/Microsoft.Storage/stable/2019-06-01/storage.json +++ b/specification/storage/resource-manager/Microsoft.Storage/stable/2019-06-01/storage.json @@ -923,7 +923,7 @@ "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "#/parameters/PrivateEndpointConnectionName" + "$ref": "../../../../../common-types/resource-management/v1/privatelinks.json#/parameters/PrivateEndpointConnectionName" }, { "name": "properties", From 5182fc0b1162c8431f4366100ff5693d15bf93f5 Mon Sep 17 00:00:00 2001 From: Allen Zhang Date: Fri, 10 Apr 2020 12:20:13 -0700 Subject: [PATCH 4/5] fix prettier issue --- .../common-types/resource-management/v1/privatelinks.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/common-types/resource-management/v1/privatelinks.json b/specification/common-types/resource-management/v1/privatelinks.json index 3ffdfe26faf2..97e31ccddd3e 100644 --- a/specification/common-types/resource-management/v1/privatelinks.json +++ b/specification/common-types/resource-management/v1/privatelinks.json @@ -158,5 +158,5 @@ "description": "The name of the private endpoint connection associated with the Azure resource", "x-ms-parameter-location": "method" } - } -} \ No newline at end of file + } +} From 73d2f4ee7b024cb0c2e4990136ac33302780574a Mon Sep 17 00:00:00 2001 From: Allen Zhang Date: Tue, 12 May 2020 00:24:16 -0700 Subject: [PATCH 5/5] Resovled the conflict and moved PrivateEndpointConnectionListResult into common and updated reference --- .../resource-management/v1/privatelinks.json | 12 ++++++++++++ .../Microsoft.Storage/stable/2019-06-01/storage.json | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/specification/common-types/resource-management/v1/privatelinks.json b/specification/common-types/resource-management/v1/privatelinks.json index 97e31ccddd3e..d6cb94988421 100644 --- a/specification/common-types/resource-management/v1/privatelinks.json +++ b/specification/common-types/resource-management/v1/privatelinks.json @@ -136,6 +136,18 @@ }, "description": "Properties of a private link resource." }, + "PrivateEndpointConnectionListResult": { + "properties": { + "value": { + "type": "array", + "description": "Array of private endpoint connections", + "items": { + "$ref": "#/definitions/PrivateEndpointConnection" + } + } + }, + "description": "List of private endpoint connection associated with the specified storage account" + }, "PrivateLinkResourceListResult": { "properties": { "value": { diff --git a/specification/storage/resource-manager/Microsoft.Storage/stable/2019-06-01/storage.json b/specification/storage/resource-manager/Microsoft.Storage/stable/2019-06-01/storage.json index b0ee65cd4e3b..0eafcd6749fb 100644 --- a/specification/storage/resource-manager/Microsoft.Storage/stable/2019-06-01/storage.json +++ b/specification/storage/resource-manager/Microsoft.Storage/stable/2019-06-01/storage.json @@ -845,7 +845,7 @@ "200": { "description": "OK -- Successfully retrieved private endpoint connections.", "schema": { - "$ref": "#/definitions/PrivateEndpointConnectionListResult" + "$ref": "../../../../../common-types/resource-management/v1/privatelinks.json#/definitions/PrivateEndpointConnectionListResult" } } },