diff --git a/specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2017-07-01-privatepreview/examples/Apps_CheckNameAvailability.json b/specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2017-07-01-privatepreview/examples/Apps_CheckNameAvailability.json new file mode 100644 index 000000000000..0b6098bd619f --- /dev/null +++ b/specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2017-07-01-privatepreview/examples/Apps_CheckNameAvailability.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "api-version": "2017-07-01-privatepreview", + "operationInputs": { + "name": "myIoTCentralApp" + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "nameAvailable": true + } + } + } +} \ No newline at end of file diff --git a/specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2017-07-01-privatepreview/examples/Apps_CreateOrUpdate.json b/specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2017-07-01-privatepreview/examples/Apps_CreateOrUpdate.json new file mode 100644 index 000000000000..d894da696294 --- /dev/null +++ b/specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2017-07-01-privatepreview/examples/Apps_CreateOrUpdate.json @@ -0,0 +1,56 @@ +{ + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "resRg", + "resourceName": "myIoTCentralApp", + "api-version": "2017-07-01-privatepreview", + "App": { + "displayName": "My IoT Central App", + "subdomain": "my-iot-central-app", + "template": "iotc-default@1.0.0", + "location": "westus", + "sku": { + "name": "F1" + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.IoTCentral/IoTApps/myIoTCentralApp", + "name": "myIoTCentralApp", + "type": "Microsoft.IoTCentral/IoTApps", + "location": "westus", + "properties": { + "applicationId": "6ebd8fd3-6e34-419e-908f-9be61ec6f6d6", + "displayName": "My IoT Central App 2", + "subdomain": "my-iot-central-app-2", + "template": "iotc-default@1.0.0" + }, + "sku": { + "name": "F1" + } + } + }, + "201": { + "headers": {}, + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.IoTCentral/IoTApps/myIoTCentralApp", + "name": "myIoTCentralApp", + "type": "Microsoft.IoTCentral/IoTApps", + "location": "westus", + "properties": { + "applicationId": "6ebd8fd3-6e34-419e-908f-9be61ec6f6d6", + "displayName": "My IoT Central App", + "subdomain": "my-iot-central-app", + "template": "iotc-default@1.0.0" + }, + "sku": { + "name": "F1" + } + } + }, + "202": {} + } +} \ No newline at end of file diff --git a/specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2017-07-01-privatepreview/examples/Apps_Delete.json b/specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2017-07-01-privatepreview/examples/Apps_Delete.json new file mode 100644 index 000000000000..85a89bf34018 --- /dev/null +++ b/specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2017-07-01-privatepreview/examples/Apps_Delete.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "resRg", + "resourceName": "myIoTCentralApp", + "api-version": "2017-07-01-privatepreview" + }, + "responses": { + "200": {}, + "202": {}, + "204": {} + } +} \ No newline at end of file diff --git a/specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2017-07-01-privatepreview/examples/Apps_Get.json b/specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2017-07-01-privatepreview/examples/Apps_Get.json new file mode 100644 index 000000000000..07dd1f85209c --- /dev/null +++ b/specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2017-07-01-privatepreview/examples/Apps_Get.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "resRg", + "resourceName": "myIoTCentralApp", + "api-version": "2017-07-01-privatepreview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.IoTCentral/IoTApps/myIoTCentralApp", + "location": "westus", + "type": "Microsoft.IoTCentral/IoTApps", + "name": "myIoTCentralApp", + "properties": { + "applicationId": "6ebd8fd3-6e34-419e-908f-9be61ec6f6d6", + "displayName": "My IoT Central App", + "subdomain": "my-iot-central-app", + "template": "iotc-default@1.0.0" + }, + "sku": { + "name": "F1" + } + } + } + } +} \ No newline at end of file diff --git a/specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2017-07-01-privatepreview/examples/Apps_ListByResourceGroup.json b/specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2017-07-01-privatepreview/examples/Apps_ListByResourceGroup.json new file mode 100644 index 000000000000..846e92484a2f --- /dev/null +++ b/specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2017-07-01-privatepreview/examples/Apps_ListByResourceGroup.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "api-version": "2017-07-01-privatepreview", + "resourceGroupName": "resRg" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.IoTCentral/IoTApps/myIoTCentralApp", + "location": "westus", + "type": "Microsoft.IoTCentral/IoTApps", + "name": "myIoTCentralApp", + "properties": { + "applicationId": "6ebd8fd3-6e34-419e-908f-9be61ec6f6d6", + "displayName": "My IoT Central App", + "subdomain": "my-iot-central-app", + "template": "iotc-default@1.0.0" + }, + "sku": { + "name": "F1" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2017-07-01-privatepreview/examples/Apps_ListBySubscription.json b/specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2017-07-01-privatepreview/examples/Apps_ListBySubscription.json new file mode 100644 index 000000000000..01929b226fe0 --- /dev/null +++ b/specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2017-07-01-privatepreview/examples/Apps_ListBySubscription.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "api-version": "2017-07-01-privatepreview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.IoTCentral/IoTApps/myIoTCentralApp", + "location": "westus", + "type": "Microsoft.IoTCentral/IoTApps", + "name": "myIoTCentralApp", + "properties": { + "applicationId": "6ebd8fd3-6e34-419e-908f-9be61ec6f6d6", + "displayName": "My IoT Central App", + "subdomain": "my-iot-central-app", + "template": "iotc-default@1.0.0" + }, + "sku": { + "name": "F1" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2017-07-01-privatepreview/examples/Apps_Update.json b/specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2017-07-01-privatepreview/examples/Apps_Update.json new file mode 100644 index 000000000000..ed53dc94cd68 --- /dev/null +++ b/specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2017-07-01-privatepreview/examples/Apps_Update.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "resRg", + "resourceName": "myIoTCentralApp", + "api-version": "2017-07-01-privatepreview", + "AppPatch": { + "displayName": "My IoT Central App 2" + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.IoTCentral/IoTApps/myIoTCentralApp", + "location": "westus", + "type": "Microsoft.IoTCentral/IoTApps", + "name": "myIoTCentralApp", + "properties": { + "applicationId": "6ebd8fd3-6e34-419e-908f-9be61ec6f6d6", + "displayName": "My IoT Central App 2", + "subdomain": "my-iot-central-app-2", + "template": "iotc-default@1.0.0" + }, + "sku": { + "name": "F1" + } + } + }, + "202": {} + } +} \ No newline at end of file diff --git a/specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2017-07-01-privatepreview/examples/Operations_List.json b/specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2017-07-01-privatepreview/examples/Operations_List.json new file mode 100644 index 000000000000..498ce5dfd996 --- /dev/null +++ b/specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2017-07-01-privatepreview/examples/Operations_List.json @@ -0,0 +1,59 @@ +{ + "parameters": { + "api-version": "2017-07-01-privatepreview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "value": [ + { + "name": "Microsoft.IoTCentral/IoTApps/read", + "display": { + "provider": "Microsoft IoT Central", + "resource": "IoTApps", + "operation": "Get IoT Central Application", + "description": "Gets a single IoT Central Application" + } + }, + { + "name": "Microsoft.IoTCentral/IoTApps/write", + "display": { + "provider": "Microsoft IoT Central", + "resource": "IoTApps", + "operation": "Create or Update IoT Central Application", + "description": "Creates or Updates an IoT Central Applications" + } + }, + { + "name": "Microsoft.IoTCentral/IoTApps/delete", + "display": { + "provider": "Microsoft IoT Central", + "resource": "IoTApps", + "operation": "Delete IoT Central Application", + "description": "Deletes an IoT Central Applications" + } + }, + { + "name": "Microsoft.IoTCentral/checkNameAvailability/action", + "display": { + "provider": "Microsoft IoT Central", + "resource": "", + "operation": "Check resource name availability", + "description": "Checks if an IoT Central Application name is available" + } + }, + { + "name": "Microsoft.IoTCentral/operations/read", + "display": { + "provider": "Microsoft IoT Central", + "resource": "", + "operation": "Get all the available operations", + "description": "Gets all the available operations on IoT Central Applications" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2017-07-01-privatepreview/iotcentral.json b/specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2017-07-01-privatepreview/iotcentral.json new file mode 100644 index 000000000000..7a27c0f6441f --- /dev/null +++ b/specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2017-07-01-privatepreview/iotcentral.json @@ -0,0 +1,719 @@ +{ + "swagger": "2.0", + "info": { + "version": "2017-07-01-privatepreview", + "title": "IotCentralClient", + "description": "Use this API to manage IoT Central Applications in your Azure subscription." + }, + "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.IoTCentral/IoTApps/{resourceName}": { + "get": { + "tags": [ + "Apps" + ], + "description": "Get the metadata of an IoT Central application.", + "operationId": "Apps_Get", + "x-ms-examples": { + "Apps_Get": { + "$ref": "./examples/Apps_Get.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/resourceGroupName" + }, + { + "$ref": "#/parameters/resourceName" + } + ], + "responses": { + "200": { + "description": "The body contains all the non-security properties of the IoT Central application. Security-related properties are set to null.", + "schema": { + "$ref": "#/definitions/App" + } + }, + "default": { + "description": "Default error response", + "schema": { + "$ref": "#/definitions/ErrorDetails" + } + } + }, + "deprecated": false + }, + "put": { + "tags": [ + "Apps" + ], + "description": "Create or update the metadata of an IoT Central application. The usual pattern to modify a property is to retrieve the IoT Central application metadata and security metadata, and then combine them with the modified values in a new body to update the IoT Central application.", + "operationId": "Apps_CreateOrUpdate", + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Apps_CreateOrUpdate": { + "$ref": "./examples/Apps_CreateOrUpdate.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/resourceGroupName" + }, + { + "$ref": "#/parameters/resourceName" + }, + { + "name": "App", + "in": "body", + "description": "The IoT Central application metadata and security metadata.", + "required": true, + "schema": { + "$ref": "#/definitions/App" + } + } + ], + "responses": { + "200": { + "description": "This is returned as a response to the status polling request for the create or update operation. The body contains the resource representation that indicates a transitional provisioning state.", + "schema": { + "$ref": "#/definitions/App" + } + }, + "201": { + "description": "This is returned as a response to the status polling request for the create or update operation. The body contains the resource representation that indicates a transitional provisioning state.", + "schema": { + "$ref": "#/definitions/App" + } + }, + "202": { + "description": "Accepted - Put request accepted; the operation will complete asynchronously." + }, + "default": { + "description": "DefaultErrorResponse", + "schema": { + "$ref": "#/definitions/ErrorDetails" + } + } + }, + "deprecated": false + }, + "patch": { + "tags": [ + "Apps" + ], + "description": "Update the metadata of an IoT Central application.", + "operationId": "Apps_Update", + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Apps_Update": { + "$ref": "./examples/Apps_Update.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/resourceGroupName" + }, + { + "$ref": "#/parameters/resourceName" + }, + { + "name": "AppPatch", + "in": "body", + "description": "The IoT Central application metadata and security metadata.", + "required": true, + "schema": { + "$ref": "#/definitions/AppPatch" + } + } + ], + "responses": { + "200": { + "description": "This is returned as a response to the status polling request for the create or update operation. The body contains the resource representation that indicates a transitional provisioning state.", + "schema": { + "$ref": "#/definitions/App" + } + }, + "202": { + "description": "Accepted - Put request accepted; the operation will complete asynchronously." + }, + "default": { + "description": "DefaultErrorResponse", + "schema": { + "$ref": "#/definitions/ErrorDetails" + } + } + }, + "deprecated": false + }, + "delete": { + "tags": [ + "Apps" + ], + "description": "Delete an IoT Central application.", + "operationId": "Apps_Delete", + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Apps_Delete": { + "$ref": "./examples/Apps_Delete.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/resourceGroupName" + }, + { + "$ref": "#/parameters/resourceName" + } + ], + "responses": { + "200": { + "description": "This is returned as a response to the status polling request for the delete operation. The body contains the resource representation that indicates a transitional provisioning state." + }, + "202": { + "description": "Accepted - Delete request accepted; the operation will complete asynchronously." + }, + "204": { + "description": "Once the long running delete operation completes successfully, a 204 No Content status code is returned when the status polling request finds the IoT Central application metadata in the service and the status of the delete operation is set to a completed state." + }, + "default": { + "description": "DefaultErrorResponse", + "schema": { + "$ref": "#/definitions/ErrorDetails" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.IoTCentral/IoTApps": { + "get": { + "tags": [ + "Apps" + ], + "description": "Get all IoT Central Applications in a subscription.", + "operationId": "Apps_ListBySubscription", + "x-ms-examples": { + "Apps_ListBySubscription": { + "$ref": "./examples/Apps_ListBySubscription.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "parameters": [ + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/subscriptionId" + } + ], + "responses": { + "200": { + "description": "This is a synchronous operation. The body contains a JSON-serialized array of the metadata from all the IoT Central Applications in the subscription.", + "schema": { + "$ref": "#/definitions/AppListResult" + } + }, + "default": { + "description": "DefaultErrorResponse", + "schema": { + "$ref": "#/definitions/ErrorDetails" + } + } + }, + "deprecated": false + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTCentral/IoTApps": { + "get": { + "tags": [ + "Apps" + ], + "description": "Get all the IoT Central Applications in a resource group.", + "operationId": "Apps_ListByResourceGroup", + "x-ms-examples": { + "Apps_ListByResourceGroup": { + "$ref": "./examples/Apps_ListByResourceGroup.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "parameters": [ + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/resourceGroupName" + } + ], + "responses": { + "200": { + "description": "This is a synchronous operation. The body contains a JSON-serialized array of the metadata from all the IoT Central Applications in the resource group.", + "schema": { + "$ref": "#/definitions/AppListResult" + } + }, + "default": { + "description": "DefaultErrorResponse", + "schema": { + "$ref": "#/definitions/ErrorDetails" + } + } + }, + "deprecated": false + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.IoTCentral/checkNameAvailability": { + "post": { + "tags": [ + "Apps" + ], + "description": "Check if an IoT Central application name is available.", + "operationId": "Apps_CheckNameAvailability", + "x-ms-examples": { + "Apps_CheckNameAvailability": { + "$ref": "./examples/Apps_CheckNameAvailability.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/subscriptionId" + }, + { + "name": "operationInputs", + "in": "body", + "description": "Set the name parameter in the OperationInputs structure to the name 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 name is available. If the name is not available, the body contains the reason.", + "schema": { + "$ref": "#/definitions/AppNameAvailabilityInfo" + } + }, + "default": { + "description": "DefaultErrorResponse", + "schema": { + "$ref": "#/definitions/ErrorDetails" + } + } + }, + "deprecated": false + } + }, + "/providers/Microsoft.IoTCentral/operations": { + "get": { + "tags": [ + "Operations" + ], + "description": "Lists all of the available IoT Central application REST API operations.", + "operationId": "Operations_List", + "x-ms-examples": { + "Operations_List": { + "$ref": "./examples/Operations_List.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "parameters": [ + { + "$ref": "#/parameters/api-version" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/OperationListResult" + } + }, + "default": { + "description": "DefaultErrorResponse", + "schema": { + "$ref": "#/definitions/ErrorDetails" + } + } + }, + "deprecated": false + } + } + }, + "definitions": { + "AppProperties": { + "description": "The properties of an IoT Central application.", + "type": "object", + "properties": { + "applicationId": { + "description": "The ID of the application.", + "type": "string", + "readOnly": true + }, + "displayName": { + "description": "The display name of the application.", + "type": "string", + "pattern": "^.{1,200}$" + }, + "subdomain": { + "description": "The subdomain of the application.", + "type": "string", + "pattern": "^[a-z0-9-]{1,63}$" + }, + "template": { + "description": "The ID of the application template, which is a blueprint that defines the characteristics and behaviors of an application. Optional; if not specified, defaults to a blank blueprint and allows the application to be defined from scratch.", + "type": "string", + "x-ms-mutability": [ + "create", + "read" + ] + } + } + }, + "AppSkuInfo": { + "description": "Information about the SKU of the IoT Central application.", + "type": "object", + "properties": { + "name": { + "description": "The name of the SKU.", + "enum": [ + "F1", + "S1" + ], + "type": "string", + "x-ms-enum": { + "name": "AppSku", + "modelAsString": true + } + } + }, + "required": [ + "name" + ] + }, + "App": { + "description": "The IoT Central application.", + "type": "object", + "properties": { + "properties": { + "description": "The common properties of an IoT Central application.", + "x-ms-client-flatten": true, + "$ref": "#/definitions/AppProperties" + }, + "sku": { + "description": "A valid instance SKU.", + "$ref": "#/definitions/AppSkuInfo" + } + }, + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "required": [ + "sku" + ] + }, + "AppPatch": { + "description": "The description of the IoT Central application.", + "type": "object", + "properties": { + "tags": { + "description": "Instance tags", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "properties": { + "description": "The common properties of an IoT Central application.", + "x-ms-client-flatten": true, + "$ref": "#/definitions/AppProperties" + } + } + }, + "Resource": { + "description": "The common properties of an ARM resource.", + "properties": { + "id": { + "readOnly": true, + "type": "string", + "description": "The ARM resource identifier." + }, + "name": { + "readOnly": true, + "type": "string", + "description": "The ARM resource name.", + "pattern": "^(?![0-9]+$)(?!-)[a-zA-Z0-9-]{2,99}[a-zA-Z0-9]$", + "x-comment": "pattern must match #/parameters/resourceName" + }, + "type": { + "readOnly": true, + "type": "string", + "description": "The resource type." + }, + "location": { + "type": "string", + "description": "The resource location.", + "x-ms-mutability": [ + "create", + "read" + ] + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "The resource tags." + } + }, + "x-ms-azure-resource": true, + "required": [ + "location" + ] + }, + "ErrorDetails": { + "description": "Error details.", + "type": "object", + "properties": { + "code": { + "description": "The error code.", + "type": "string", + "readOnly": true + }, + "message": { + "description": "The error message.", + "type": "string", + "readOnly": true + }, + "target": { + "description": "The target of the particular error.", + "type": "string", + "readOnly": true + } + } + }, + "AppListResult": { + "description": "A list of IoT Central Applications with a next link.", + "type": "object", + "properties": { + "nextLink": { + "description": "The link used to get the next page of IoT Central Applications.", + "type": "string" + }, + "value": { + "description": "A list of IoT Central Applications.", + "type": "array", + "items": { + "$ref": "#/definitions/App" + } + } + } + }, + "OperationListResult": { + "description": "A list of IoT Central operations. It contains a list of operations and a URL link to get the next set of results.", + "type": "object", + "properties": { + "nextLink": { + "description": "The link used to get the next page of IoT Central description objects.", + "type": "string" + }, + "value": { + "description": "A list of operations supported by the Microsoft.IoTCentral resource provider.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/Operation" + } + } + } + }, + "Operation": { + "description": "IoT Central REST API operation", + "type": "object", + "properties": { + "name": { + "readOnly": true, + "type": "string", + "description": "Operation name: {provider}/{resource}/{read | write | action | delete}" + }, + "display": { + "description": "The object that represents the operation.", + "$ref": "#/definitions/OperationDisplay" + } + } + }, + "OperationDisplay": { + "description": "The object that represents the operation.", + "type": "object", + "properties": { + "provider": { + "readOnly": true, + "type": "string", + "description": "Service provider: Microsoft IoT Central" + }, + "resource": { + "readOnly": true, + "type": "string", + "description": "Resource Type: IoT Central" + }, + "operation": { + "readOnly": true, + "type": "string", + "description": "Name of the operation" + }, + "description": { + "readOnly": true, + "type": "string", + "description": "Friendly description for the operation," + } + } + }, + "OperationInputs": { + "description": "Input values.", + "type": "object", + "properties": { + "name": { + "description": "The name of the IoT Central application instance to check.", + "type": "string" + } + }, + "required": [ + "name" + ] + }, + "AppNameAvailabilityInfo": { + "description": "The properties indicating whether a given IoT Central application name is available.", + "type": "object", + "properties": { + "nameAvailable": { + "description": "The value which indicates whether the provided name is available.", + "type": "boolean", + "readOnly": true + }, + "reason": { + "description": "The reason for unavailability.", + "enum": [ + "Invalid", + "AlreadyExists" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "AppNameUnavailabilityReason", + "modelAsString": false + } + }, + "message": { + "description": "The detailed reason message.", + "type": "string" + } + } + } + }, + "parameters": { + "subscriptionId": { + "name": "subscriptionId", + "in": "path", + "description": "The subscription identifier.", + "required": true, + "type": "string", + "format": "uuid" + }, + "api-version": { + "name": "api-version", + "enum": [ + "2017-07-01-privatepreview" + ], + "in": "query", + "description": "The version of the API.", + "required": true, + "type": "string", + "minLength": 10 + }, + "resourceGroupName": { + "name": "resourceGroupName", + "in": "path", + "description": "The name of the resource group that contains the IoT Central application.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method", + "minLength": 1, + "maxLength": 64 + }, + "resourceName": { + "name": "resourceName", + "in": "path", + "description": "The ARM resource name of the IoT Central application.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method", + "minLength": 1, + "maxLength": 100, + "x-comment": "validation must match #/definitions/Resource" + } + } +} diff --git a/specification/iotcentral/resource-manager/readme.md b/specification/iotcentral/resource-manager/readme.md new file mode 100644 index 000000000000..fa573f9e3186 --- /dev/null +++ b/specification/iotcentral/resource-manager/readme.md @@ -0,0 +1,141 @@ +# IotCentral + +> see https://aka.ms/autorest + +This is the AutoRest configuration file for IotCentral. + +--- +## Getting Started +To build the SDK for IotCentral, simply [Install AutoRest](https://aka.ms/autorest/install) and in this folder, run: + +> `autorest` + +To see additional help and options, run: + +> `autorest --help` +--- + +## Configuration + + + +### Basic Information +These are the global settings for IotCentral. + +``` yaml +openapi-type: arm +tag: package-2017-07-01-privatepreview +``` + + +### Tag: package-2017-07-01-privatepreview + +These settings apply only when `--tag=package-2017-07-01-privatepreview` is specified on the command line. + +``` yaml $(tag) == 'package-2017-07-01-privatepreview' +input-file: +- Microsoft.IoTCentral/preview/2017-07-01-privatepreview/iotcentral.json +``` + +--- +# Code Generation + +## Swagger to SDK + +This section describes what SDK should be generated by the automatic system. +This is not used by Autorest itself. + +``` yaml $(swagger-to-sdk) +swagger-to-sdk: + - repo: azure-sdk-for-python + - repo: azure-libraries-for-java + - repo: azure-sdk-for-go + - repo: azure-sdk-for-node + - repo: azure-sdk-for-ruby + after_scripts: + - bundle install && rake arm:regen_all_profiles['azure_mgmt_iot_central'] +``` + +## C# + +These settings apply only when `--csharp` is specified on the command line. +Please also specify `--csharp-sdks-folder=`. + +``` yaml $(csharp) +csharp: + azure-arm: true + license-header: MICROSOFT_MIT_NO_VERSION + namespace: Microsoft.Azure.Management.IotCentral + payload-flattening-threshold: 1 + output-folder: $(csharp-sdks-folder)/IotCentral/Management.IotCentral/Generated + clear-output-folder: true +``` + +## Go + +These settings apply only when `--go` is specified on the command line. + +``` yaml $(go) +go: + license-header: MICROSOFT_APACHE_NO_VERSION + clear-output-folder: true + namespace: iotcentral +``` + +### Go multi-api + +``` yaml $(go) && $(multiapi) +batch: + - tag: package-2017-07-01-privatepreview +``` + +### Tag: package-2017-07-01-privatepreview and go + +These settings apply only when `--tag=package-2017-07-01-privatepreview --go` is specified on the command line. +Please also specify `--go-sdk-folder=`. + +``` yaml $(tag)=='package-2017-07-01-privatepreview' && $(go) +output-folder: $(go-sdk-folder)/services/preview/$(namespace)/mgmt/2017-07-01-privatepreview/$(namespace) +``` + +## Java + +These settings apply only when `--java` is specified on the command line. +Please also specify `--azure-libraries-for-java-folder=`. + +``` yaml $(java) +java: + azure-arm: true + fluent: true + namespace: com.microsoft.azure.management.iotcentral + license-header: MICROSOFT_MIT_NO_CODEGEN + payload-flattening-threshold: 1 + output-folder: $(azure-libraries-for-java-folder)/azure-mgmt-iotcentral +``` + +## Python + +These settings apply only when `--python` is specified on the command line. +Please also specify `--python-sdks-folder=`. +Use `--python-mode=update` if you already have a setup.py and just want to update the code itself. + +``` yaml $(python) +python-mode: create +python: + azure-arm: true + license-header: MICROSOFT_MIT_NO_VERSION + payload-flattening-threshold: 2 + namespace: azure.mgmt.iotcentral + package-name: azure-mgmt-iotcentral + clear-output-folder: true +``` +``` yaml $(python) && $(python-mode) == 'update' +python: + no-namespace-folders: true + output-folder: $(python-sdks-folder)/azure-mgmt-iotcentral/azure/mgmt/iotcentral +``` +``` yaml $(python) && $(python-mode) == 'create' +python: + basic-setup-py: true + output-folder: $(python-sdks-folder)/azure-mgmt-iotcentral +``` diff --git a/specification/iotcentral/resource-manager/readme.nodejs.md b/specification/iotcentral/resource-manager/readme.nodejs.md new file mode 100644 index 000000000000..9e440f88a821 --- /dev/null +++ b/specification/iotcentral/resource-manager/readme.nodejs.md @@ -0,0 +1,16 @@ +## Node.js + +These settings apply only when `--nodejs` is specified on the command line. +Please also specify `--node-sdks-folder=`. + +``` yaml $(nodejs) +nodejs: + azure-arm: true + package-name: azure-arm-iotcentral + package-version: 1.0.0-preview + output-folder: $(node-sdks-folder)/lib/services/iotcentral + payload-flattening-threshold: 1 + generate-license-txt: true + generate-package-json: true + generate-readme-md: true +``` diff --git a/specification/iotcentral/resource-manager/readme.ruby.md b/specification/iotcentral/resource-manager/readme.ruby.md new file mode 100644 index 000000000000..722de9146556 --- /dev/null +++ b/specification/iotcentral/resource-manager/readme.ruby.md @@ -0,0 +1,27 @@ +## Ruby + +These settings apply only when `--ruby` is specified on the command line. + +``` yaml $(ruby) +ruby: + package-name: azure_mgmt_iot_central + package-version: "0.0.1" + azure-arm: true +``` + +### Ruby multi-api + +``` yaml $(ruby) && $(multiapi) +batch: + - tag: package-2017-07-01-privatepreview +``` + +### Tag: package-2017-07-01-privatepreview and ruby + +These settings apply only when `--tag=package-2017-07-01-privatepreview --ruby` is specified on the command line. +Please also specify `--ruby-sdks-folder=`. + +``` yaml $(tag) == 'package-2017-07-01-privatepreview' && $(ruby) +namespace: "Azure::IotCentral::Mgmt::V2017_07_01_privatepreview" +output-folder: $(ruby-sdks-folder)/management/azure_mgmt_iot_central/lib +```