From 3f1e770aa89c7d306d7cdb4f7aa852819d2f9fa8 Mon Sep 17 00:00:00 2001 From: Alexander Batishchev Date: Thu, 6 May 2021 19:59:54 -0700 Subject: [PATCH] Added support for HEAD to Accounts, Instances of DeviceUpdate (#14099) * Update deviceupdate.json * Add files via upload * Add files via upload --- .../2020-03-01-preview/deviceupdate.json | 79 ++++++++++++++++++- .../examples/Accounts/Accounts_Head.json | 11 +++ .../examples/Instances/Instances_Head.json | 12 +++ 3 files changed, 98 insertions(+), 4 deletions(-) create mode 100644 specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Head.json create mode 100644 specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Head.json diff --git a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/deviceupdate.json b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/deviceupdate.json index b893af42fd06..65158a0dfbbb 100644 --- a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/deviceupdate.json +++ b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/deviceupdate.json @@ -195,6 +195,40 @@ } } }, + "head": { + "description": "Checks whether account exists.", + "operationId": "Accounts_Head", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/AccountNameParameter" + } + ], + "responses": { + "200": { + "description": "Account exists." + }, + "default": { + "description": "Error response describing the reason for operation failure.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Checks whether account exists": { + "$ref": "./examples/Accounts/Accounts_Head.json" + } + } + }, "put": { "description": "Creates or updates Account.", "operationId": "Accounts_Create", @@ -317,13 +351,13 @@ ], "responses": { "200": { - "description": "Account was updated successfully.", + "description": "Account updated successfully.", "schema": { "$ref": "#/definitions/Account" } }, "201": { - "description": "Account was updated successfully.", + "description": "Async operation to update accounts was created.", "schema": { "$ref": "#/definitions/Account" } @@ -390,7 +424,7 @@ }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts/{accountName}/instances/{instanceName}": { "get": { - "description": "Returns instances for the given account and instance name.", + "description": "Returns instance details for the given instance and account name.", "operationId": "Instances_Get", "parameters": [ { @@ -429,6 +463,43 @@ } } }, + "head": { + "description": "Checks whether instance exists.", + "operationId": "Instances_Head", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/AccountNameParameter" + }, + { + "$ref": "#/parameters/InstanceNameParameter" + } + ], + "responses": { + "200": { + "description": "Instance exists." + }, + "default": { + "description": "Error response describing the reason for operation failure.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Checks whether instance exists.": { + "$ref": "./examples/Instances/Instances_Head.json" + } + } + }, "put": { "description": "Creates or updates instance.", "operationId": "Instances_Create", @@ -560,7 +631,7 @@ ], "responses": { "200": { - "description": "Instance was updated successfully.", + "description": "Instance updated successfully.", "schema": { "$ref": "#/definitions/Instance" } diff --git a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Head.json b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Head.json new file mode 100644 index 000000000000..14bb29d556e0 --- /dev/null +++ b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Head.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "test-rg", + "accountName": "contoso", + "api-version": "2020-03-01-preview" + }, + "responses": { + "200": {} + } +} diff --git a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Head.json b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Head.json new file mode 100644 index 000000000000..d71a6b02afc8 --- /dev/null +++ b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Head.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "test-rg", + "accountName": "contoso", + "instanceName": "blue", + "api-version": "2020-03-01-preview" + }, + "responses": { + "200": {} + } +}