From d553998e753887df7875d59d66f39bd1c9d3041b Mon Sep 17 00:00:00 2001 From: Anthony Noakes Date: Tue, 19 Jan 2021 19:19:27 -0800 Subject: [PATCH 1/3] Purview update network acls and patch API --- .../examples/Accounts_CreateOrUpdate.json | 8 +- .../examples/Accounts_Delete.json | 2 +- .../examples/Accounts_Get.json | 4 +- .../Accounts_ListByResourceGroup.json | 8 +- .../examples/Accounts_ListBySubscription.json | 8 +- .../examples/Accounts_Update.json | 44 +++- .../PrivateLinkResources_GetByGroupId.json | 8 +- .../PrivateLinkResources_ListByAccount.json | 16 +- .../preview/2020-12-01-preview/purview.json | 188 ++++++------------ 9 files changed, 112 insertions(+), 174 deletions(-) diff --git a/specification/purview/resource-manager/Microsoft.Purview/preview/2020-12-01-preview/examples/Accounts_CreateOrUpdate.json b/specification/purview/resource-manager/Microsoft.Purview/preview/2020-12-01-preview/examples/Accounts_CreateOrUpdate.json index 00cbbb89f846..8a6eaaacd3c5 100644 --- a/specification/purview/resource-manager/Microsoft.Purview/preview/2020-12-01-preview/examples/Accounts_CreateOrUpdate.json +++ b/specification/purview/resource-manager/Microsoft.Purview/preview/2020-12-01-preview/examples/Accounts_CreateOrUpdate.json @@ -37,9 +37,7 @@ "scan": "https://account1.scan.purview.azure-test.com", "guardian": "https://account1.guardian.purview.azure-test.com" }, - "networkAcls": { - "defaultAction": "Allow" - } + "publicNetworkAccess": "Enabled" } } }, @@ -67,9 +65,7 @@ "scan": "https://account1.scan.purview.azure-test.com", "guardian": "https://account1.guardian.purview.azure-test.com" }, - "networkAcls": { - "defaultAction": "Allow" - }, + "publicNetworkAccess": "Enabled", "managedResources": { "resourceGroup": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/managed-rg-mwjotkl", "storageAccount": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/managed-rg-mwjotkl/providers/Microsoft.Storage/storageAccounts/scanwestustzaagzr", diff --git a/specification/purview/resource-manager/Microsoft.Purview/preview/2020-12-01-preview/examples/Accounts_Delete.json b/specification/purview/resource-manager/Microsoft.Purview/preview/2020-12-01-preview/examples/Accounts_Delete.json index 953d4f8d029e..108911ff5859 100644 --- a/specification/purview/resource-manager/Microsoft.Purview/preview/2020-12-01-preview/examples/Accounts_Delete.json +++ b/specification/purview/resource-manager/Microsoft.Purview/preview/2020-12-01-preview/examples/Accounts_Delete.json @@ -23,7 +23,7 @@ "x-ms-ratelimit-remaining-tenant-reads": "14999", "x-ms-correlation-request-id": "25c78f97-0b0a-4fe9-ad39-883a482265cd", "x-ms-long-running-operation": true, - "Azure-AsyncOperation": "https://management.azure.com/subscriptions34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/SampleResourceGroup/providers/Microsoft.Purview/accounts/account1/operationResults/dad6baec-3a39-41df-a469-843a9ee94213?api-version=2019-10-01-preview" + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/SampleResourceGroup/providers/Microsoft.Purview/accounts/account1/operationResults/dad6baec-3a39-41df-a469-843a9ee94213?api-version=2019-10-01-preview" } }, "204": { diff --git a/specification/purview/resource-manager/Microsoft.Purview/preview/2020-12-01-preview/examples/Accounts_Get.json b/specification/purview/resource-manager/Microsoft.Purview/preview/2020-12-01-preview/examples/Accounts_Get.json index 45f48baa6714..6a0c9a54571d 100644 --- a/specification/purview/resource-manager/Microsoft.Purview/preview/2020-12-01-preview/examples/Accounts_Get.json +++ b/specification/purview/resource-manager/Microsoft.Purview/preview/2020-12-01-preview/examples/Accounts_Get.json @@ -52,9 +52,7 @@ "type": "Microsoft.Purview/accounts/privateEndpointConnections" } ], - "networkAcls": { - "defaultAction": "Allow" - }, + "publicNetworkAccess": "Enabled", "managedResources": { "resourceGroup": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/managed-rg-mwjotkl", "storageAccount": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/managed-rg-mwjotkl/providers/Microsoft.Storage/storageAccounts/scanwestustzaagzr", diff --git a/specification/purview/resource-manager/Microsoft.Purview/preview/2020-12-01-preview/examples/Accounts_ListByResourceGroup.json b/specification/purview/resource-manager/Microsoft.Purview/preview/2020-12-01-preview/examples/Accounts_ListByResourceGroup.json index 86d6bf4e0d76..a4d157206813 100644 --- a/specification/purview/resource-manager/Microsoft.Purview/preview/2020-12-01-preview/examples/Accounts_ListByResourceGroup.json +++ b/specification/purview/resource-manager/Microsoft.Purview/preview/2020-12-01-preview/examples/Accounts_ListByResourceGroup.json @@ -35,9 +35,7 @@ "scan": "https://account1.scan.purview.azure-test.com", "guardian": "https://account1.guardian.purview.azure-test.com" }, - "networkAcls": { - "defaultAction": "Allow" - } + "publicNetworkAccess": "Enabled" } }, { @@ -60,9 +58,7 @@ "scan": "https://account2.scan.purview.azure-test.com", "guardian": "https://account1.guardian.purview.azure-test.com" }, - "networkAcls": { - "defaultAction": "Allow" - } + "publicNetworkAccess": "Enabled" } } ] diff --git a/specification/purview/resource-manager/Microsoft.Purview/preview/2020-12-01-preview/examples/Accounts_ListBySubscription.json b/specification/purview/resource-manager/Microsoft.Purview/preview/2020-12-01-preview/examples/Accounts_ListBySubscription.json index 2aa65bfbd60e..efdc837c817d 100644 --- a/specification/purview/resource-manager/Microsoft.Purview/preview/2020-12-01-preview/examples/Accounts_ListBySubscription.json +++ b/specification/purview/resource-manager/Microsoft.Purview/preview/2020-12-01-preview/examples/Accounts_ListBySubscription.json @@ -34,9 +34,7 @@ "scan": "https://account1.scan.purview.azure-test.com", "guardian": "https://account1.guardian.purview.azure-test.com" }, - "networkAcls": { - "defaultAction": "Allow" - } + "publicNetworkAccess": "Enabled" } }, { @@ -59,9 +57,7 @@ "scan": "https://account2.scan.purview.azure-test.com", "guardian": "https://account1.guardian.purview.azure-test.com" }, - "networkAcls": { - "defaultAction": "Allow" - } + "publicNetworkAccess": "Enabled" } } ] diff --git a/specification/purview/resource-manager/Microsoft.Purview/preview/2020-12-01-preview/examples/Accounts_Update.json b/specification/purview/resource-manager/Microsoft.Purview/preview/2020-12-01-preview/examples/Accounts_Update.json index c37d27a2f0a3..506ca622edce 100644 --- a/specification/purview/resource-manager/Microsoft.Purview/preview/2020-12-01-preview/examples/Accounts_Update.json +++ b/specification/purview/resource-manager/Microsoft.Purview/preview/2020-12-01-preview/examples/Accounts_Update.json @@ -39,9 +39,49 @@ "scan": "https://account2.scan.purview.azure-test.com", "guardian": "https://account1.guardian.purview.azure-test.com" }, - "networkAcls": { - "defaultAction": "Allow" + "publicNetworkAccess": "Enabled", + "managedResources": { + "resourceGroup": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/managed-rg-mwjotkl", + "storageAccount": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/managed-rg-mwjotkl/providers/Microsoft.Storage/storageAccounts/scanwestustzaagzr", + "eventHubNamespace": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/managed-rg-mwjotkl/providers/Microsoft.EventHub/namespaces/atlas-westusdddnbtp" + } + }, + "tags": { + "newTag": "New tag value." + } + } + }, + "202": { + "headers": { + "Date": "Wed, 13 Sep 2017 18:04:32 GMT", + "x-ms-request-id": "d5496da4-9c52-402f-b067-83cc9ddea888", + "X-Content-Type-Options": "nosniff", + "x-ms-ratelimit-remaining-tenant-reads": "14999", + "x-ms-correlation-request-id": "25c78f97-0b0a-4fe9-ad39-883a482265cd", + "x-ms-long-running-operation": true, + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/SampleResourceGroup/providers/Microsoft.Purview/accounts/account1/operationResults/dad6baec-3a39-41df-a469-843a9ee94213?api-version=2020-12-01-preview" + }, + "body": { + "location": "West US 2", + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/SampleResourceGroup/providers/Microsoft.Purview/accounts/account1", + "name": "account1", + "type": "Microsoft.Purview/accounts", + "sku": { + "name": "Standard", + "capacity": 4 + }, + "properties": { + "friendlyName": "friendly-account1", + "createdBy": "client-name", + "createdByObjectId": "client-objectId", + "createdAt": "2019-11-22T18:39:58.6929344Z", + "provisioningState": "Succeeded", + "endpoints": { + "catalog": "https://account2.catalog.purview.azure-test.com", + "scan": "https://account2.scan.purview.azure-test.com", + "guardian": "https://account1.guardian.purview.azure-test.com" }, + "publicNetworkAccess": "Enabled", "managedResources": { "resourceGroup": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/managed-rg-mwjotkl", "storageAccount": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/managed-rg-mwjotkl/providers/Microsoft.Storage/storageAccounts/scanwestustzaagzr", diff --git a/specification/purview/resource-manager/Microsoft.Purview/preview/2020-12-01-preview/examples/PrivateLinkResources_GetByGroupId.json b/specification/purview/resource-manager/Microsoft.Purview/preview/2020-12-01-preview/examples/PrivateLinkResources_GetByGroupId.json index 3dd70b0a2b99..7b7209df41a2 100644 --- a/specification/purview/resource-manager/Microsoft.Purview/preview/2020-12-01-preview/examples/PrivateLinkResources_GetByGroupId.json +++ b/specification/purview/resource-manager/Microsoft.Purview/preview/2020-12-01-preview/examples/PrivateLinkResources_GetByGroupId.json @@ -21,12 +21,8 @@ "type": "Microsoft.Purview/accounts/privateLinkResources", "properties": { "groupId": "group1", - "requiredMembers": [ - "group1" - ], - "requiredZoneNames": [ - "privatelinkzone1.service.azure.com" - ] + "requiredMembers": ["group1"], + "requiredZoneNames": ["privatelinkzone1.service.azure.com"] } } } diff --git a/specification/purview/resource-manager/Microsoft.Purview/preview/2020-12-01-preview/examples/PrivateLinkResources_ListByAccount.json b/specification/purview/resource-manager/Microsoft.Purview/preview/2020-12-01-preview/examples/PrivateLinkResources_ListByAccount.json index ac077b278138..7efe316e5e25 100644 --- a/specification/purview/resource-manager/Microsoft.Purview/preview/2020-12-01-preview/examples/PrivateLinkResources_ListByAccount.json +++ b/specification/purview/resource-manager/Microsoft.Purview/preview/2020-12-01-preview/examples/PrivateLinkResources_ListByAccount.json @@ -22,12 +22,8 @@ "type": "Microsoft.Purview/accounts/privateLinkResources", "properties": { "groupId": "account1", - "requiredMembers": [ - "account1" - ], - "requiredZoneNames": [ - "privatelinkzone1.service.azure.com" - ] + "requiredMembers": ["account1"], + "requiredZoneNames": ["privatelinkzone1.service.azure.com"] } }, { @@ -36,12 +32,8 @@ "type": "Microsoft.Purview/accounts/privateLinkResources", "properties": { "groupId": "account2", - "requiredMembers": [ - "account2" - ], - "requiredZoneNames": [ - "privatelinkzone2.service.azure.com" - ] + "requiredMembers": ["account2"], + "requiredZoneNames": ["privatelinkzone2.service.azure.com"] } } ] diff --git a/specification/purview/resource-manager/Microsoft.Purview/preview/2020-12-01-preview/purview.json b/specification/purview/resource-manager/Microsoft.Purview/preview/2020-12-01-preview/purview.json index b9e0fe44c4d0..16c7182e0560 100644 --- a/specification/purview/resource-manager/Microsoft.Purview/preview/2020-12-01-preview/purview.json +++ b/specification/purview/resource-manager/Microsoft.Purview/preview/2020-12-01-preview/purview.json @@ -6,21 +6,13 @@ "description": "Creates a Microsoft.Purview management client." }, "host": "management.azure.com", - "schemes": [ - "https" - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], + "schemes": ["https"], + "consumes": ["application/json"], + "produces": ["application/json"], "paths": { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Purview/accounts": { "get": { - "tags": [ - "Account" - ], + "tags": ["Account"], "summary": "Gets the accounts resources by resource group.", "description": "List accounts in ResourceGroup", "operationId": "Accounts_ListByResourceGroup", @@ -68,9 +60,7 @@ }, "/subscriptions/{subscriptionId}/providers/Microsoft.Purview/accounts": { "get": { - "tags": [ - "Account" - ], + "tags": ["Account"], "summary": "Gets the accounts resources by subscription.", "description": "List accounts in Subscription", "operationId": "Accounts_ListBySubscription", @@ -115,9 +105,7 @@ }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Purview/accounts/{accountName}": { "get": { - "tags": [ - "Account" - ], + "tags": ["Account"], "summary": "Gets the account resource.", "description": "Get an account", "operationId": "Accounts_Get", @@ -156,9 +144,7 @@ } }, "put": { - "tags": [ - "Account" - ], + "tags": ["Account"], "summary": "Create or update an account resource", "description": "Creates or updates an account", "operationId": "Accounts_CreateOrUpdate", @@ -213,9 +199,7 @@ } }, "delete": { - "tags": [ - "Account" - ], + "tags": ["Account"], "summary": "Deletes the account resource.", "description": "Deletes an account resource", "operationId": "Accounts_Delete", @@ -258,9 +242,7 @@ } }, "patch": { - "tags": [ - "Account" - ], + "tags": ["Account"], "summary": "Patches the account resource.", "description": "Updates an account", "operationId": "Accounts_Update", @@ -294,6 +276,12 @@ "$ref": "#/definitions/Account" } }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/Account" + } + }, "default": { "description": "An error response received from the provider.", "schema": { @@ -301,6 +289,7 @@ } } }, + "x-ms-long-running-operation": true, "x-ms-examples": { "Accounts_Update": { "$ref": "./examples/Accounts_Update.json" @@ -310,9 +299,7 @@ }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Purview/accounts/{accountName}/listkeys": { "post": { - "tags": [ - "Account" - ], + "tags": ["Account"], "summary": "Lists the keys asynchronous.", "description": "List the authorization keys associated with this account.", "operationId": "Accounts_ListKeys", @@ -353,9 +340,7 @@ }, "/providers/Microsoft.Purview/getDefaultAccount": { "get": { - "tags": [ - "DefaultAccount" - ], + "tags": ["DefaultAccount"], "summary": "Gets the default account information set for the scope.", "description": "Get the default account for the scope.", "operationId": "DefaultAccounts_Get", @@ -374,10 +359,7 @@ "description": "The scope for the default account.", "required": true, "type": "string", - "enum": [ - "Tenant", - "Subscription" - ], + "enum": ["Tenant", "Subscription"], "x-ms-enum": { "name": "ScopeType", "modelAsString": true @@ -417,9 +399,7 @@ }, "/providers/Microsoft.Purview/setDefaultAccount": { "post": { - "tags": [ - "DefaultAccount" - ], + "tags": ["DefaultAccount"], "summary": "Sets the default account for the scope.", "description": "Set the default account for the scope.", "operationId": "DefaultAccounts_Set", @@ -460,9 +440,7 @@ }, "/providers/Microsoft.Purview/removeDefaultAccount": { "post": { - "tags": [ - "DefaultAccount" - ], + "tags": ["DefaultAccount"], "summary": "Removes the default account from the scope.", "description": "Remove the default account from the scope.", "operationId": "DefaultAccounts_Remove", @@ -481,10 +459,7 @@ "description": "The scope for the default account.", "required": true, "type": "string", - "enum": [ - "Tenant", - "Subscription" - ], + "enum": ["Tenant", "Subscription"], "x-ms-enum": { "name": "ScopeType", "modelAsString": true @@ -524,9 +499,7 @@ }, "/providers/Microsoft.Purview/operations": { "get": { - "tags": [ - "Operation" - ], + "tags": ["Operation"], "summary": "Lists the available operations", "description": "List of available operations", "operationId": "Operations_List", @@ -561,9 +534,7 @@ }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Purview/accounts/{accountName}/privateEndpointConnections": { "get": { - "tags": [ - "PrivateEndpointConnection" - ], + "tags": ["PrivateEndpointConnection"], "summary": "Gets private endpoint connections.", "description": "Get private endpoint connections for account", "operationId": "PrivateEndpointConnections_ListByAccount", @@ -614,9 +585,7 @@ }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Purview/accounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}": { "get": { - "tags": [ - "PrivateEndpointConnection" - ], + "tags": ["PrivateEndpointConnection"], "summary": "Gets private endpoint connection information.", "description": "Get a private endpoint connection", "operationId": "PrivateEndpointConnections_Get", @@ -662,9 +631,7 @@ } }, "put": { - "tags": [ - "PrivateEndpointConnection" - ], + "tags": ["PrivateEndpointConnection"], "summary": "Approves/Rejects private endpoint connection request.", "description": "Create or update a private endpoint connection", "operationId": "PrivateEndpointConnections_CreateOrUpdate", @@ -725,9 +692,7 @@ } }, "delete": { - "tags": [ - "PrivateEndpointConnection" - ], + "tags": ["PrivateEndpointConnection"], "summary": "Deletes private endpoint connection.", "description": "Delete a private endpoint connection", "operationId": "PrivateEndpointConnections_Delete", @@ -779,9 +744,7 @@ }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Purview/accounts/{accountName}/privateLinkResources": { "get": { - "tags": [ - "PrivateLinkResource" - ], + "tags": ["PrivateLinkResource"], "summary": "Gets a list of privately linkable resources for an account.", "description": "Gets a list of privately linkable resources for an account", "operationId": "PrivateLinkResources_ListByAccount", @@ -825,9 +788,7 @@ }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Purview/accounts/{accountName}/privateLinkResources/{groupId}": { "get": { - "tags": [ - "PrivateLinkResource" - ], + "tags": ["PrivateLinkResource"], "summary": "Gets a privately linkable resources for an account with given group identifier.", "description": "Gets a privately linkable resources for an account with given group identifier", "operationId": "PrivateLinkResources_GetByGroupId", @@ -875,9 +836,7 @@ }, "/subscriptions/{subscriptionId}/providers/Microsoft.Purview/checkNameAvailability": { "post": { - "tags": [ - "Provider" - ], + "tags": ["Provider"], "summary": "Checks the account name availability.", "description": "Checks if account name is available.", "operationId": "Accounts_CheckNameAvailability", @@ -923,9 +882,7 @@ "definitions": { "AccountList": { "description": "Paged list of account resources", - "required": [ - "value" - ], + "required": ["value"], "type": "object", "properties": { "count": { @@ -978,9 +935,7 @@ }, "name": { "description": "Gets or sets the sku name.", - "enum": [ - "Standard" - ], + "enum": ["Standard"], "type": "string", "x-ms-enum": { "name": "name", @@ -1036,10 +991,6 @@ ], "readOnly": true }, - "networkAcls": { - "$ref": "#/definitions/NetworkAcls", - "description": "Get the network ACLs." - }, "privateEndpointConnections": { "description": "Gets the private endpoint connections information.", "uniqueItems": false, @@ -1067,6 +1018,15 @@ "name": "provisioningState", "modelAsString": true } + }, + "publicNetworkAccess": { + "description": "Gets or sets the public network access.", + "enum": ["NotSpecified", "Enabled", "Disabled"], + "type": "string", + "x-ms-enum": { + "name": "publicNetworkAccess", + "modelAsString": true + } } } }, @@ -1086,9 +1046,7 @@ }, "type": { "description": "Identity Type", - "enum": [ - "SystemAssigned" - ], + "enum": ["SystemAssigned"], "type": "string", "x-ms-enum": { "name": "type", @@ -1166,24 +1124,6 @@ } } }, - "NetworkAcls": { - "description": "The Network ACLs", - "type": "object", - "properties": { - "defaultAction": { - "description": "Gets or sets the default behavior of network ACLs.", - "enum": [ - "Allow", - "Deny" - ], - "type": "string", - "x-ms-enum": { - "name": "defaultAction", - "modelAsString": true - } - } - } - }, "PrivateEndpointConnectionProperties": { "description": "A private endpoint connection properties class.", "type": "object", @@ -1341,10 +1281,7 @@ }, "scopeType": { "description": "The scope where the default account is set.", - "enum": [ - "Tenant", - "Subscription" - ], + "enum": ["Tenant", "Subscription"], "type": "string", "x-ms-enum": { "name": "scopeType", @@ -1359,9 +1296,7 @@ }, "DeletedAccountList": { "description": "Paged list of soft deleted account resources", - "required": [ - "value" - ], + "required": ["value"], "type": "object", "properties": { "count": { @@ -1447,9 +1382,7 @@ }, "OperationList": { "description": "Paged list of operation resources", - "required": [ - "value" - ], + "required": ["value"], "type": "object", "properties": { "count": { @@ -1656,9 +1589,7 @@ }, "PrivateEndpointConnectionList": { "description": "Paged list of private endpoint connections", - "required": [ - "value" - ], + "required": ["value"], "type": "object", "properties": { "count": { @@ -1682,9 +1613,7 @@ }, "PrivateLinkResourceList": { "description": "Paged list of private link resources", - "required": [ - "value" - ], + "required": ["value"], "type": "object", "properties": { "count": { @@ -1780,10 +1709,7 @@ }, "reason": { "description": "The reason the name is not available.", - "enum": [ - "Invalid", - "AlreadyExists" - ], + "enum": ["Invalid", "AlreadyExists"], "type": "string", "x-ms-enum": { "name": "reason", @@ -1853,6 +1779,13 @@ } }, "parameters": { + "api-version": { + "name": "api-version", + "in": "query", + "description": "The api version to use.", + "required": true, + "type": "string" + }, "subscriptionId": { "name": "subscriptionId", "in": "path", @@ -1868,13 +1801,6 @@ "type": "string", "x-ms-parameter-location": "method" }, - "api-version": { - "name": "api-version", - "in": "query", - "description": "The api version to use.", - "required": true, - "type": "string" - }, "accountName": { "name": "accountName", "in": "path", @@ -1897,9 +1823,7 @@ }, "security": [ { - "azure_auth": [ - "user_impersonation" - ] + "azure_auth": ["user_impersonation"] } ], "tags": [] From caec36014e8b2b0992f5218c07efa79a02c83787 Mon Sep 17 00:00:00 2001 From: Anthony Noakes Date: Wed, 20 Jan 2021 09:36:59 -0800 Subject: [PATCH 2/3] Update prettier --- .../PrivateLinkResources_GetByGroupId.json | 8 +- .../PrivateLinkResources_ListByAccount.json | 16 +- .../preview/2020-12-01-preview/purview.json | 142 +++++++++++++----- 3 files changed, 126 insertions(+), 40 deletions(-) diff --git a/specification/purview/resource-manager/Microsoft.Purview/preview/2020-12-01-preview/examples/PrivateLinkResources_GetByGroupId.json b/specification/purview/resource-manager/Microsoft.Purview/preview/2020-12-01-preview/examples/PrivateLinkResources_GetByGroupId.json index 7b7209df41a2..3dd70b0a2b99 100644 --- a/specification/purview/resource-manager/Microsoft.Purview/preview/2020-12-01-preview/examples/PrivateLinkResources_GetByGroupId.json +++ b/specification/purview/resource-manager/Microsoft.Purview/preview/2020-12-01-preview/examples/PrivateLinkResources_GetByGroupId.json @@ -21,8 +21,12 @@ "type": "Microsoft.Purview/accounts/privateLinkResources", "properties": { "groupId": "group1", - "requiredMembers": ["group1"], - "requiredZoneNames": ["privatelinkzone1.service.azure.com"] + "requiredMembers": [ + "group1" + ], + "requiredZoneNames": [ + "privatelinkzone1.service.azure.com" + ] } } } diff --git a/specification/purview/resource-manager/Microsoft.Purview/preview/2020-12-01-preview/examples/PrivateLinkResources_ListByAccount.json b/specification/purview/resource-manager/Microsoft.Purview/preview/2020-12-01-preview/examples/PrivateLinkResources_ListByAccount.json index 7efe316e5e25..ac077b278138 100644 --- a/specification/purview/resource-manager/Microsoft.Purview/preview/2020-12-01-preview/examples/PrivateLinkResources_ListByAccount.json +++ b/specification/purview/resource-manager/Microsoft.Purview/preview/2020-12-01-preview/examples/PrivateLinkResources_ListByAccount.json @@ -22,8 +22,12 @@ "type": "Microsoft.Purview/accounts/privateLinkResources", "properties": { "groupId": "account1", - "requiredMembers": ["account1"], - "requiredZoneNames": ["privatelinkzone1.service.azure.com"] + "requiredMembers": [ + "account1" + ], + "requiredZoneNames": [ + "privatelinkzone1.service.azure.com" + ] } }, { @@ -32,8 +36,12 @@ "type": "Microsoft.Purview/accounts/privateLinkResources", "properties": { "groupId": "account2", - "requiredMembers": ["account2"], - "requiredZoneNames": ["privatelinkzone2.service.azure.com"] + "requiredMembers": [ + "account2" + ], + "requiredZoneNames": [ + "privatelinkzone2.service.azure.com" + ] } } ] diff --git a/specification/purview/resource-manager/Microsoft.Purview/preview/2020-12-01-preview/purview.json b/specification/purview/resource-manager/Microsoft.Purview/preview/2020-12-01-preview/purview.json index 16c7182e0560..c90383f8f594 100644 --- a/specification/purview/resource-manager/Microsoft.Purview/preview/2020-12-01-preview/purview.json +++ b/specification/purview/resource-manager/Microsoft.Purview/preview/2020-12-01-preview/purview.json @@ -6,13 +6,21 @@ "description": "Creates a Microsoft.Purview management client." }, "host": "management.azure.com", - "schemes": ["https"], - "consumes": ["application/json"], - "produces": ["application/json"], + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "paths": { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Purview/accounts": { "get": { - "tags": ["Account"], + "tags": [ + "Account" + ], "summary": "Gets the accounts resources by resource group.", "description": "List accounts in ResourceGroup", "operationId": "Accounts_ListByResourceGroup", @@ -60,7 +68,9 @@ }, "/subscriptions/{subscriptionId}/providers/Microsoft.Purview/accounts": { "get": { - "tags": ["Account"], + "tags": [ + "Account" + ], "summary": "Gets the accounts resources by subscription.", "description": "List accounts in Subscription", "operationId": "Accounts_ListBySubscription", @@ -105,7 +115,9 @@ }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Purview/accounts/{accountName}": { "get": { - "tags": ["Account"], + "tags": [ + "Account" + ], "summary": "Gets the account resource.", "description": "Get an account", "operationId": "Accounts_Get", @@ -144,7 +156,9 @@ } }, "put": { - "tags": ["Account"], + "tags": [ + "Account" + ], "summary": "Create or update an account resource", "description": "Creates or updates an account", "operationId": "Accounts_CreateOrUpdate", @@ -199,7 +213,9 @@ } }, "delete": { - "tags": ["Account"], + "tags": [ + "Account" + ], "summary": "Deletes the account resource.", "description": "Deletes an account resource", "operationId": "Accounts_Delete", @@ -242,7 +258,9 @@ } }, "patch": { - "tags": ["Account"], + "tags": [ + "Account" + ], "summary": "Patches the account resource.", "description": "Updates an account", "operationId": "Accounts_Update", @@ -299,7 +317,9 @@ }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Purview/accounts/{accountName}/listkeys": { "post": { - "tags": ["Account"], + "tags": [ + "Account" + ], "summary": "Lists the keys asynchronous.", "description": "List the authorization keys associated with this account.", "operationId": "Accounts_ListKeys", @@ -340,7 +360,9 @@ }, "/providers/Microsoft.Purview/getDefaultAccount": { "get": { - "tags": ["DefaultAccount"], + "tags": [ + "DefaultAccount" + ], "summary": "Gets the default account information set for the scope.", "description": "Get the default account for the scope.", "operationId": "DefaultAccounts_Get", @@ -359,7 +381,10 @@ "description": "The scope for the default account.", "required": true, "type": "string", - "enum": ["Tenant", "Subscription"], + "enum": [ + "Tenant", + "Subscription" + ], "x-ms-enum": { "name": "ScopeType", "modelAsString": true @@ -399,7 +424,9 @@ }, "/providers/Microsoft.Purview/setDefaultAccount": { "post": { - "tags": ["DefaultAccount"], + "tags": [ + "DefaultAccount" + ], "summary": "Sets the default account for the scope.", "description": "Set the default account for the scope.", "operationId": "DefaultAccounts_Set", @@ -440,7 +467,9 @@ }, "/providers/Microsoft.Purview/removeDefaultAccount": { "post": { - "tags": ["DefaultAccount"], + "tags": [ + "DefaultAccount" + ], "summary": "Removes the default account from the scope.", "description": "Remove the default account from the scope.", "operationId": "DefaultAccounts_Remove", @@ -459,7 +488,10 @@ "description": "The scope for the default account.", "required": true, "type": "string", - "enum": ["Tenant", "Subscription"], + "enum": [ + "Tenant", + "Subscription" + ], "x-ms-enum": { "name": "ScopeType", "modelAsString": true @@ -499,7 +531,9 @@ }, "/providers/Microsoft.Purview/operations": { "get": { - "tags": ["Operation"], + "tags": [ + "Operation" + ], "summary": "Lists the available operations", "description": "List of available operations", "operationId": "Operations_List", @@ -534,7 +568,9 @@ }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Purview/accounts/{accountName}/privateEndpointConnections": { "get": { - "tags": ["PrivateEndpointConnection"], + "tags": [ + "PrivateEndpointConnection" + ], "summary": "Gets private endpoint connections.", "description": "Get private endpoint connections for account", "operationId": "PrivateEndpointConnections_ListByAccount", @@ -585,7 +621,9 @@ }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Purview/accounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}": { "get": { - "tags": ["PrivateEndpointConnection"], + "tags": [ + "PrivateEndpointConnection" + ], "summary": "Gets private endpoint connection information.", "description": "Get a private endpoint connection", "operationId": "PrivateEndpointConnections_Get", @@ -631,7 +669,9 @@ } }, "put": { - "tags": ["PrivateEndpointConnection"], + "tags": [ + "PrivateEndpointConnection" + ], "summary": "Approves/Rejects private endpoint connection request.", "description": "Create or update a private endpoint connection", "operationId": "PrivateEndpointConnections_CreateOrUpdate", @@ -692,7 +732,9 @@ } }, "delete": { - "tags": ["PrivateEndpointConnection"], + "tags": [ + "PrivateEndpointConnection" + ], "summary": "Deletes private endpoint connection.", "description": "Delete a private endpoint connection", "operationId": "PrivateEndpointConnections_Delete", @@ -744,7 +786,9 @@ }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Purview/accounts/{accountName}/privateLinkResources": { "get": { - "tags": ["PrivateLinkResource"], + "tags": [ + "PrivateLinkResource" + ], "summary": "Gets a list of privately linkable resources for an account.", "description": "Gets a list of privately linkable resources for an account", "operationId": "PrivateLinkResources_ListByAccount", @@ -788,7 +832,9 @@ }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Purview/accounts/{accountName}/privateLinkResources/{groupId}": { "get": { - "tags": ["PrivateLinkResource"], + "tags": [ + "PrivateLinkResource" + ], "summary": "Gets a privately linkable resources for an account with given group identifier.", "description": "Gets a privately linkable resources for an account with given group identifier", "operationId": "PrivateLinkResources_GetByGroupId", @@ -836,7 +882,9 @@ }, "/subscriptions/{subscriptionId}/providers/Microsoft.Purview/checkNameAvailability": { "post": { - "tags": ["Provider"], + "tags": [ + "Provider" + ], "summary": "Checks the account name availability.", "description": "Checks if account name is available.", "operationId": "Accounts_CheckNameAvailability", @@ -882,7 +930,9 @@ "definitions": { "AccountList": { "description": "Paged list of account resources", - "required": ["value"], + "required": [ + "value" + ], "type": "object", "properties": { "count": { @@ -935,7 +985,9 @@ }, "name": { "description": "Gets or sets the sku name.", - "enum": ["Standard"], + "enum": [ + "Standard" + ], "type": "string", "x-ms-enum": { "name": "name", @@ -1021,7 +1073,11 @@ }, "publicNetworkAccess": { "description": "Gets or sets the public network access.", - "enum": ["NotSpecified", "Enabled", "Disabled"], + "enum": [ + "NotSpecified", + "Enabled", + "Disabled" + ], "type": "string", "x-ms-enum": { "name": "publicNetworkAccess", @@ -1046,7 +1102,9 @@ }, "type": { "description": "Identity Type", - "enum": ["SystemAssigned"], + "enum": [ + "SystemAssigned" + ], "type": "string", "x-ms-enum": { "name": "type", @@ -1281,7 +1339,10 @@ }, "scopeType": { "description": "The scope where the default account is set.", - "enum": ["Tenant", "Subscription"], + "enum": [ + "Tenant", + "Subscription" + ], "type": "string", "x-ms-enum": { "name": "scopeType", @@ -1296,7 +1357,9 @@ }, "DeletedAccountList": { "description": "Paged list of soft deleted account resources", - "required": ["value"], + "required": [ + "value" + ], "type": "object", "properties": { "count": { @@ -1382,7 +1445,9 @@ }, "OperationList": { "description": "Paged list of operation resources", - "required": ["value"], + "required": [ + "value" + ], "type": "object", "properties": { "count": { @@ -1589,7 +1654,9 @@ }, "PrivateEndpointConnectionList": { "description": "Paged list of private endpoint connections", - "required": ["value"], + "required": [ + "value" + ], "type": "object", "properties": { "count": { @@ -1613,7 +1680,9 @@ }, "PrivateLinkResourceList": { "description": "Paged list of private link resources", - "required": ["value"], + "required": [ + "value" + ], "type": "object", "properties": { "count": { @@ -1709,7 +1778,10 @@ }, "reason": { "description": "The reason the name is not available.", - "enum": ["Invalid", "AlreadyExists"], + "enum": [ + "Invalid", + "AlreadyExists" + ], "type": "string", "x-ms-enum": { "name": "reason", @@ -1823,7 +1895,9 @@ }, "security": [ { - "azure_auth": ["user_impersonation"] + "azure_auth": [ + "user_impersonation" + ] } ], "tags": [] From c9ba260e59d67470aee5066e11e2249ecf5b3b32 Mon Sep 17 00:00:00 2001 From: Anthony Noakes Date: Tue, 2 Feb 2021 09:07:41 -0800 Subject: [PATCH 3/3] Purview Manager Schemas --- .../readme.azureresourceschema.md | 24 +++++++++++++++++++ .../purview/resource-manager/readme.md | 1 + 2 files changed, 25 insertions(+) create mode 100644 specification/purview/resource-manager/readme.azureresourceschema.md diff --git a/specification/purview/resource-manager/readme.azureresourceschema.md b/specification/purview/resource-manager/readme.azureresourceschema.md new file mode 100644 index 000000000000..4da385514455 --- /dev/null +++ b/specification/purview/resource-manager/readme.azureresourceschema.md @@ -0,0 +1,24 @@ +## AzureResourceSchema + +These settings apply only when `--azureresourceschema` is specified on the command line. + +### AzureResourceSchema multi-api + +``` yaml $(azureresourceschema) && $(multiapi) +batch: + - tag: schema-purview-2020-12-01-preview + +``` + +Please also specify `--azureresourceschema-folder=`. + +### Tag: schema-purview-2020-12-01-preview and azureresourceschema + +``` yaml $(tag) == 'schema-purview-2020-12-01-preview' && $(azureresourceschema) +output-folder: $(azureresourceschema-folder)/schemas + +# all the input files in this apiVersion +input-file: + - Microsoft.Purview/preview/2020-12-01-preview/purview.json + +``` diff --git a/specification/purview/resource-manager/readme.md b/specification/purview/resource-manager/readme.md index 5ba1fd5d77dd..7012794e56ef 100644 --- a/specification/purview/resource-manager/readme.md +++ b/specification/purview/resource-manager/readme.md @@ -52,6 +52,7 @@ This is not used by Autorest itself. swagger-to-sdk: - repo: azure-sdk-for-python-track2 - repo: azure-sdk-for-go + - repo: azure-resource-manager-schemas ```