From b35ad91c2af1cb8d48c15bc6c2fd24a26bd139c8 Mon Sep 17 00:00:00 2001 From: Vitaliy Fedonkin Date: Wed, 30 Dec 2020 01:31:54 -0800 Subject: [PATCH] Api Management - make /tenant endpoints ARM compliant in 2020-06-01-preview version (#11549) * Adds base for updating Microsoft.ApiManagement from version stable/2019-12-01 to version 2020-06-01-preview * Updates readme * Updates API version in new specs and examples * Add support in API Management for Availability Zones (#10284) * apim in azs * fix prettier check * PATCH should return 200 OK (#10328) * add support for PATCH returning 200 OK * CI fixes prettier fix CI fixes part 2 * Password no longer a mandatory property when uploading Certificates * add missing x-ms-odata extension for filter support * +gatewayhostnameconfiguration protocol changes (#10292) * [2020-06-01-preview] Update Oauth Server secrets Contract (#10602) * Oauth server secrets contract * fix azureMonitor enum * API Management Service Deleted Services Resource (#10607) * API Management Service Deleted Services Resource * Path fix * Lint + custom-words fixes * Location URI parameter for deletedservices Resource * GET for deletedservices by service name * Remove resourceGroupName from resource path * fixes * schema for purge operation * perttier applied * 204 response code added Co-authored-by: REDMOND\glfeokti * OperationNameFormat property added to Diagnostic contract (#10641) * OperationNameFormat property added to Diagnostic contract * add azuremonitor to update contract Co-authored-by: REDMOND\glfeokti * [Microsoft.ApiManagement][2020-06-01-preview] Change Network Status response contract (#10331) * Change Network Status response contract * Update examples for network status contract * ApiManagement - tenant/settings endpoints * ApiManagement - tenant/settings endpoints fix * ApiManagement - tenant/settings endpoints fix prettier * ApiManagement - tenant/settings endpoints fix 3 * ApiManagement - tenant/settings endpoints fix 4 * ApiManagement - tenant/settings endpoints fix 5 Co-authored-by: Samir Solanki Co-authored-by: maksimkim Co-authored-by: promoisha Co-authored-by: REDMOND\glfeokti Co-authored-by: RupengLiu Co-authored-by: vfedonkin --- .../2020-06-01-preview/apimanagement.json | 18 +- .../2020-06-01-preview/apimsettings.json | 144 ++++++++++++ .../2020-06-01-preview/apimtenant.json | 208 +++++++++--------- .../2020-06-01-preview/definitions.json | 132 ++++++++++- .../ApiManagementCreateTenantAccess.json | 27 +++ .../ApiManagementGetTenantAccess.json | 8 +- .../ApiManagementGetTenantSettings.json | 28 +++ .../ApiManagementListTenantAccess.json | 25 +++ .../ApiManagementListTenantSettings.json | 32 +++ .../ApiManagementUpdateTenantAccess.json | 8 +- .../apimanagement/resource-manager/readme.md | 1 + 11 files changed, 527 insertions(+), 104 deletions(-) create mode 100644 specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/apimsettings.json create mode 100644 specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementCreateTenantAccess.json create mode 100644 specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementGetTenantSettings.json create mode 100644 specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementListTenantAccess.json create mode 100644 specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementListTenantSettings.json diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/apimanagement.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/apimanagement.json index f7b18b21346b..b0b2436be1fa 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/apimanagement.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/apimanagement.json @@ -150,7 +150,8 @@ "required": true, "type": "string", "enum": [ - "access" + "access", + "getAccess" ], "x-ms-enum": { "modelAsString": true, @@ -159,6 +160,21 @@ "description": "The identifier of the Access configuration.", "x-ms-parameter-location": "method" }, + "SettingsParameter": { + "name": "settingsType", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "public" + ], + "x-ms-enum": { + "modelAsString": true, + "name": "settingsTypeName" + }, + "description": "The identifier of the settings.", + "x-ms-parameter-location": "method" + }, "ApiIdParameter": { "name": "apiId", "in": "path", diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/apimsettings.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/apimsettings.json new file mode 100644 index 000000000000..461cc9a5dffe --- /dev/null +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/apimsettings.json @@ -0,0 +1,144 @@ +{ + "swagger": "2.0", + "info": { + "title": "ApiManagementClient", + "description": "Use these REST APIs for performing operations on settings entity associated with your Azure API Management deployment. Using this entity you can manage properties and configuration that apply to the entire API Management service instance.", + "version": "2020-06-01-preview" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow.", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/settings": { + "get": { + "tags": [ + "TenantSettings" + ], + "operationId": "TenantSettings_ListByService", + "description": "Public settings.", + "x-ms-examples": { + "ApiManagementListTenantSettings": { + "$ref": "./examples/ApiManagementListTenantSettings.json" + } + }, + "parameters": [ + { + "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" + }, + { + "name": "$filter", + "in": "query", + "required": false, + "type": "string", + "description": "Not used" + }, + { + "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Lists a collection of TenantSettings entities.", + "schema": { + "$ref": "./definitions.json#/definitions/TenantSettingsCollection" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "./apimanagement.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-odata": "./definitions.json#/definitions/TenantSettingsContract" + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/settings/{settingsType}": { + "get": { + "tags": [ + "TenantSettings" + ], + "operationId": "TenantSettings_Get", + "description": "Get tenant settings.", + "x-ms-examples": { + "ApiManagementGetTenantSettings": { + "$ref": "./examples/ApiManagementGetTenantSettings.json" + } + }, + "parameters": [ + { + "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/SettingsParameter" + } + ], + "responses": { + "200": { + "description": "Tenant Settings.", + "schema": { + "$ref": "./definitions.json#/definitions/TenantSettingsContract" + }, + "headers": { + "ETag": { + "description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.", + "type": "string" + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "./apimanagement.json#/definitions/ErrorResponse" + } + } + } + } + } + }, + "definitions": {}, + "parameters": {} +} diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/apimtenant.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/apimtenant.json index 9450224bdf04..c1d6edd49800 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/apimtenant.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/apimtenant.json @@ -34,6 +34,59 @@ } }, "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant": { + "get": { + "tags": [ + "TenantAccess" + ], + "operationId": "TenantAccess_ListByService", + "description": "Returns list of access infos - for Git and Management endpoints.", + "x-ms-examples": { + "ApiManagementListTenantAccess": { + "$ref": "./examples/ApiManagementListTenantAccess.json" + } + }, + "parameters": [ + { + "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" + }, + { + "name": "$filter", + "in": "query", + "required": false, + "type": "string", + "description": "Not used" + }, + { + "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Lists a collection of TenantAccessInfo entities.", + "schema": { + "$ref": "./definitions.json#/definitions/AccessInformationCollection" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "./apimanagement.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-odata": "./definitions.json#/definitions/AccessInformationContract" + } + }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}": { "head": { "tags": [ @@ -130,15 +183,15 @@ } } }, - "patch": { + "put": { "tags": [ "TenantAccess" ], - "operationId": "TenantAccess_Update", + "operationId": "TenantAccess_Create", "description": "Update tenant access information details.", "x-ms-examples": { - "ApiManagementUpdateTenantAccess": { - "$ref": "./examples/ApiManagementUpdateTenantAccess.json" + "ApiManagementCreateTenantAccess": { + "$ref": "./examples/ApiManagementCreateTenantAccess.json" } }, "parameters": [ @@ -153,7 +206,7 @@ "in": "body", "required": true, "schema": { - "$ref": "./definitions.json#/definitions/AccessInformationUpdateParameters" + "$ref": "./definitions.json#/definitions/AccessInformationCreateParameters" }, "description": "Parameters supplied to retrieve the Tenant Access Information." }, @@ -190,18 +243,16 @@ } } } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/regeneratePrimaryKey": { - "post": { + }, + "patch": { "tags": [ "TenantAccess" ], - "operationId": "TenantAccess_RegeneratePrimaryKey", - "description": "Regenerate primary access key", + "operationId": "TenantAccess_Update", + "description": "Update tenant access information details.", "x-ms-examples": { - "ApiManagementTenantAccessRegenerateKey": { - "$ref": "./examples/ApiManagementTenantAccessRegenerateKey.json" + "ApiManagementUpdateTenantAccess": { + "$ref": "./examples/ApiManagementUpdateTenantAccess.json" } }, "parameters": [ @@ -212,18 +263,39 @@ "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { - "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "./definitions.json#/definitions/AccessInformationUpdateParameters" + }, + "description": "Parameters supplied to retrieve the Tenant Access Information." }, { - "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" + "$ref": "./apimanagement.json#/parameters/AccessParameter" }, { - "$ref": "./apimanagement.json#/parameters/AccessParameter" + "$ref": "./apimanagement.json#/parameters/IfMatchRequiredParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" } ], "responses": { - "204": { - "description": "The primary key was successfully regenerated." + "200": { + "description": "Tenant Access information was updated successfully.", + "schema": { + "$ref": "./definitions.json#/definitions/AccessInformationContract" + }, + "headers": { + "ETag": { + "description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.", + "type": "string" + } + } }, "default": { "description": "Error response describing why the operation failed.", @@ -234,13 +306,13 @@ } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/regenerateSecondaryKey": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/regeneratePrimaryKey": { "post": { "tags": [ "TenantAccess" ], - "operationId": "TenantAccess_RegenerateSecondaryKey", - "description": "Regenerate secondary access key", + "operationId": "TenantAccess_RegeneratePrimaryKey", + "description": "Regenerate primary access key", "x-ms-examples": { "ApiManagementTenantAccessRegenerateKey": { "$ref": "./examples/ApiManagementTenantAccessRegenerateKey.json" @@ -265,7 +337,7 @@ ], "responses": { "204": { - "description": "The secondary key was successfully regenerated." + "description": "The primary key was successfully regenerated." }, "default": { "description": "Error response describing why the operation failed.", @@ -276,16 +348,16 @@ } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/listSecrets": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/regenerateSecondaryKey": { "post": { "tags": [ "TenantAccess" ], - "operationId": "TenantAccess_ListSecrets", - "description": "Get tenant access information details.", + "operationId": "TenantAccess_RegenerateSecondaryKey", + "description": "Regenerate secondary access key", "x-ms-examples": { - "ApiManagementListSecretsTenantAccess": { - "$ref": "./examples/ApiManagementListSecretsTenantAccess.json" + "ApiManagementTenantAccessRegenerateKey": { + "$ref": "./examples/ApiManagementTenantAccessRegenerateKey.json" } }, "parameters": [ @@ -306,17 +378,8 @@ } ], "responses": { - "200": { - "description": "Tenant Access information.", - "schema": { - "$ref": "./definitions.json#/definitions/AccessInformationContract" - }, - "headers": { - "ETag": { - "description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.", - "type": "string" - } - } + "204": { + "description": "The secondary key was successfully regenerated." }, "default": { "description": "Error response describing why the operation failed.", @@ -327,16 +390,16 @@ } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/git": { - "get": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/listSecrets": { + "post": { "tags": [ - "TenantAccessGit" + "TenantAccess" ], - "operationId": "TenantAccessGit_Get", - "description": "Gets the Git access configuration for the tenant. Without secrets.", + "operationId": "TenantAccess_ListSecrets", + "description": "Get tenant access information details.", "x-ms-examples": { - "ApiManagementGetTenantAccess": { - "$ref": "./examples/ApiManagementGetTenantAccess.json" + "ApiManagementListSecretsTenantAccess": { + "$ref": "./examples/ApiManagementListSecretsTenantAccess.json" } }, "parameters": [ @@ -358,9 +421,9 @@ ], "responses": { "200": { - "description": "Git Access Information for the Service.", + "description": "Tenant Access information.", "schema": { - "$ref": "./definitions.json#/definitions/AccessInformationContract" + "$ref": "./definitions.json#/definitions/AccessInformationSecretsContract" }, "headers": { "ETag": { @@ -462,57 +525,6 @@ } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/git/listSecrets": { - "post": { - "tags": [ - "TenantAccessGit" - ], - "operationId": "TenantAccessGit_ListSecrets", - "description": "Gets the Git access configuration for the tenant.", - "x-ms-examples": { - "ApiManagementListSecretsTenantAccess": { - "$ref": "./examples/ApiManagementListSecretsTenantAccess.json" - } - }, - "parameters": [ - { - "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" - }, - { - "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "./apimanagement.json#/parameters/AccessParameter" - } - ], - "responses": { - "200": { - "description": "Git Access Information for the Service.", - "schema": { - "$ref": "./definitions.json#/definitions/AccessInformationContract" - }, - "headers": { - "ETag": { - "description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.", - "type": "string" - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "./apimanagement.json#/definitions/ErrorResponse" - } - } - } - } - }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/deploy": { "post": { "tags": [ diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/definitions.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/definitions.json index 776c411609f3..574ea3bcbef6 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/definitions.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/definitions.json @@ -35,11 +35,65 @@ }, "paths": {}, "definitions": { + "AccessInformationCollection": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/AccessInformationContract" + }, + "description": "Page values.", + "readOnly": true + }, + "nextLink": { + "type": "string", + "description": "Next page link if any.", + "readOnly": true + } + }, + "description": "Paged AccessInformation list representation." + }, "AccessInformationContract": { + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/AccessInformationContractProperties", + "description": "AccessInformation entity contract properties." + } + }, + "allOf": [ + { + "$ref": "./apimanagement.json#/definitions/Resource" + } + ], + "description": "Tenant Settings." + }, + "AccessInformationContractProperties": { "properties": { "id": { "type": "string", - "description": "Identifier." + "description": "Access Information type ('access' or 'gitAccess')" + }, + "principalId": { + "type": "string", + "description": "Principal (User) Identifier." + }, + "enabled": { + "type": "boolean", + "description": "Determines whether direct access is enabled." + } + }, + "description": "Tenant access information contract of the API Management service." + }, + "AccessInformationSecretsContract": { + "properties": { + "id": { + "type": "string", + "description": "Access Information type ('access' or 'gitAccess')" + }, + "principalId": { + "type": "string", + "description": "Principal (User) Identifier." }, "primaryKey": { "type": "string", @@ -56,6 +110,37 @@ }, "description": "Tenant access information contract of the API Management service." }, + "AccessInformationCreateParameters": { + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/AccessInformationCreateParameterProperties", + "description": "Tenant access information update parameter properties." + } + }, + "description": "Tenant access information update parameters." + }, + "AccessInformationCreateParameterProperties": { + "properties": { + "principalId": { + "type": "string", + "description": "Principal (User) Identifier." + }, + "primaryKey": { + "type": "string", + "description": "Primary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value." + }, + "secondaryKey": { + "type": "string", + "description": "Secondary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value." + }, + "enabled": { + "type": "boolean", + "description": "Determines whether direct access is enabled." + } + }, + "description": "Tenant access information update parameters of the API Management service" + }, "AccessInformationUpdateParameters": { "properties": { "properties": { @@ -75,6 +160,51 @@ }, "description": "Tenant access information update parameters of the API Management service" }, + "TenantSettingsCollection": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/TenantSettingsContract" + }, + "description": "Page values.", + "readOnly": true + }, + "nextLink": { + "type": "string", + "description": "Next page link if any.", + "readOnly": true + } + }, + "description": "Paged AccessInformation list representation." + }, + "TenantSettingsContract": { + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/TenantSettingsContractProperties", + "description": "TenantSettings entity contract properties." + } + }, + "allOf": [ + { + "$ref": "./apimanagement.json#/definitions/Resource" + } + ], + "description": "Tenant Settings." + }, + "TenantSettingsContractProperties": { + "properties": { + "settings": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Tenant settings" + } + }, + "description": "Tenant access information contract of the API Management service." + }, "ApiCollection": { "properties": { "value": { diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementCreateTenantAccess.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementCreateTenantAccess.json new file mode 100644 index 000000000000..b6a79a2e4e1d --- /dev/null +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementCreateTenantAccess.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "serviceName": "apimService1", + "resourceGroupName": "rg1", + "api-version": "2020-06-01-preview", + "subscriptionId": "subid", + "If-Match": "*", + "accessName": "access", + "parameters": { + "properties": { + "enabled": true + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tenant/access", + "type": "Microsoft.ApiManagement/service/tenant", + "name": "access", + "properties": { + "enabled": true + } + } + } + } +} diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementGetTenantAccess.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementGetTenantAccess.json index 93932543df7f..98a440219a79 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementGetTenantAccess.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementGetTenantAccess.json @@ -9,8 +9,12 @@ "responses": { "200": { "body": { - "id": "5600b59375ff190048030003", - "enabled": true + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tenant/access", + "type": "Microsoft.ApiManagement/service/tenant", + "name": "access", + "properties": { + "enabled": true + } } } } diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementGetTenantSettings.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementGetTenantSettings.json new file mode 100644 index 000000000000..9b2c010a8466 --- /dev/null +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementGetTenantSettings.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "serviceName": "apimService1", + "resourceGroupName": "rg1", + "api-version": "2020-06-01-preview", + "subscriptionId": "subid", + "settingsType": "public" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/settings/public", + "type": "Microsoft.ApiManagement/service/settings", + "name": "public", + "properties": { + "settings": { + "CustomPortalSettings.UserRegistrationTerms": null, + "CustomPortalSettings.UserRegistrationTermsEnabled": "False", + "CustomPortalSettings.UserRegistrationTermsConsentRequired": "False", + "CustomPortalSettings.DelegationEnabled": "False", + "CustomPortalSettings.DelegationUrl": "", + "CustomPortalSettings.DelegatedSubscriptionEnabled": "False" + } + } + } + } + } +} diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementListTenantAccess.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementListTenantAccess.json new file mode 100644 index 000000000000..e581fa5fa72d --- /dev/null +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementListTenantAccess.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "serviceName": "apimService1", + "resourceGroupName": "rg1", + "api-version": "2020-06-01-preview", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tenant/access", + "type": "Microsoft.ApiManagement/service/tenant", + "name": "access", + "properties": { + "enabled": true + } + } + ], + "nextLink": "" + } + } + } +} diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementListTenantSettings.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementListTenantSettings.json new file mode 100644 index 000000000000..17cff6595529 --- /dev/null +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementListTenantSettings.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "serviceName": "apimService1", + "resourceGroupName": "rg1", + "api-version": "2020-06-01-preview", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/settings/public", + "type": "Microsoft.ApiManagement/service/settings", + "name": "public", + "properties": { + "settings": { + "CustomPortalSettings.UserRegistrationTerms": null, + "CustomPortalSettings.UserRegistrationTermsEnabled": "False", + "CustomPortalSettings.UserRegistrationTermsConsentRequired": "False", + "CustomPortalSettings.DelegationEnabled": "False", + "CustomPortalSettings.DelegationUrl": "", + "CustomPortalSettings.DelegatedSubscriptionEnabled": "False" + } + } + } + ], + "nextLink": "" + } + } + } +} diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementUpdateTenantAccess.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementUpdateTenantAccess.json index 9649d5b2d0bb..b6a79a2e4e1d 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementUpdateTenantAccess.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementUpdateTenantAccess.json @@ -15,8 +15,12 @@ "responses": { "200": { "body": { - "id": "5600b59375ff190048030003", - "enabled": true + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tenant/access", + "type": "Microsoft.ApiManagement/service/tenant", + "name": "access", + "properties": { + "enabled": true + } } } } diff --git a/specification/apimanagement/resource-manager/readme.md b/specification/apimanagement/resource-manager/readme.md index d5e0e3ce6c1f..4931f59ff409 100644 --- a/specification/apimanagement/resource-manager/readme.md +++ b/specification/apimanagement/resource-manager/readme.md @@ -69,6 +69,7 @@ input-file: - Microsoft.ApiManagement/preview/2020-06-01-preview/apimquotas.json - Microsoft.ApiManagement/preview/2020-06-01-preview/apimregions.json - Microsoft.ApiManagement/preview/2020-06-01-preview/apimreports.json + - Microsoft.ApiManagement/preview/2020-06-01-preview/apimsettings.json - Microsoft.ApiManagement/preview/2020-06-01-preview/apimsubscriptions.json - Microsoft.ApiManagement/preview/2020-06-01-preview/apimtagresources.json - Microsoft.ApiManagement/preview/2020-06-01-preview/apimtags.json