diff --git a/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2018-09-01/examples/Apps_CheckNameAvailability.json b/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2018-09-01/examples/Apps_CheckNameAvailability.json index be3e48de33fb..daa814b1499f 100644 --- a/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2018-09-01/examples/Apps_CheckNameAvailability.json +++ b/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2018-09-01/examples/Apps_CheckNameAvailability.json @@ -3,15 +3,30 @@ "subscriptionId": "00000000-0000-0000-0000-000000000000", "api-version": "2018-09-01", "operationInputs": { - "name": "myIoTCentralApp" + "name": "myIoTCentralApp", + "type": "IoTApps" } }, "responses": { "200": { - "headers": {}, + "description": "Returns information about resource name availability", + "headers": { + "code": "200" + }, "body": { "nameAvailable": true } + }, + "default": { + "description": "Error message returned for an unexpected response", + "headers": {}, + "body": { + "error": { + "code": "Error code", + "message": "Error message", + "target": "Error target" + } + } } } } \ No newline at end of file diff --git a/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2018-09-01/examples/Apps_CheckSubdomainAvailability.json b/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2018-09-01/examples/Apps_CheckSubdomainAvailability.json new file mode 100644 index 000000000000..1d7bac270480 --- /dev/null +++ b/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2018-09-01/examples/Apps_CheckSubdomainAvailability.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "api-version": "2018-09-01", + "operationInputs": { + "name": "myIoTCentralApp", + "type": "IoTApps" + } + }, + "responses": { + "200": { + "description": "Returns information about resource subdomain availability", + "headers": { + "code": "200" + }, + "body": { + "nameAvailable": true + } + }, + "default": { + "description": "Error message returned for an unexpected response", + "headers": {}, + "body": { + "error": { + "code": "Error code", + "message": "Error message", + "target": "Error target" + } + } + } + } +} \ No newline at end of file diff --git a/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2018-09-01/examples/Apps_CreateOrUpdate.json b/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2018-09-01/examples/Apps_CreateOrUpdate.json index 08779ed2c704..8416e881acd2 100644 --- a/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2018-09-01/examples/Apps_CreateOrUpdate.json +++ b/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2018-09-01/examples/Apps_CreateOrUpdate.json @@ -16,12 +16,18 @@ }, "responses": { "200": { - "headers": {}, + "header": { + "code": "200", + "message": "OK" + }, "body": { "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.IoTCentral/IoTApps/myIoTCentralApp", "name": "myIoTCentralApp", "type": "Microsoft.IoTCentral/IoTApps", "location": "westus", + "tags": { + "key": "value" + }, "properties": { "applicationId": "6ebd8fd3-6e34-419e-908f-9be61ec6f6d6", "displayName": "My IoT Central App 2", @@ -34,12 +40,19 @@ } }, "201": { - "headers": {}, + "headers": { + "code": "201", + "message": "Created", + "target": "ResourceHandler.ExecutePutRequest" + }, "body": { "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.IoTCentral/IoTApps/myIoTCentralApp", "name": "myIoTCentralApp", "type": "Microsoft.IoTCentral/IoTApps", "location": "westus", + "tags": { + "key": "value" + }, "properties": { "applicationId": "6ebd8fd3-6e34-419e-908f-9be61ec6f6d6", "displayName": "My IoT Central App", @@ -51,6 +64,17 @@ } } }, - "202": {} + "202": {}, + "default": { + "description": "Error message returned for an unexpected response", + "headers": {}, + "body": { + "error": { + "code": "Error code", + "message": "Error message", + "target": "Error target" + } + } + } } } \ No newline at end of file diff --git a/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2018-09-01/examples/Apps_Delete.json b/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2018-09-01/examples/Apps_Delete.json index ea4d3fd59aa4..6cadd187fed0 100644 --- a/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2018-09-01/examples/Apps_Delete.json +++ b/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2018-09-01/examples/Apps_Delete.json @@ -6,8 +6,28 @@ "api-version": "2018-09-01" }, "responses": { - "200": {}, + "200": { + "header": { + "code": "200", + "message": "OK", + "target": "ResourceHandler.ExecuteDeleteRequest" + } + }, "202": {}, - "204": {} + "204": {}, + "default": { + "description": "Error message returned for an unexpected response", + "headers": { + "message": "Created", + "code": "200" + }, + "body": { + "error": { + "code": "Error code", + "message": "Error message", + "target": "Error target" + } + } + } } } \ No newline at end of file diff --git a/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2018-09-01/examples/Apps_Get.json b/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2018-09-01/examples/Apps_Get.json index 738c93b1e7da..fe6000962120 100644 --- a/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2018-09-01/examples/Apps_Get.json +++ b/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2018-09-01/examples/Apps_Get.json @@ -7,12 +7,18 @@ }, "responses": { "200": { - "headers": {}, + "description": "Returns the application details", + "headers": { + "code": "200" + }, "body": { "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.IoTCentral/IoTApps/myIoTCentralApp", "location": "westus", "type": "Microsoft.IoTCentral/IoTApps", "name": "myIoTCentralApp", + "tags": { + "key": "value" + }, "properties": { "applicationId": "6ebd8fd3-6e34-419e-908f-9be61ec6f6d6", "displayName": "My IoT Central App", @@ -23,6 +29,17 @@ "name": "F1" } } + }, + "default": { + "description": "Error message returned for an unexpected response", + "headers": {}, + "body": { + "error": { + "code": "Error code", + "message": "Error message", + "target": "Error target" + } + } } } } \ No newline at end of file diff --git a/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2018-09-01/examples/Apps_ListByResourceGroup.json b/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2018-09-01/examples/Apps_ListByResourceGroup.json index 63d9d00a43c9..d3321d10ea59 100644 --- a/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2018-09-01/examples/Apps_ListByResourceGroup.json +++ b/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2018-09-01/examples/Apps_ListByResourceGroup.json @@ -6,7 +6,9 @@ }, "responses": { "200": { - "headers": {}, + "headers": { + "code": "200" + }, "body": { "value": [ { @@ -14,6 +16,9 @@ "location": "westus", "type": "Microsoft.IoTCentral/IoTApps", "name": "myIoTCentralApp", + "tags": { + "key": "value" + }, "properties": { "applicationId": "6ebd8fd3-6e34-419e-908f-9be61ec6f6d6", "displayName": "My IoT Central App", @@ -24,7 +29,19 @@ "name": "F1" } } - ] + ], + "nextLink": null + } + }, + "default": { + "description": "Error message returned for an unexpected response", + "headers": {}, + "body": { + "error": { + "code": "Error code", + "message": "Error message", + "target": "Error target" + } } } } diff --git a/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2018-09-01/examples/Apps_ListBySubscription.json b/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2018-09-01/examples/Apps_ListBySubscription.json index a74d0fe95317..6392fc8ad6bb 100644 --- a/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2018-09-01/examples/Apps_ListBySubscription.json +++ b/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2018-09-01/examples/Apps_ListBySubscription.json @@ -5,7 +5,9 @@ }, "responses": { "200": { - "headers": {}, + "headers": { + "code": "200" + }, "body": { "value": [ { @@ -13,6 +15,9 @@ "location": "westus", "type": "Microsoft.IoTCentral/IoTApps", "name": "myIoTCentralApp", + "tags": { + "key": "value" + }, "properties": { "applicationId": "6ebd8fd3-6e34-419e-908f-9be61ec6f6d6", "displayName": "My IoT Central App", @@ -23,7 +28,19 @@ "name": "F1" } } - ] + ], + "nextLink": null + }, + "default": { + "description": "Error message returned for an unexpected response", + "headers": {}, + "body": { + "error": { + "code": "Error code", + "message": "Error message", + "target": "Error target" + } + } } } } diff --git a/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2018-09-01/examples/Apps_Update.json b/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2018-09-01/examples/Apps_Update.json index cd7ef27c0f02..431b094216d8 100644 --- a/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2018-09-01/examples/Apps_Update.json +++ b/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2018-09-01/examples/Apps_Update.json @@ -10,12 +10,19 @@ }, "responses": { "200": { - "headers": {}, + "headers": { + "code": "200", + "message": "OK", + "target": "ResourceHandler.ExecutePatchRequest" + }, "body": { "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.IoTCentral/IoTApps/myIoTCentralApp", "location": "westus", "type": "Microsoft.IoTCentral/IoTApps", "name": "myIoTCentralApp", + "tags": { + "key": "value" + }, "properties": { "applicationId": "6ebd8fd3-6e34-419e-908f-9be61ec6f6d6", "displayName": "My IoT Central App 2", @@ -27,6 +34,17 @@ } } }, - "202": {} + "202": {}, + "default": { + "description": "Error message returned for an unexpected response", + "headers": {}, + "body": { + "error": { + "code": "Error code", + "message": "Error message", + "target": "Error target" + } + } + } } } \ No newline at end of file diff --git a/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2018-09-01/examples/Operations_List.json b/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2018-09-01/examples/Operations_List.json index 81eac53da335..121472301642 100644 --- a/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2018-09-01/examples/Operations_List.json +++ b/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2018-09-01/examples/Operations_List.json @@ -4,7 +4,9 @@ }, "responses": { "200": { - "headers": {}, + "headers": { + "code": "200" + }, "body": { "value": [ { @@ -52,7 +54,19 @@ "description": "Gets all the available operations on IoT Central Applications" } } - ] + ], + "nextLink": null + } + }, + "default": { + "description": "Error message returned for an unexpected response", + "headers": {}, + "body": { + "error": { + "code": "Error code", + "message": "Error message", + "target": "Error target" + } } } } diff --git a/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2018-09-01/iotcentral.json b/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2018-09-01/iotcentral.json index 88b9479e2e79..52269cc2dafc 100644 --- a/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2018-09-01/iotcentral.json +++ b/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2018-09-01/iotcentral.json @@ -351,7 +351,53 @@ "200": { "description": "This is a synchronous operation. The body contains a JSON-serialized response that specifies whether the IoT Central application name is available. If the name is not available, the body contains the reason.", "schema": { - "$ref": "#/definitions/AppNameAvailabilityInfo" + "$ref": "#/definitions/AppAvailabilityInfo" + } + }, + "default": { + "description": "DefaultErrorResponse", + "schema": { + "$ref": "#/definitions/ErrorDetails" + } + } + }, + "deprecated": false + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.IoTCentral/checkSubdomainAvailability": { + "post": { + "tags": [ + "Apps" + ], + "description": "Check if an IoT Central application subdomain is available.", + "operationId": "Apps_CheckSubdomainAvailability", + "x-ms-examples": { + "Apps_SubdomainAvailability": { + "$ref": "./examples/Apps_CheckSubdomainAvailability.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/subscriptionId" + }, + { + "name": "operationInputs", + "in": "body", + "description": "Set the name parameter in the OperationInputs structure to the subdomain of the IoT Central application to check.", + "required": true, + "schema": { + "$ref": "#/definitions/OperationInputs" + } + } + ], + "responses": { + "200": { + "description": "This is a synchronous operation. The body contains a JSON-serialized response that specifies whether the IoT Central application subdomain is available. If the subdomain is not available, the body contains the reason.", + "schema": { + "$ref": "#/definitions/AppAvailabilityInfo" } }, "default": { @@ -537,22 +583,38 @@ }, "ErrorDetails": { "description": "Error details.", + "properties": { + "error": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ErrorResponseBody" + } + } + }, + "ErrorResponseBody": { + "description": "Details of error response.", "type": "object", "properties": { "code": { - "description": "The error code.", "type": "string", + "description": "The error code.", "readOnly": true }, "message": { - "description": "The error message.", "type": "string", + "description": "The error message.", "readOnly": true }, "target": { - "description": "The target of the particular error.", "type": "string", + "description": "The target of the particular error.", "readOnly": true + }, + "details": { + "type": "array", + "description": "A list of additional details about the error.", + "items": { + "$ref": "#/definitions/ErrorResponseBody" + } } } }, @@ -638,15 +700,21 @@ "properties": { "name": { "description": "The name of the IoT Central application instance to check.", - "type": "string" + "type": "string", + "pattern": "^[a-z0-9-]{1,63}$" + }, + "type": { + "description": "The type of the IoT Central resource to query.", + "type": "string", + "default": "IoTApps" } }, "required": [ "name" ] }, - "AppNameAvailabilityInfo": { - "description": "The properties indicating whether a given IoT Central application name is available.", + "AppAvailabilityInfo": { + "description": "The properties indicating whether a given IoT Central application name or subdomain is available.", "type": "object", "properties": { "nameAvailable": { @@ -656,20 +724,13 @@ }, "reason": { "description": "The reason for unavailability.", - "enum": [ - "Invalid", - "AlreadyExists" - ], "type": "string", - "readOnly": true, - "x-ms-enum": { - "name": "AppNameUnavailabilityReason", - "modelAsString": false - } + "readOnly": true }, "message": { "description": "The detailed reason message.", - "type": "string" + "type": "string", + "readOnly": true } } }