From cebd57b9eae2ae7608375013d23bfd604a3df188 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Sun, 24 Apr 2022 02:45:25 +0000 Subject: [PATCH] CodeGen from PR 17948 in Azure/azure-rest-api-specs [Hub Generated] Review request for Microsoft.Devices to add version stable/2022-02-05 (#17948) * Adds base for updating Microsoft.Devices from version stable/2021-10-15 to version 2022-02-05 * Updates readme * Updates API version in new specs and examples * definition changes * example changes * no comments * swagger modelval fix #1 * general validation fix #1 * revert readonly change (breaking change) * added locatio pvtEp example * misplaced location param * location in PvtEConn response * header addition * headers #2 * example change with location sans spec * header nesting change * header under headers * header example --- .../Microsoft.Devices.Provisioning.json | 669 ++++++++++++++++++ schemas/common/autogeneratedResources.json | 9 + 2 files changed, 678 insertions(+) create mode 100644 schemas/2022-02-05/Microsoft.Devices.Provisioning.json diff --git a/schemas/2022-02-05/Microsoft.Devices.Provisioning.json b/schemas/2022-02-05/Microsoft.Devices.Provisioning.json new file mode 100644 index 0000000000..7732bbc670 --- /dev/null +++ b/schemas/2022-02-05/Microsoft.Devices.Provisioning.json @@ -0,0 +1,669 @@ +{ + "id": "https://schema.management.azure.com/schemas/2022-02-05/Microsoft.Devices.Provisioning.json#", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Microsoft.Devices", + "description": "Microsoft Devices Resource Types", + "resourceDefinitions": { + "provisioningServices": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2022-02-05" + ] + }, + "etag": { + "type": "string", + "description": "The Etag field is *not* required. If it is provided in the response body, it must also be provided as a header per the normal ETag convention." + }, + "location": { + "type": "string", + "description": "The resource location." + }, + "name": { + "type": "string", + "description": "Name of provisioning service to create or update." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/IotDpsPropertiesDescription" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "the service specific properties of a provisioning service, including keys, linked iot hubs, current state, and system generated properties such as hostname and idScope" + }, + "resources": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/provisioningServices_certificates_childResource" + }, + { + "$ref": "#/definitions/provisioningServices_privateEndpointConnections_childResource" + } + ] + } + }, + "sku": { + "oneOf": [ + { + "$ref": "#/definitions/IotDpsSkuInfo" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "List of possible provisioning service SKUs." + }, + "tags": { + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "properties": {} + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The resource tags." + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Devices/provisioningServices" + ] + } + }, + "required": [ + "apiVersion", + "location", + "name", + "properties", + "sku", + "type" + ], + "description": "Microsoft.Devices/provisioningServices" + }, + "provisioningServices_certificates": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2022-02-05" + ] + }, + "name": { + "type": "string", + "description": "The name of the certificate create or update." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/CertificateProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The description of an X509 CA Certificate." + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Devices/provisioningServices/certificates" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.Devices/provisioningServices/certificates" + }, + "provisioningServices_privateEndpointConnections": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2022-02-05" + ] + }, + "name": { + "type": "string", + "description": "The name of the private endpoint connection" + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/PrivateEndpointConnectionProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The properties of a private endpoint connection" + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Devices/provisioningServices/privateEndpointConnections" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.Devices/provisioningServices/privateEndpointConnections" + } + }, + "definitions": { + "CertificateProperties": { + "type": "object", + "properties": { + "certificate": { + "oneOf": [ + { + "type": "string", + "pattern": "^(?:[A-Za-z0-9+\\/]{4})*(?:[A-Za-z0-9+\\/]{2}==|[A-Za-z0-9+\\/]{3}=)?$" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "base-64 representation of X509 certificate .cer file or just .pem file content." + }, + "isVerified": { + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Determines whether certificate has been verified." + } + }, + "description": "The description of an X509 CA Certificate." + }, + "IotDpsPropertiesDescription": { + "type": "object", + "properties": { + "allocationPolicy": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Hashed", + "GeoLatency", + "Static" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Allocation policy to be used by this provisioning service." + }, + "authorizationPolicies": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/SharedAccessSignatureAuthorizationRuleAccessRightsDescription" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "List of authorization keys for a provisioning service." + }, + "enableDataResidency": { + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Optional.\nIndicates if the DPS instance has Data Residency enabled, removing the cross geo-pair disaster recovery." + }, + "iotHubs": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/IotHubDefinitionDescription" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "List of IoT hubs associated with this provisioning service." + }, + "ipFilterRules": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/IpFilterRule" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The IP filter rules." + }, + "privateEndpointConnections": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/PrivateEndpointConnection" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Private endpoint connections created on this IotHub" + }, + "provisioningState": { + "type": "string", + "description": "The ARM provisioning state of the provisioning service." + }, + "publicNetworkAccess": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Enabled", + "Disabled" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Whether requests from Public Network are allowed." + }, + "state": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Activating", + "Active", + "Deleting", + "Deleted", + "ActivationFailed", + "DeletionFailed", + "Transitioning", + "Suspending", + "Suspended", + "Resuming", + "FailingOver", + "FailoverFailed" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Current state of the provisioning service." + } + }, + "description": "the service specific properties of a provisioning service, including keys, linked iot hubs, current state, and system generated properties such as hostname and idScope" + }, + "IotDpsSkuInfo": { + "type": "object", + "properties": { + "capacity": { + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The number of units to provision" + }, + "name": { + "oneOf": [ + { + "type": "string", + "enum": [ + "S1" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Sku name." + } + }, + "description": "List of possible provisioning service SKUs." + }, + "IotHubDefinitionDescription": { + "type": "object", + "properties": { + "allocationWeight": { + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "weight to apply for a given iot h." + }, + "applyAllocationPolicy": { + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "flag for applying allocationPolicy or not for a given iot hub." + }, + "connectionString": { + "type": "string", + "description": "Connection string of the IoT hub." + }, + "location": { + "type": "string", + "description": "ARM region of the IoT hub." + } + }, + "required": [ + "connectionString", + "location" + ], + "description": "Description of the IoT hub." + }, + "IpFilterRule": { + "type": "object", + "properties": { + "action": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Accept", + "Reject" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The desired action for requests captured by this rule." + }, + "filterName": { + "type": "string", + "description": "The name of the IP filter rule." + }, + "ipMask": { + "type": "string", + "description": "A string that contains the IP address range in CIDR notation for the rule." + }, + "target": { + "oneOf": [ + { + "type": "string", + "enum": [ + "all", + "serviceApi", + "deviceApi" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Target for requests captured by this rule." + } + }, + "required": [ + "action", + "filterName", + "ipMask" + ], + "description": "The IP filter rules for a provisioning Service." + }, + "PrivateEndpoint": { + "type": "object", + "properties": {}, + "description": "The private endpoint property of a private endpoint connection" + }, + "PrivateEndpointConnection": { + "type": "object", + "properties": { + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/PrivateEndpointConnectionProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The properties of a private endpoint connection" + } + }, + "required": [ + "properties" + ], + "description": "The private endpoint connection of a provisioning service" + }, + "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 property of a private endpoint connection" + }, + "privateLinkServiceConnectionState": { + "oneOf": [ + { + "$ref": "#/definitions/PrivateLinkServiceConnectionState" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The current state of a private endpoint connection" + } + }, + "required": [ + "privateLinkServiceConnectionState" + ], + "description": "The properties of a private endpoint connection" + }, + "PrivateLinkServiceConnectionState": { + "type": "object", + "properties": { + "actionsRequired": { + "type": "string", + "description": "Actions required for a private endpoint connection" + }, + "description": { + "type": "string", + "description": "The description for the current state of a private endpoint connection" + }, + "status": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Pending", + "Approved", + "Rejected", + "Disconnected" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The status of a private endpoint connection." + } + }, + "required": [ + "description", + "status" + ], + "description": "The current state of a private endpoint connection" + }, + "provisioningServices_certificates_childResource": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2022-02-05" + ] + }, + "name": { + "type": "string", + "description": "The name of the certificate create or update." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/CertificateProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The description of an X509 CA Certificate." + }, + "type": { + "type": "string", + "enum": [ + "certificates" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.Devices/provisioningServices/certificates" + }, + "provisioningServices_privateEndpointConnections_childResource": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2022-02-05" + ] + }, + "name": { + "type": "string", + "description": "The name of the private endpoint connection" + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/PrivateEndpointConnectionProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The properties of a private endpoint connection" + }, + "type": { + "type": "string", + "enum": [ + "privateEndpointConnections" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.Devices/provisioningServices/privateEndpointConnections" + }, + "SharedAccessSignatureAuthorizationRuleAccessRightsDescription": { + "type": "object", + "properties": { + "keyName": { + "type": "string", + "description": "Name of the key." + }, + "primaryKey": { + "type": "string", + "description": "Primary SAS key value." + }, + "rights": { + "oneOf": [ + { + "type": "string", + "enum": [ + "ServiceConfig", + "EnrollmentRead", + "EnrollmentWrite", + "DeviceConnect", + "RegistrationStatusRead", + "RegistrationStatusWrite" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Rights that this key has." + }, + "secondaryKey": { + "type": "string", + "description": "Secondary SAS key value." + } + }, + "required": [ + "keyName", + "rights" + ], + "description": "Description of the shared access key." + } + } +} \ No newline at end of file diff --git a/schemas/common/autogeneratedResources.json b/schemas/common/autogeneratedResources.json index b99518f62e..3900601c2e 100644 --- a/schemas/common/autogeneratedResources.json +++ b/schemas/common/autogeneratedResources.json @@ -6613,6 +6613,15 @@ { "$ref": "https://schema.management.azure.com/schemas/2021-10-15/Microsoft.Devices.Provisioning.json#/resourceDefinitions/provisioningServices_privateEndpointConnections" }, + { + "$ref": "https://schema.management.azure.com/schemas/2022-02-05/Microsoft.Devices.Provisioning.json#/resourceDefinitions/provisioningServices" + }, + { + "$ref": "https://schema.management.azure.com/schemas/2022-02-05/Microsoft.Devices.Provisioning.json#/resourceDefinitions/provisioningServices_certificates" + }, + { + "$ref": "https://schema.management.azure.com/schemas/2022-02-05/Microsoft.Devices.Provisioning.json#/resourceDefinitions/provisioningServices_privateEndpointConnections" + }, { "$ref": "https://schema.management.azure.com/schemas/2020-03-01-preview/Microsoft.DeviceUpdate.json#/resourceDefinitions/accounts" },