From 344cbb8748a333e1ddb9dea6366ef90882ebae21 Mon Sep 17 00:00:00 2001 From: Chenglong Liu <48578056+ChenglongLiu@users.noreply.github.com> Date: Wed, 25 May 2022 14:12:12 +0800 Subject: [PATCH] Fix lro in disable and enable cdn https (#19180) * Fix lro in disable and enable cdn https * Update the examples * Update the examples * Update the examples * Update the examples Co-authored-by: Chenglong Liu --- .../Microsoft.Cdn/stable/2021-06-01/cdn.json | 16 ++++++++++++---- .../CustomDomains_DisableCustomHttps.json | 19 ++++++++++++++++++- ...tomDomains_EnableCustomHttpsUsingBYOC.json | 19 ++++++++++++++++++- ...CustomHttpsUsingCDNManagedCertificate.json | 19 ++++++++++++++++++- 4 files changed, 66 insertions(+), 7 deletions(-) diff --git a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/cdn.json b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/cdn.json index 1ebd143a65c1..86743e61f1c0 100644 --- a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/cdn.json +++ b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/cdn.json @@ -2108,7 +2108,10 @@ ], "responses": { "200": { - "description": "OK. The request has succeeded." + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/CustomDomain" + } }, "202": { "description": "Accepted and the operation will complete asynchronously.", @@ -2122,7 +2125,8 @@ "$ref": "#/definitions/ErrorResponse" } } - } + }, + "x-ms-long-running-operation": true } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}/enableCustomHttps": { @@ -2183,7 +2187,10 @@ ], "responses": { "200": { - "description": "OK. The request has succeeded." + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/CustomDomain" + } }, "202": { "description": "Accepted and the operation will complete asynchronously.", @@ -2197,7 +2204,8 @@ "$ref": "#/definitions/ErrorResponse" } } - } + }, + "x-ms-long-running-operation": true } }, "/providers/Microsoft.Cdn/checkNameAvailability": { diff --git a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/CustomDomains_DisableCustomHttps.json b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/CustomDomains_DisableCustomHttps.json index 432fdf4d7326..172a1c209d61 100644 --- a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/CustomDomains_DisableCustomHttps.json +++ b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/CustomDomains_DisableCustomHttps.json @@ -8,8 +8,25 @@ "customDomainName": "www-someDomain-net" }, "responses": { - "200": {}, + "200": { + "body": { + "name": "www-someDomain-net", + "id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/customdomains/www-someDomain-net", + "type": "Microsoft.Cdn/profiles/endpoints/customdomains", + "properties": { + "provisioningState": "Succeeded", + "resourceState": "Active", + "hostName": "www.someDomain.net", + "customHttpsProvisioningState": "Disabled", + "customHttpsProvisioningSubstate": "CertificateDeleted", + "validationData": null + } + } + }, "202": { + "headers": { + "azure-asyncoperation": "https://management.azure.com/subscriptions/subid/resourcegroups/resourceGroupName/providers/Microsoft.Cdn/operationresults/operationId?api-version=2021-06-01" + }, "body": { "name": "www-someDomain-net", "id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/customdomains/www-someDomain-net", diff --git a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/CustomDomains_EnableCustomHttpsUsingBYOC.json b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/CustomDomains_EnableCustomHttpsUsingBYOC.json index ade14eec68ad..453c0127ff18 100644 --- a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/CustomDomains_EnableCustomHttpsUsingBYOC.json +++ b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/CustomDomains_EnableCustomHttpsUsingBYOC.json @@ -23,8 +23,25 @@ } }, "responses": { - "200": {}, + "200": { + "body": { + "name": "www-someDomain-net", + "id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/customdomains/www-someDomain-net", + "type": "Microsoft.Cdn/profiles/endpoints/customdomains", + "properties": { + "provisioningState": "Succeeded", + "resourceState": "Active", + "hostName": "www.someDomain.net", + "customHttpsProvisioningState": "Enabled", + "customHttpsProvisioningSubstate": "CertificateDeployed", + "validationData": "validationdata" + } + } + }, "202": { + "headers": { + "azure-asyncoperation": "https://management.azure.com/subscriptions/subid/resourcegroups/resourceGroupName/providers/Microsoft.Cdn/operationresults/operationId?api-version=2021-06-01" + }, "body": { "name": "www-someDomain-net", "id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/customdomains/www-someDomain-net", diff --git a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/CustomDomains_EnableCustomHttpsUsingCDNManagedCertificate.json b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/CustomDomains_EnableCustomHttpsUsingCDNManagedCertificate.json index 994ede67a5c0..b7dc8c07d368 100644 --- a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/CustomDomains_EnableCustomHttpsUsingCDNManagedCertificate.json +++ b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/CustomDomains_EnableCustomHttpsUsingCDNManagedCertificate.json @@ -17,8 +17,25 @@ } }, "responses": { - "200": {}, + "200": { + "body": { + "name": "www-someDomain-net", + "id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/customdomains/www-someDomain-net", + "type": "Microsoft.Cdn/profiles/endpoints/customdomains", + "properties": { + "provisioningState": "Succeeded", + "resourceState": "Active", + "hostName": "www.someDomain.net", + "customHttpsProvisioningState": "Enabled", + "customHttpsProvisioningSubstate": "CertificateDeployed", + "validationData": "validationdata" + } + } + }, "202": { + "headers": { + "azure-asyncoperation": "https://management.azure.com/subscriptions/subid/resourcegroups/resourceGroupName/providers/Microsoft.Cdn/operationresults/operationId?api-version=2021-06-01" + }, "body": { "name": "www-someDomain-net", "id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/customdomains/www-someDomain-net",