From a27c04b9f3150783d66fbf4692e7beb2d707432a Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 29 Mar 2022 02:14:18 +0000 Subject: [PATCH] CodeGen from PR 17439 in Azure/azure-rest-api-specs Dev IoT Central Microsoft.IotCentral 2021-11-01-preview (#17439) * Adds base for updating Microsoft.IoTCentral from version stable/2021-06-01 to version 2021-11-01-preview * Updates readme * Updates API version in new specs and examples * Initial update of IoT Central r resource definition * Initial work on private endpoint connection apis * more work on the private endpoint apis * removing some comments * updating put api * Adding examples * Fixing example file * Fixing api spec formatting * Formatting examples * Updating use of in App model definition * ... * Getting rid of definition * Referencing the common types Resource Def instead * ... * more updates * more updates * more updates 2:30PM * more updates 4:20 * Adding private link api * fixing the schema used by private link list * Fix private link list example * addressing some comments * marking default responses as error responses * Updating examples * removing body from some example responses * Adding x-ms-identifier * deleting invisible characters * Adding a common privatelinks.json v4 * updating network ruleset properties * forgot to update examples * trying to remove default responses from example files * Rogelio's comments * moving to the more common 'groupId' private link resource name * fixes and a revert of a change for breaking changes * rule fixes * adding list identifier for operations * fixed one rule and broke another * fixing broken validation rules * finishing up changes for ro's comments * updates * adding type to resource def * updating casing of iotApps to IoTApps * changing back to camelCased 'iotApps' * Delete old privatepreview version from repo * patch back to 202 * example fix and suppression * trying another supression config * improving async header documentation * trying to deduplicate schema definitions * updating the status response schemas for long running apis * updating examples * removing status responses from async apis * suppressing another error for networking * Update delete response codes * forgot to update delete operations * Updating response codes for put and delete apis * move from azure-asyncoperation to location header * Captilizing headers in examples * standardizing capitalization of 'IoT' * Adding provisioning state property * Adding 201 response to Application PUT * commit to start validation checks after tooling update * removing location header from put requests * adding azure-asyncoperation header back * adding a better description to the azure-asyncoperation header --- .../Microsoft.IotCentral.json | 460 ++++++++++++++++++ schemas/common/autogeneratedResources.json | 6 + 2 files changed, 466 insertions(+) create mode 100644 schemas/2021-11-01-preview/Microsoft.IotCentral.json diff --git a/schemas/2021-11-01-preview/Microsoft.IotCentral.json b/schemas/2021-11-01-preview/Microsoft.IotCentral.json new file mode 100644 index 0000000000..4dc52faaa8 --- /dev/null +++ b/schemas/2021-11-01-preview/Microsoft.IotCentral.json @@ -0,0 +1,460 @@ +{ + "id": "https://schema.management.azure.com/schemas/2021-11-01-preview/Microsoft.IotCentral.json#", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Microsoft.IoTCentral", + "description": "Microsoft IoTCentral Resource Types", + "resourceDefinitions": { + "iotApps": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2021-11-01-preview" + ] + }, + "identity": { + "oneOf": [ + { + "$ref": "#/definitions/SystemAssignedServiceIdentity" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Managed service identity (either system assigned, or none)" + }, + "location": { + "type": "string", + "description": "The geo-location where the resource lives" + }, + "name": { + "type": "string", + "description": "The ARM resource name of the IoT Central application." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/AppProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The properties of an IoT Central application." + }, + "resources": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/iotApps_privateEndpointConnections_childResource" + } + ] + } + }, + "sku": { + "oneOf": [ + { + "$ref": "#/definitions/AppSkuInfo" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Information about the SKU of the IoT Central application." + }, + "tags": { + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "properties": {} + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Resource tags." + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.IoTCentral/iotApps" + ] + } + }, + "required": [ + "apiVersion", + "location", + "name", + "properties", + "sku", + "type" + ], + "description": "Microsoft.IoTCentral/iotApps" + }, + "iotApps_privateEndpointConnections": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2021-11-01-preview" + ] + }, + "name": { + "type": "string", + "description": "The private endpoint connection name." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/PrivateEndpointConnectionProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Properties of the private endpoint connection." + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.IoTCentral/iotApps/privateEndpointConnections" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.IoTCentral/iotApps/privateEndpointConnections" + } + }, + "definitions": { + "AppProperties": { + "type": "object", + "properties": { + "displayName": { + "type": "string", + "description": "The display name of the application." + }, + "networkRuleSets": { + "oneOf": [ + { + "$ref": "#/definitions/NetworkRuleSets" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Network Rule Set Properties of this IoT Central application." + }, + "provisioningState": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Creating", + "Deleting", + "Updating", + "Succeeded", + "Failed", + "Canceled" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The provisioning state of the application." + }, + "publicNetworkAccess": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Enabled", + "Disabled" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Whether requests from the public network are allowed." + }, + "state": { + "oneOf": [ + { + "type": "string", + "enum": [ + "created", + "suspended" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The current state of the application." + }, + "subdomain": { + "type": "string", + "description": "The subdomain of the application." + }, + "template": { + "type": "string", + "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." + } + }, + "description": "The properties of an IoT Central application." + }, + "AppSkuInfo": { + "type": "object", + "properties": { + "name": { + "oneOf": [ + { + "type": "string", + "enum": [ + "ST0", + "ST1", + "ST2" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The name of the SKU." + } + }, + "required": [ + "name" + ], + "description": "Information about the SKU of the IoT Central application." + }, + "iotApps_privateEndpointConnections_childResource": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2021-11-01-preview" + ] + }, + "name": { + "type": "string", + "description": "The private endpoint connection name." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/PrivateEndpointConnectionProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Properties of the private endpoint connection." + }, + "type": { + "type": "string", + "enum": [ + "privateEndpointConnections" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.IoTCentral/iotApps/privateEndpointConnections" + }, + "NetworkRuleSetIpRule": { + "type": "object", + "properties": { + "filterName": { + "type": "string", + "description": "The readable name of the IP rule." + }, + "ipMask": { + "type": "string", + "description": "The CIDR block defining the IP range." + } + }, + "description": "An object for an IP range that will be allowed access." + }, + "NetworkRuleSets": { + "type": "object", + "properties": { + "applyToDevices": { + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Whether these rules apply for device connectivity to IoT Hub and Device Provisioning service associated with this application." + }, + "applyToIoTCentral": { + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Whether these rules apply for connectivity via IoT Central web portal and APIs." + }, + "defaultAction": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Allow", + "Deny" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The default network action to apply." + }, + "ipRules": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/NetworkRuleSetIpRule" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "List of IP rules." + } + }, + "description": "Network Rule Set Properties of this IoT Central application." + }, + "PrivateEndpoint": { + "type": "object", + "properties": {}, + "description": "The private endpoint resource." + }, + "PrivateEndpointConnectionProperties": { + "type": "object", + "properties": { + "privateEndpoint": { + "oneOf": [ + { + "$ref": "#/definitions/PrivateEndpoint" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The private endpoint resource." + }, + "privateLinkServiceConnectionState": { + "oneOf": [ + { + "$ref": "#/definitions/PrivateLinkServiceConnectionState" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "A collection of information about the state of the connection between service consumer and provider." + }, + "provisioningState": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Succeeded", + "Creating", + "Deleting", + "Failed" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The provisioning state of the private endpoint connection resource." + } + }, + "required": [ + "privateLinkServiceConnectionState" + ], + "description": "Properties of the private endpoint connection." + }, + "PrivateLinkServiceConnectionState": { + "type": "object", + "properties": { + "actionsRequired": { + "type": "string", + "description": "A message indicating if changes on the service provider require any updates on the consumer." + }, + "description": { + "type": "string", + "description": "The reason for approval/rejection of the connection." + }, + "status": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Pending", + "Approved", + "Rejected" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service." + } + }, + "description": "A collection of information about the state of the connection between service consumer and provider." + }, + "SystemAssignedServiceIdentity": { + "type": "object", + "properties": { + "type": { + "oneOf": [ + { + "type": "string", + "enum": [ + "None", + "SystemAssigned" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ] + } + }, + "required": [ + "type" + ], + "description": "Managed service identity (either system assigned, or none)" + } + } +} \ No newline at end of file diff --git a/schemas/common/autogeneratedResources.json b/schemas/common/autogeneratedResources.json index 9475539445..156954294d 100644 --- a/schemas/common/autogeneratedResources.json +++ b/schemas/common/autogeneratedResources.json @@ -9406,6 +9406,12 @@ { "$ref": "https://schema.management.azure.com/schemas/2021-06-01/Microsoft.IotCentral.json#/resourceDefinitions/iotApps" }, + { + "$ref": "https://schema.management.azure.com/schemas/2021-11-01-preview/Microsoft.IotCentral.json#/resourceDefinitions/iotApps" + }, + { + "$ref": "https://schema.management.azure.com/schemas/2021-11-01-preview/Microsoft.IotCentral.json#/resourceDefinitions/iotApps_privateEndpointConnections" + }, { "$ref": "https://schema.management.azure.com/schemas/2015-06-01/Microsoft.KeyVault.json#/resourceDefinitions/vaults" },