From abd4f9a3cf0228877173a5aeb455256431da301e Mon Sep 17 00:00:00 2001 From: Alexander Zaslonov Date: Tue, 1 Feb 2022 09:11:04 -0800 Subject: [PATCH] Added CORS and CSP configuration resources (#16822) * Added CORS and CSP settings resources. * Added missing definitions. * Added suppression of R4009 for apimportalsettings.json. * Ran Prettier. * Renamed definitions. * Fixed references. * Updated examples. * Reversed change. * Created new resource for portal settings. * Added list example. * Added missing collection contract. * Added missing example. Cleaned up old ones. * Fixed references. * Fixed examples * Fixed version. * Added custom words. Fixed linting. * Fixes. * Fixes. * Fixes. * Fixes. * Fixes. * Fixes. * Fixes. * Fixes. * Fixes. * Fixes. * Fixes * Fixes. * Fixes. * Fixes * Fixes * Removed conflicting constraint. * Updated readme.go.md. * Reverted removing the restriction. * Revert "Reverted removing the restriction." This reverts commit 72d070f6ccc8231e4d4c9f22ac3a9c3090a545aa. * Removed duplicate. * Addressing PR comments. --- custom-words.txt | 1 + .../2021-12-01-preview/apimanagement.json | 10 + .../2021-12-01-preview/apimportalconfigs.json | 288 ++++++++++++++++++ .../apimportalsettings.json | 14 + .../2021-12-01-preview/apimsettings.json | 2 + .../2021-12-01-preview/definitions.json | 175 +++++++++++ .../ApiManagementHeadPortalConfig.json | 16 + .../ApiManagementListPortalConfig.json | 52 ++++ .../examples/ApiManagementPortalConfig.json | 48 +++ .../ApiManagementUpdatePortalConfig.json | 81 +++++ .../apimanagement/resource-manager/readme.md | 6 +- 11 files changed, 692 insertions(+), 1 deletion(-) create mode 100644 specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimportalconfigs.json create mode 100644 specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementHeadPortalConfig.json create mode 100644 specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementListPortalConfig.json create mode 100644 specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalConfig.json create mode 100644 specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementUpdatePortalConfig.json diff --git a/custom-words.txt b/custom-words.txt index 87ccbffef54f..10c2ddba9daa 100644 --- a/custom-words.txt +++ b/custom-words.txt @@ -1526,6 +1526,7 @@ polyline poolusagemetrics popreceipt portalsettings +portalconfigs postbackup Postgre Postgres diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimanagement.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimanagement.json index 70395516937f..9d4f6d0adf15 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimanagement.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimanagement.json @@ -809,6 +809,16 @@ "minLength": 1, "maxLength": 80, "x-ms-parameter-location": "method" + }, + "PortalConfigIdParameter": { + "name": "portalConfigId", + "in": "path", + "required": true, + "type": "string", + "description": "Portal configuration identifier.", + "minLength": 1, + "maxLength": 80, + "x-ms-parameter-location": "method" } } } diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimportalconfigs.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimportalconfigs.json new file mode 100644 index 000000000000..1a0d9ed566de --- /dev/null +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimportalconfigs.json @@ -0,0 +1,288 @@ +{ + "swagger": "2.0", + "info": { + "title": "ApiManagementClient", + "description": "Use this REST API to perform operations on the developer portal configuration.", + "version": "2021-12-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}/portalconfigs": { + "get": { + "tags": [ + "PortalConfig" + ], + "operationId": "PortalConfig_ListByService", + "description": "Lists the developer portal configurations.", + "x-ms-examples": { + "ApiManagementListPortalConfig": { + "$ref": "./examples/ApiManagementListPortalConfig.json" + } + }, + "parameters": [ + { + "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "The developer portal configuration.", + "schema": { + "$ref": "./definitions.json#/definitions/PortalConfigCollection" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "./apimanagement.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId}": { + "head": { + "tags": [ + "PortalConfig" + ], + "operationId": "PortalConfig_GetEntityTag", + "description": "Gets the entity state (Etag) version of the developer portal configuration.", + "x-ms-examples": { + "ApiManagementHeadPortalConfig": { + "$ref": "./examples/ApiManagementHeadPortalConfig.json" + } + }, + "parameters": [ + { + "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/PortalConfigIdParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Operation completed successfully.", + "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" + } + } + } + }, + "get": { + "tags": [ + "PortalConfig" + ], + "operationId": "PortalConfig_Get", + "description": "Get the developer portal configuration.", + "x-ms-examples": { + "ApiManagementPortalConfig": { + "$ref": "./examples/ApiManagementPortalConfig.json" + } + }, + "parameters": [ + { + "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/PortalConfigIdParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The developer portal configuration.", + "schema": { + "$ref": "./definitions.json#/definitions/PortalConfigContract" + }, + "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" + } + } + } + }, + "patch": { + "tags": [ + "PortalConfig" + ], + "operationId": "PortalConfig_Update", + "description": "Update the developer portal configuration.", + "x-ms-examples": { + "ApiManagementUpdatePortalConfig": { + "$ref": "./examples/ApiManagementUpdatePortalConfig.json" + } + }, + "parameters": [ + { + "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/PortalConfigIdParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/IfMatchRequiredParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "./definitions.json#/definitions/PortalConfigContract" + }, + "description": "Update the developer portal configuration." + } + ], + "responses": { + "200": { + "description": "Operation completed successfully.", + "schema": { + "$ref": "./definitions.json#/definitions/PortalConfigContract" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "./apimanagement.json#/definitions/ErrorResponse" + } + } + } + }, + "put": { + "tags": [ + "PortalConfig" + ], + "operationId": "PortalConfig_CreateOrUpdate", + "description": "Create or update the developer portal configuration.", + "x-ms-examples": { + "ApiManagementUpdatePortalConfig": { + "$ref": "./examples/ApiManagementUpdatePortalConfig.json" + } + }, + "parameters": [ + { + "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/PortalConfigIdParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/IfMatchRequiredParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "./definitions.json#/definitions/PortalConfigContract" + }, + "description": "Update the developer portal configuration." + } + ], + "responses": { + "200": { + "description": "Operation completed successfully.", + "schema": { + "$ref": "./definitions.json#/definitions/PortalConfigContract" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "./apimanagement.json#/definitions/ErrorResponse" + } + } + } + } + } + }, + "definitions": {} +} diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimportalsettings.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimportalsettings.json index 7ee746826fa5..9ef8d0d5a9ff 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimportalsettings.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimportalsettings.json @@ -36,6 +36,7 @@ "paths": { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings": { "get": { + "deprecated": true, "tags": [ "PortalSettings" ], @@ -78,6 +79,7 @@ }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin": { "head": { + "deprecated": true, "tags": [ "SignInSettings" ], @@ -121,6 +123,7 @@ } }, "get": { + "deprecated": true, "tags": [ "SignInSettings" ], @@ -167,6 +170,7 @@ } }, "patch": { + "deprecated": true, "tags": [ "SignInSettings" ], @@ -216,6 +220,7 @@ } }, "put": { + "deprecated": true, "tags": [ "SignInSettings" ], @@ -270,6 +275,7 @@ }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup": { "head": { + "deprecated": true, "tags": [ "SignUpSettings" ], @@ -313,6 +319,7 @@ } }, "get": { + "deprecated": true, "tags": [ "SignUpSettings" ], @@ -359,6 +366,7 @@ } }, "patch": { + "deprecated": true, "tags": [ "SignUpSettings" ], @@ -408,6 +416,7 @@ } }, "put": { + "deprecated": true, "tags": [ "SignUpSettings" ], @@ -462,6 +471,7 @@ }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation": { "head": { + "deprecated": true, "tags": [ "DelegationSettings" ], @@ -505,6 +515,7 @@ } }, "get": { + "deprecated": true, "tags": [ "DelegationSettings" ], @@ -551,6 +562,7 @@ } }, "patch": { + "deprecated": true, "tags": [ "DelegationSettings" ], @@ -600,6 +612,7 @@ } }, "put": { + "deprecated": true, "tags": [ "DelegationSettings" ], @@ -654,6 +667,7 @@ }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation/listSecrets": { "post": { + "deprecated": true, "tags": [ "DelegationSettings" ], diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimsettings.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimsettings.json index a8de8a0e33fc..69b9f59caba7 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimsettings.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimsettings.json @@ -36,6 +36,7 @@ "paths": { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/settings": { "get": { + "deprecated": true, "tags": [ "TenantSettings" ], @@ -89,6 +90,7 @@ }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/settings/{settingsType}": { "get": { + "deprecated": true, "tags": [ "TenantSettings" ], diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json index 05d9fe7a125c..c342110c7f52 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json @@ -4035,6 +4035,181 @@ }, "description": "A collection of resources." }, + "PortalConfigCollection": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/PortalConfigContract" + }, + "description": "The developer portal configurations." + }, + "nextLink": { + "type": "string", + "description": "Next page link if any.", + "readOnly": true + } + }, + "description": "The collection of the developer portal configurations." + }, + "PortalConfigContract": { + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/PortalConfigProperties", + "description": "The developer portal configuration contract properties." + } + }, + "allOf": [ + { + "$ref": "./../../../../../common-types/resource-management/v2/types.json#/definitions/Resource" + } + ], + "description": "The developer portal configuration contract." + }, + "PortalConfigProperties": { + "type": "object", + "properties": { + "enableBasicAuth": { + "type": "boolean", + "description": "Enable or disable Basic authentication method.", + "default": true + }, + "signin": { + "type": "object", + "properties": { + "require": { + "type": "boolean", + "description": "Redirect anonymous users to the sign-in page.", + "default": false + } + } + }, + "signup": { + "type": "object", + "properties": { + "termsOfService": { + "type": "object", + "$ref": "#/definitions/PortalConfigTermsOfServiceProperties", + "description": "Terms of service settings." + } + } + }, + "delegation": { + "type": "object", + "$ref": "#/definitions/PortalConfigDelegationProperties", + "description": "The developer portal delegation settings." + }, + "cors": { + "type": "object", + "$ref": "#/definitions/PortalConfigCorsProperties", + "description": "The developer portal Cross-Origin Resource Sharing (CORS) settings." + }, + "csp": { + "type": "object", + "$ref": "#/definitions/PortalConfigCspProperties", + "description": "The developer portal Content Security Policy (CSP) settings." + } + }, + "description": "The developer portal configuration contract properties." + }, + "PortalConfigDelegationProperties": { + "type": "object", + "properties": { + "delegateRegistration": { + "type": "boolean", + "description": "Enable or disable delegation for user registration.", + "default": false + }, + "delegateSubscription": { + "type": "boolean", + "description": "Enable or disable delegation for product subscriptions.", + "default": false + }, + "delegationUrl": { + "type": "string", + "description": "A delegation endpoint URL." + }, + "validationKey": { + "x-ms-secret": true, + "type": "string", + "description": "A base64-encoded validation key to ensure requests originate from Azure API Management service." + } + } + }, + "PortalConfigTermsOfServiceProperties": { + "type": "object", + "properties": { + "text": { + "type": "string", + "description": "A terms of service text." + }, + "requireConsent": { + "type": "boolean", + "description": "Ask user for consent to the terms of service.", + "default": false + } + }, + "description": "Terms of service contract properties." + }, + "PortalConfigCorsProperties": { + "type": "object", + "properties": { + "allowedOrigins": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Allowed origins, e.g. `https://trusted.com`." + } + }, + "description": "The developer portal Cross-Origin Resource Sharing (CORS) settings." + }, + "PortalConfigCspProperties": { + "type": "object", + "properties": { + "mode": { + "type": "string", + "description": "The mode of the developer portal Content Security Policy (CSP).", + "enum": [ + "enabled", + "disabled", + "reportOnly" + ], + "default": "disabled", + "x-ms-enum": { + "modelAsString": true, + "name": "PortalSettingsCspMode", + "values": [ + { + "value": "enabled", + "description": "The browser will block requests not matching allowed origins." + }, + { + "value": "disabled", + "description": "The browser will not apply the origin restrictions." + }, + { + "value": "reportOnly", + "description": "The browser will report requests not matching allowed origins without blocking them." + } + ] + } + }, + "reportUri": { + "type": "string", + "description": "The URL used by the browser to report CSP violations." + }, + "allowedSources": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Allowed sources, e.g. `*.trusted.com`, `trusted.com`, `https://`." + } + }, + "description": "The developer portal Content Security Policy (CSP) settings." + }, "PortalDelegationSettings": { "properties": { "properties": { diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementHeadPortalConfig.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementHeadPortalConfig.json new file mode 100644 index 000000000000..45b5a04bf2ab --- /dev/null +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementHeadPortalConfig.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "serviceName": "apimService1", + "resourceGroupName": "rg1", + "api-version": "2021-12-01-preview", + "subscriptionId": "subid", + "portalConfigId": "default" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + } +} diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementListPortalConfig.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementListPortalConfig.json new file mode 100644 index 000000000000..4de1e054f853 --- /dev/null +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementListPortalConfig.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "serviceName": "apimService1", + "resourceGroupName": "rg1", + "api-version": "2021-12-01-preview", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalconfigs/default", + "type": "Microsoft.ApiManagement/service/portalconfigs", + "name": "default", + "properties": { + "enableBasicAuth": true, + "signin": { + "require": false + }, + "signup": { + "termsOfService": { + "text": "I agree to the service terms and conditions.", + "requireConsent": false + } + }, + "delegation": { + "delegateRegistration": false, + "delegateSubscription": false, + "delegationUrl": null, + "validationKey": null + }, + "csp": { + "mode": "reportOnly", + "reportUri": "https://report.contoso.com", + "allowedSources": [ + "*.contoso.com" + ] + }, + "cors": { + "allowedOrigins": [ + "https://contoso.com" + ] + } + } + } + ], + "nextLink": "" + } + } + } +} diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalConfig.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalConfig.json new file mode 100644 index 000000000000..4fcefe273848 --- /dev/null +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalConfig.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "serviceName": "apimService1", + "resourceGroupName": "rg1", + "api-version": "2021-12-01-preview", + "subscriptionId": "subid", + "portalConfigId": "default" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalconfigs/default", + "type": "Microsoft.ApiManagement/service/portalconfigs", + "name": "default", + "properties": { + "enableBasicAuth": true, + "signin": { + "require": false + }, + "signup": { + "termsOfService": { + "text": "I agree to the service terms and conditions.", + "requireConsent": false + } + }, + "delegation": { + "delegateRegistration": false, + "delegateSubscription": false, + "delegationUrl": null, + "validationKey": null + }, + "csp": { + "mode": "reportOnly", + "reportUri": "https://report.contoso.com", + "allowedSources": [ + "*.contoso.com" + ] + }, + "cors": { + "allowedOrigins": [ + "https://contoso.com" + ] + } + } + } + } + } +} diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementUpdatePortalConfig.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementUpdatePortalConfig.json new file mode 100644 index 000000000000..fd3f4d0c7c6e --- /dev/null +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementUpdatePortalConfig.json @@ -0,0 +1,81 @@ +{ + "parameters": { + "serviceName": "apimService1", + "resourceGroupName": "rg1", + "api-version": "2021-12-01-preview", + "subscriptionId": "subid", + "portalConfigId": "default", + "If-Match": "*", + "parameters": { + "properties": { + "enableBasicAuth": true, + "signin": { + "require": false + }, + "signup": { + "termsOfService": { + "text": "I agree to the service terms and conditions.", + "requireConsent": false + } + }, + "delegation": { + "delegateRegistration": false, + "delegateSubscription": false, + "delegationUrl": null, + "validationKey": null + }, + "csp": { + "mode": "reportOnly", + "reportUri": "https://report.contoso.com", + "allowedSources": [ + "*.contoso.com" + ] + }, + "cors": { + "allowedOrigins": [ + "https://contoso.com" + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalconfigs/default", + "type": "Microsoft.ApiManagement/service/portalconfigs", + "name": "default", + "properties": { + "enableBasicAuth": true, + "signin": { + "require": false + }, + "signup": { + "termsOfService": { + "text": "I agree to the service terms and conditions.", + "requireConsent": false + } + }, + "delegation": { + "delegateRegistration": false, + "delegateSubscription": false, + "delegationUrl": null, + "validationKey": null + }, + "csp": { + "mode": "reportOnly", + "reportUri": "https://report.contoso.com", + "allowedSources": [ + "*.contoso.com" + ] + }, + "cors": { + "allowedOrigins": [ + "https://contoso.com" + ] + } + } + } + } + } +} diff --git a/specification/apimanagement/resource-manager/readme.md b/specification/apimanagement/resource-manager/readme.md index 3e75b2b1daf5..3cb1ddd69d6e 100644 --- a/specification/apimanagement/resource-manager/readme.md +++ b/specification/apimanagement/resource-manager/readme.md @@ -73,6 +73,7 @@ input-file: - Microsoft.ApiManagement/preview/2021-12-01-preview/apimpolicyfragments.json - Microsoft.ApiManagement/preview/2021-12-01-preview/apimportalrevisions.json - Microsoft.ApiManagement/preview/2021-12-01-preview/apimportalsettings.json + - Microsoft.ApiManagement/preview/2021-12-01-preview/apimportalconfigs.json - Microsoft.ApiManagement/preview/2021-12-01-preview/apimprivatelink.json - Microsoft.ApiManagement/preview/2021-12-01-preview/apimproducts.json - Microsoft.ApiManagement/preview/2021-12-01-preview/apimproductsByTags.json @@ -777,7 +778,10 @@ directive: from: apimprivatelink.json reason: Warning raised to error while PR was being reviewed. SystemData will implement in next preview version. - suppress: R4009 - from: apimprivatelink.json + from: apimportalsettings.json + reason: Warning raised to error while PR was being reviewed. SystemData will implement in next preview version. + - suppress: R4009 + from: apimportalconfigs.json reason: Warning raised to error while PR was being reviewed. SystemData will implement in next preview version. - suppress: R4009 from: apimpolicyfragments.json