From e4904c640c0c1d1c950240d4cdd65bf044cc3056 Mon Sep 17 00:00:00 2001 From: diyakobo <73845794+diyakobo@users.noreply.github.com> Date: Thu, 11 Mar 2021 10:41:12 +0200 Subject: [PATCH] Diyakobo/add location field (#13370) * all Tamir changes * fix 1 * fix 2 --- .../examples/OperationResults/Get.json | 41 +++++++++++++ .../saasSubscriptionLevel/SaasPut.json | 2 + .../preview/2018-03-01-beta/saas.json | 61 +++++++++++++++++++ 3 files changed, 104 insertions(+) create mode 100644 specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/OperationResults/Get.json diff --git a/specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/OperationResults/Get.json b/specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/OperationResults/Get.json new file mode 100644 index 000000000000..319e96a89b09 --- /dev/null +++ b/specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/OperationResults/Get.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "api-version": "2018-03-01-beta", + "operationId": "5f35cb4c-8065-45b3-9116-5ba335462e95" + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.SaaS/saasresources/115c3523-1fae-757f-af86-7b27cfd29805", + "name": "diyakobo-transfer", + "type": "Microsoft.SaaS/saasresources", + "properties": { + "status": "Subscribed", + "saasResourceName": "diyakobo-transfer", + "publisherId": "microsoft-hcb", + "skuId": "free", + "offerId": "microsofthealthcarebot", + "quantity": null, + "termId": null, + "paymentChannelType": null, + "paymentChannelMetadata": { + "azureSubscriptionId": "155af98a-3205-47e7-883b-a2ab9db9f88d", + "resourceId": "b25dba9a-1bd7-4600-9447-3d27d11a6477" + }, + "publisherTestEnvironment": null, + "term": { + "termUnit": "P1M", + "startDate": "2020-11-12T00:00:00Z", + "endDate": "2020-12-11T00:00:00Z" + }, + "autoRenew": null, + "isFreeTrial": false, + "created": "2020-10-12T05:08:40.9235607Z", + "lastModified": "2020-11-12T21:25:40.2736665Z" + }, + "tags": {} + } + }, + "202": {} + } +} diff --git a/specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasSubscriptionLevel/SaasPut.json b/specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasSubscriptionLevel/SaasPut.json index 16c9f15e29d3..beb2db780671 100644 --- a/specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasSubscriptionLevel/SaasPut.json +++ b/specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasSubscriptionLevel/SaasPut.json @@ -5,6 +5,8 @@ "resourceName": "MyContosoSubscription", "api-version": "2018-03-01-beta", "parameters": { + "location": "global", + "name": "MyContosoSubscription", "properties": { "publisherId": "microsoft-contoso", "offerId": "contosoOffer", diff --git a/specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/saas.json b/specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/saas.json index 1a3c3ddf5fee..ef85ee0eeb3b 100644 --- a/specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/saas.json +++ b/specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/saas.json @@ -958,6 +958,63 @@ "final-state-via": "location" } } + }, + "/providers/Microsoft.SaaS/operationResults/{operationId}": { + "get": { + "tags": [ + "SaaSOperations" + ], + "operationId": "SaaSOperation_Get", + "description": "Gets information about the specified operation progress.", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/OperationIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Operation ended successfully. The request returns the updated SaaS resource.", + "schema": { + "$ref": "#/definitions/SaasResource" + } + }, + "202": { + "description": "Accepted and the operation will complete asynchronously.", + "headers": { + "Location": { + "description": "The URL to check the status of the asynchronous operation.", + "type": "string" + }, + "Retry-After": { + "description": "The amount of delay to use while the status of the operation is checked. The value is expressed in seconds.", + "format": "int32", + "type": "integer" + } + } + }, + "default": { + "description": "A response indicating an error.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Get operation status": { + "$ref": "./examples/OperationResults/Get.json" + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + } + } } }, "definitions": { @@ -1091,6 +1148,10 @@ "description": "the resource tags.", "$ref": "#/definitions/Tags" }, + "location": { + "type": "string", + "description": "Resource location. Only value allowed for SaaS is 'global'" + }, "properties": { "$ref": "#/definitions/SaasCreationProperties", "description": "Properties of the SaaS resource that are relevant for creation."