diff --git a/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/DPSCertificateCreateOrUpdate.json b/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/DPSCertificateCreateOrUpdate.json new file mode 100644 index 000000000000..2e26a1814bef --- /dev/null +++ b/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/DPSCertificateCreateOrUpdate.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "provisioningServiceName": "myFirstProvisioningService", + "resourceGroupName": "myResourceGroup", + "api-version":"2018-01-22", + "subscriptionId": "91d12660-3dec-467a-be2a-213b5544ddc0", + "certificateName": "cert", + "certificateDescription":{ + "certificate": "############################################" + } + }, + "responses": { + "200": { + "body": { + "properties": { + "subject": "CN=testdevice1", + "expiry": "Sat, 31 Dec 2039 23:59:59 GMT", + "thumbprint": "97388663832D0393C9246CAB4FBA2C8677185A25", + "isVerified": false, + "created": "Thu, 12 Oct 2017 19:23:50 GMT", + "updated": "Thu, 12 Oct 2017 19:23:50 GMT" + }, + "id": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/ProvisioningServives/myFirstProvisioningService/certificates/cert", + "name": "cert", + "type": "Microsoft.Devices/ProvisioningServices/Certificates", + "etag": "AAAAAAExpNs=" + } + } + } + } \ No newline at end of file diff --git a/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/DPSCheckNameAvailability.json b/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/DPSCheckNameAvailability.json new file mode 100644 index 000000000000..a9ec8da033af --- /dev/null +++ b/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/DPSCheckNameAvailability.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2018-01-22", + "subscriptionId": "91d12660-3dec-467a-be2a-213b5544ddc0", + "arguments": { + "name":"test213123" + } + }, + "responses": { + "200": { + "body": { + "nameAvailable": true, + "reason": "Invalid", + "message": "name is valid" + } + } + } +} \ No newline at end of file diff --git a/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/DPSCreate.json b/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/DPSCreate.json new file mode 100644 index 000000000000..263c08111fca --- /dev/null +++ b/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/DPSCreate.json @@ -0,0 +1,70 @@ +{ + "parameters": { + "provisioningServiceName": "myFirstProvisioningService", + "resourceGroupName": "myResourceGroup", + "api-version": "2018-01-22", + "subscriptionId": "91d12660-3dec-467a-be2a-213b5544ddc0", + "iotDpsDescription": { + "location": "East US", + "type": "Microsoft.Devices/ProvisioningServices", + "properties": { + }, + "sku": { + "name": "S1", + "tier": "Standard", + "capacity": 1 + }, + "tags": {} + } + }, + "responses": { + "200": { + "body": { + "etag": "AAAAAAAADGk=", + "name": "myFirstProvisioningService", + "location": "eastus", + "properties": { + "state": "Active", + "allocationPolicy": "Hashed", + "serviceOperationsHostName": "myFirstProvisioningService.azure-devices-provisioning.net", + "deviceProvisioningHostName": "global.azure-devices-provisioning.net", + "idScope": "0ne00000012", + "authorizationPolicies": [] + }, + "type": "Microsoft.Devices/ProvisioningServices", + "id": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups//providers/Microsoft.Devices/ProvisioningServices/myFirstProvisioningService", + "tags": { + }, + "sku": { + "name": "S1", + "tier": "Standard", + "capacity": 1 + } + } + }, + "201": { + "body": { + "etag": "AAAAAAAADGk=", + "name": "myFirstProvisioningService", + "location": "eastus", + "properties": { + "state": "Active", + "allocationPolicy": "Hashed", + "serviceOperationsHostName": "myFirstProvisioningService.azure-devices-provisioning.net", + "deviceProvisioningHostName": "global.azure-devices-provisioning.net", + "idScope": "0ne00000012", + "authorizationPolicies": [] + }, + "type": "Microsoft.Devices/ProvisioningServices", + "id": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups//providers/Microsoft.Devices/ProvisioningServices/myFirstProvisioningService", + "tags": { + }, + "sku": { + "name": "S1", + "tier": "Standard", + "capacity": 1 + } + } + } + } + } \ No newline at end of file diff --git a/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/DPSDelete.json b/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/DPSDelete.json new file mode 100644 index 000000000000..dadbac140ec7 --- /dev/null +++ b/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/DPSDelete.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "provisioningServiceName": "myFirstProvisioningService", + "resourceGroupName": "myResourceGroup", + "api-version": "2018-01-22", + "subscriptionId": "91d12660-3dec-467a-be2a-213b5544ddc0" + }, + "responses": { + "200": {}, + "204": {}, + "202": {}, + "404": {} + } + } \ No newline at end of file diff --git a/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/DPSDeleteCertificate.json b/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/DPSDeleteCertificate.json new file mode 100644 index 000000000000..ab0c7491f10f --- /dev/null +++ b/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/DPSDeleteCertificate.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "provisioningServiceName": "myFirstProvisioningService", + "resourceGroupName": "myResourceGroup", + "api-version":"2018-01-22", + "subscriptionId": "91d12660-3dec-467a-be2a-213b5544ddc0", + "certificateName": "cert", + "If-Match": "AAAAAAAADGk=" + }, + "responses": { + "200": {}, + "204": {} + } + } \ No newline at end of file diff --git a/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/DPSGenerateVerificationCode.json b/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/DPSGenerateVerificationCode.json new file mode 100644 index 000000000000..548e625684bc --- /dev/null +++ b/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/DPSGenerateVerificationCode.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "provisioningServiceName": "myFirstProvisioningService", + "resourceGroupName": "myResourceGroup", + "api-version": "2018-01-22", + "subscriptionId": "91d12660-3dec-467a-be2a-213b5544ddc0", + "certificateName": "cert", + "If-Match": "AAAAAAAADGk=" + }, + "responses": { + "200": { + "body": { + "name": "cert", + "properties": { + "verificationCode": "##################################", + "subject": "CN=andbucdevice1", + "expiry": "Sat, 31 Dec 2039 23:59:59 GMT", + "thumbprint": "##############################", + "isVerified": false, + "created": "Thu, 12 Oct 2017 19:23:50 GMT", + "updated": "Thu, 12 Oct 2017 19:26:56 GMT" + } + } + } + } +} \ No newline at end of file diff --git a/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/DPSGet.json b/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/DPSGet.json new file mode 100644 index 000000000000..d9a061d20f60 --- /dev/null +++ b/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/DPSGet.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "provisioningServiceName": "myFirstProvisioningService", + "resourceGroupName": "myResourceGroup", + "api-version": "2018-01-22", + "subscriptionId": "91d12660-3dec-467a-be2a-213b5544ddc0" + }, + "responses": { + "200": { + "body": { + "etag": "AAAAAAAADGk=", + "name": "myFirstProvisioningService", + "location": "eastus", + "properties": { + "state": "Active", + "allocationPolicy": "Hashed", + "serviceOperationsHostName": "myFirstProvisioningService.azure-devices-provisioning.net", + "deviceProvisioningHostName": "global.azure-devices-provisioning.net", + "idScope": "0ne00000012", + "authorizationPolicies": [] + }, + "type": "Microsoft.Devices/ProvisioningServices", + "id": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/ProvisioningServices/myFirstProvisioningService", + "tags": {}, + "sku": { + "name": "S1", + "tier": "Standard", + "capacity": 1 + } + } + } + } +} \ No newline at end of file diff --git a/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/DPSGetCertificate.json b/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/DPSGetCertificate.json new file mode 100644 index 000000000000..077a495eefe1 --- /dev/null +++ b/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/DPSGetCertificate.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "provisioningServiceName": "myFirstProvisioningService", + "resourceGroupName": "myResourceGroup", + "api-version": "2018-01-22", + "subscriptionId": "91d12660-3dec-467a-be2a-213b5544ddc0", + "certificateName": "cert" + }, + "responses": { + "200": { + "body": { + "properties": { + "subject": "CN=testdevice1", + "expiry": "Sat, 31 Dec 2039 23:59:59 GMT", + "thumbprint": "97388663832D0393C9246CAB4FBA2C8677185A25", + "isVerified": false, + "created": "Thu, 12 Oct 2017 19:23:50 GMT", + "updated": "Thu, 12 Oct 2017 19:23:50 GMT" + }, + "id": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/IotHubs/andbuc-hub/certificates/cert", + "name": "cert", + "type": "Microsoft.Devices/ProvisioningServices/Certificates", + "etag": "AAAAAAExpNs=" + } + } + } +} \ No newline at end of file diff --git a/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/DPSGetCertificates.json b/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/DPSGetCertificates.json new file mode 100644 index 000000000000..c21073d7a4fa --- /dev/null +++ b/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/DPSGetCertificates.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "provisioningServiceName": "myFirstProvisioningService", + "resourceGroupName": "myResourceGroup", + "api-version":"2018-01-22", + "subscriptionId": "91d12660-3dec-467a-be2a-213b5544ddc0" + }, + "responses": { + "200": { + "body": { + "value":[ + { + "properties": { + "subject": "CN=testdevice1", + "expiry": "Sat, 31 Dec 2039 23:59:59 GMT", + "thumbprint": "97388663832D0393C9246CAB4FBA2C8677185A25", + "isVerified": false, + "created": "Thu, 12 Oct 2017 19:23:50 GMT", + "updated": "Thu, 12 Oct 2017 19:23:50 GMT" + }, + "id": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/IotHubs/andbuc-hub/certificates/cert", + "name": "cert", + "type": "Microsoft.Devices/ProvisioningServices/Certificates", + "etag": "AAAAAAExpNs=" + } + ] + } + } + } + } \ No newline at end of file diff --git a/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/DPSGetKey.json b/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/DPSGetKey.json new file mode 100644 index 000000000000..b0648e8e6668 --- /dev/null +++ b/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/DPSGetKey.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "provisioningServiceName": "myFirstProvisioningService", + "resourceGroupName": "myResourceGroup", + "api-version":"2018-01-22", + "subscriptionId": "91d12660-3dec-467a-be2a-213b5544ddc0", + "keyName": "testKey" + }, + "responses": { + "200": { + "body": { + "keyName": "testKey", + "primaryKey": "##################################", + "secondaryKey": "################################", + "rights": "RegistrationStatusWrite" + } + } + } +} \ No newline at end of file diff --git a/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/DPSGetOperationResult.json b/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/DPSGetOperationResult.json new file mode 100644 index 000000000000..70be9828a1aa --- /dev/null +++ b/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/DPSGetOperationResult.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "provisioningServiceName": "myFirstProvisioningService", + "resourceGroupName": "myResourceGroup", + "api-version": "2018-01-22", + "subscriptionId": "91d12660-3dec-467a-be2a-213b5544ddc0", + "operationId": "MTY5OTNmZDctODI5Yy00N2E2LTkxNDQtMDU1NGIyYzY1ZjRl", + "asyncinfo": "1508265712453" + }, + "responses": { + "200": { + "body": { + "status":"Succeeded" + } + } + } +} \ No newline at end of file diff --git a/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/DPSGetValidSku.json b/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/DPSGetValidSku.json new file mode 100644 index 000000000000..148c4b77ede8 --- /dev/null +++ b/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/DPSGetValidSku.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "provisioningServiceName": "myFirstProvisioningService", + "resourceGroupName": "myResourceGroup", + "api-version": "2018-01-22", + "subscriptionId": "91d12660-3dec-467a-be2a-213b5544ddc0" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "S1" + } + ] + } + } + } + } \ No newline at end of file diff --git a/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/DPSListByResourceGroup.json b/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/DPSListByResourceGroup.json new file mode 100644 index 000000000000..565ad86f3ece --- /dev/null +++ b/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/DPSListByResourceGroup.json @@ -0,0 +1,55 @@ +{ + "parameters": { + "api-version": "2018-01-22", + "subscriptionId": "91d12660-3dec-467a-be2a-213b5544ddc0", + "resourceGroupName": "myResourceGroup" + }, + "responses": { + "200": { + "body": { + "value":[ + { + "etag": "AAAAAAAADGk=", + "name": "myFirstProvisioningService", + "location": "eastus", + "properties": { + "state": "Active", + "allocationPolicy": "Hashed", + "serviceOperationsHostName": "myFirstProvisioningService.azure-devices-provisioning.net", + "deviceProvisioningHostName": "global.azure-devices-provisioning.net", + "idScope": "0ne00000012" + }, + "type": "Microsoft.Devices/ProvisioningServices", + "id": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/ProvisioningServices/myFirstProvisioningService", + "tags": {}, + "sku": { + "name": "S1", + "tier": "Standard", + "capacity": 1 + } + }, + { + "etag": "AAAAAAAADGk=", + "name": "mySecondProvisioningService", + "location": "eastus", + "properties": { + "state": "Active", + "allocationPolicy": "Hashed", + "serviceOperationsHostName": "mySecondProvisioningService.azure-devices-provisioning.net", + "deviceProvisioningHostName": "global.azure-devices-provisioning.net", + "idScope": "0ne00000012" + }, + "type": "Microsoft.Devices/ProvisioningServices", + "id": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/ProvisioningServices/mySecondProvisioningService", + "tags": {}, + "sku": { + "name": "S1", + "tier": "Standard", + "capacity": 1 + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/DPSListBySubscription.json b/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/DPSListBySubscription.json new file mode 100644 index 000000000000..a051e7800fc8 --- /dev/null +++ b/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/DPSListBySubscription.json @@ -0,0 +1,54 @@ +{ + "parameters": { + "api-version": "2018-01-22", + "subscriptionId": "91d12660-3dec-467a-be2a-213b5544ddc0" + }, + "responses": { + "200": { + "body": { + "value":[ + { + "etag": "AAAAAAAADGk=", + "name": "myFirstProvisioningService", + "location": "eastus", + "properties": { + "state": "Active", + "allocationPolicy": "Hashed", + "serviceOperationsHostName": "myFirstProvisioningService.azure-devices-provisioning.net", + "deviceProvisioningHostName": "global.azure-devices-provisioning.net", + "idScope": "0ne00000012" + }, + "type": "Microsoft.Devices/ProvisioningServices", + "id": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/ProvisioningServices/myFirstProvisioningService", + "tags": {}, + "sku": { + "name": "S1", + "tier": "Standard", + "capacity": 1 + } + }, + { + "etag": "AAAAAAAADGk=", + "name": "mySecondProvisioningService", + "location": "eastus", + "properties": { + "state": "Active", + "allocationPolicy": "Hashed", + "serviceOperationsHostName": "myFirstProvisioningService.azure-devices-provisioning.net", + "deviceProvisioningHostName": "global.azure-devices-provisioning.net", + "idScope": "0ne00000012" + }, + "type": "Microsoft.Devices/ProvisioningServices", + "id": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/ProvisioningServices/mySecondProvisioningService", + "tags": {}, + "sku": { + "name": "S1", + "tier": "Standard", + "capacity": 1 + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/DPSListKeys.json b/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/DPSListKeys.json new file mode 100644 index 000000000000..943b80f802c1 --- /dev/null +++ b/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/DPSListKeys.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "provisioningServiceName": "myFirstProvisioningService", + "resourceGroupName": "myResourceGroup", + "api-version": "2018-01-22", + "subscriptionId": "91d12660-3dec-467a-be2a-213b5544ddc0" + }, + "responses": { + "200": { + "body": { + "value":[ + { + "keyName": "key1", + "primaryKey": "#####################################", + "secondaryKey": "###################################", + "rights": "ServiceConfig" + }, + { + "keyName": "key2", + "primaryKey": "#######################################", + "secondaryKey": "####################################=", + "rights": "ServiceConfig" + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/DPSOperations.json b/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/DPSOperations.json new file mode 100644 index 000000000000..484c2c9817ef --- /dev/null +++ b/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/DPSOperations.json @@ -0,0 +1,328 @@ +{ + "parameters": { + "api-version": "2018-01-22" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "Microsoft.Devices/register/action", + "display": { + "provider": "Microsoft Devices", + "resource": "IotHubs", + "operation": "Register Resource Provider", + "description": "Register the subscription for the IotHub resource provider and enables the creation of IotHub resources" + } + }, + { + "name": "Microsoft.Devices/IotHubs/diagnosticSettings/read", + "display": { + "provider": "Microsoft Devices", + "resource": "IotHubs", + "operation": "Get Diagnostic Setting", + "description": "Gets the diagnostic setting for the resource" + } + }, + { + "name": "Microsoft.Devices/IotHubs/diagnosticSettings/write", + "display": { + "provider": "Microsoft Devices", + "resource": "IotHubs", + "operation": "Set Diagnostic Setting", + "description": "Creates or updates the diagnostic setting for the resource" + } + }, + { + "name": "Microsoft.Devices/IotHubs/metricDefinitions/read", + "display": { + "provider": "Microsoft Devices", + "resource": "IotHubs", + "operation": "Read IotHub service metric definitions", + "description": "Gets the available metrics for the IotHub service" + } + }, + { + "name": "Microsoft.Devices/IotHubs/logDefinitions/read", + "display": { + "provider": "Microsoft Devices", + "resource": "IotHubs", + "operation": "Read IotHub service log definitions", + "description": "Gets the available log definitions for the IotHub Service" + } + }, + { + "name": "Microsoft.Devices/operations/Read", + "display": { + "provider": "Microsoft Devices", + "resource": "IotHubs", + "operation": "Get All ResourceProvider Operations", + "description": "Get All ResourceProvider Operations" + } + }, + { + "name": "Microsoft.Devices/checkNameAvailability/Action", + "display": { + "provider": "Microsoft Devices", + "resource": "IotHubs", + "operation": "Check If IotHub name is available", + "description": "Check If IotHub name is available" + } + }, + { + "name": "Microsoft.Devices/usages/Read", + "display": { + "provider": "Microsoft Devices", + "resource": "IotHubs", + "operation": "Get Subscription Usages", + "description": "Get subscription usage details for this provider." + } + }, + { + "name": "Microsoft.Devices/iotHubs/Read", + "display": { + "provider": "Microsoft Devices", + "resource": "IotHubs", + "operation": "Get IotHub(s)", + "description": "Gets the IotHub resource(s)" + } + }, + { + "name": "Microsoft.Devices/iotHubs/Write", + "display": { + "provider": "Microsoft Devices", + "resource": "IotHubs", + "operation": "Create or update IotHub Resource", + "description": "Create or update IotHub Resource" + } + }, + { + "name": "Microsoft.Devices/iotHubs/Delete", + "display": { + "provider": "Microsoft Devices", + "resource": "IotHubs", + "operation": "Delete IotHub Resource", + "description": "Delete IotHub Resource" + } + }, + { + "name": "Microsoft.Devices/iotHubs/iotHubStats/Read", + "display": { + "provider": "Microsoft Devices", + "resource": "IotHubs", + "operation": "Get IotHub Statistics", + "description": "Get IotHub Statistics" + } + }, + { + "name": "Microsoft.Devices/iotHubs/skus/Read", + "display": { + "provider": "Microsoft Devices", + "resource": "IotHubs", + "operation": "Get valid IotHub Skus", + "description": "Get valid IotHub Skus" + } + }, + { + "name": "Microsoft.Devices/iotHubs/listkeys/Action", + "display": { + "provider": "Microsoft Devices", + "resource": "IotHubs", + "operation": "Get all IotHub Keys", + "description": "Get all IotHub Keys" + } + }, + { + "name": "Microsoft.Devices/iotHubs/iotHubKeys/listkeys/Action", + "display": { + "provider": "Microsoft Devices", + "resource": "IotHubs", + "operation": "Get IotHub Key for the given name", + "description": "Get IotHub Key for the given name" + } + }, + { + "name": "Microsoft.Devices/iotHubs/eventHubEndpoints/consumerGroups/Write", + "display": { + "provider": "Microsoft Devices", + "resource": "IotHubs", + "operation": "Create EventHub Consumer Group", + "description": "Create EventHub Consumer Group" + } + }, + { + "name": "Microsoft.Devices/iotHubs/eventHubEndpoints/consumerGroups/Read", + "display": { + "provider": "Microsoft Devices", + "resource": "IotHubs", + "operation": "Get EventHub Consumer Group(s)", + "description": "Get EventHub Consumer Group(s)" + } + }, + { + "name": "Microsoft.Devices/iotHubs/eventHubEndpoints/consumerGroups/Delete", + "display": { + "provider": "Microsoft Devices", + "resource": "IotHubs", + "operation": "Delete EventHub Consumer Group", + "description": "Delete EventHub Consumer Group" + } + }, + { + "name": "Microsoft.Devices/iotHubs/exportDevices/Action", + "display": { + "provider": "Microsoft Devices", + "resource": "IotHubs", + "operation": "Export Devices", + "description": "Export Devices" + } + }, + { + "name": "Microsoft.Devices/iotHubs/importDevices/Action", + "display": { + "provider": "Microsoft Devices", + "resource": "IotHubs", + "operation": "Import Devices", + "description": "Import Devices" + } + }, + { + "name": "Microsoft.Devices/iotHubs/jobs/Read", + "display": { + "provider": "Microsoft Devices", + "resource": "IotHubs", + "operation": "Get the Job(s) on IotHub", + "description": "Get Job(s) details submitted on given IotHub" + } + }, + { + "name": "Microsoft.Devices/iotHubs/quotaMetrics/Read", + "display": { + "provider": "Microsoft Devices", + "resource": "IotHubs", + "operation": "Get Quota Metrics", + "description": "Get Quota Metrics" + } + }, + { + "name": "Microsoft.Devices/iotHubs/routing/routes/$testall/Action", + "display": { + "provider": "Microsoft Devices", + "resource": "IotHubs", + "operation": "Routing Rule Test All", + "description": "Test a message against all existing Routes" + } + }, + { + "name": "Microsoft.Devices/iotHubs/routing/routes/$testnew/Action", + "display": { + "provider": "Microsoft Devices", + "resource": "IotHubs", + "operation": "Routing Rule Test Route", + "description": "Test a message against a provided test Route" + } + }, + { + "name": "Microsoft.Devices/iotHubs/routingEndpointsHealth/Read", + "display": { + "provider": "Microsoft Devices", + "resource": "IotHubs", + "operation": "Get Endpoint Health", + "description": "Gets the health of all routing Endpoints for an IotHub" + } + }, + { + "name": "Microsoft.Devices/ProvisioningServices/diagnosticSettings/read", + "display": { + "provider": "Microsoft Devices", + "resource": "IotHubs", + "operation": "Get Diagnostic Setting", + "description": "Gets the diagnostic setting for the resource" + } + }, + { + "name": "Microsoft.Devices/ProvisioningServices/diagnosticSettings/write", + "display": { + "provider": "Microsoft Devices", + "resource": "IotHubs", + "operation": "Set Diagnostic Setting", + "description": "Creates or updates the diagnostic setting for the resource" + } + }, + { + "name": "Microsoft.Devices/ProvisioningServices/metricDefinitions/read", + "display": { + "provider": "Microsoft Devices", + "resource": "IotHubs", + "operation": "Read DPS service metric definitions", + "description": "Gets the available metrics for the DPS service" + } + }, + { + "name": "Microsoft.Devices/ProvisioningServices/logDefinitions/read", + "display": { + "provider": "Microsoft Devices", + "resource": "IotHubs", + "operation": "Read DPS service log definitions", + "description": "Gets the available log definitions for the DPS Service" + } + }, + { + "name": "Microsoft.Devices/checkProvisioningServiceNameAvailability/Action", + "display": { + "provider": "Microsoft Devices", + "resource": "ProvisioningServives", + "operation": "Check If Provisioning Service name is available", + "description": "Check If Provisioning Service name is available" + } + }, + { + "name": "Microsoft.Devices/provisioningServices/Read", + "display": { + "provider": "Microsoft Devices", + "resource": "ProvisioningServices", + "operation": "Get Provisioning Service resource" , + "description": "Get Provisioning Service resource" + } + }, + { + "name": "Microsoft.Devices/provisioningServices/Write", + "display": { + "provider": "Microsoft Devices", + "resource": "ProvisioningServices", + "operation": "Create Provisioning Service resource", + "description": "Create Provisioning Service resource" + } + }, + { + "name": "Microsoft.Devices/provisioningServices/Delete", + "display": { + "provider": "Microsoft Devices", + "resource": "ProvisioningServices", + "operation": "Delete Provisioning Service resource", + "description": "Delete Provisioning Service resource" + } + }, + { + "name": "Microsoft.Devices/provisioningServices/skus/Read", + "display": { + "provider": "Microsoft Devices", + "resource": "ProvisioningServices", + "operation": "Delete Provisioning Service resource", + "description": "Delete Provisioning Service resource" + } + }, + { + "name": "Microsoft.Devices/provisioningServices/listkeys/Action", + "display": { + "provider": "Microsoft Devices", + "resource": "ProvisioningServices", + "operation": "get security related metadata", + "description": "get security related metadata" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/DPSPatch.json b/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/DPSPatch.json new file mode 100644 index 000000000000..c8aeaa09965b --- /dev/null +++ b/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/DPSPatch.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "provisioningServiceName": "myFirstProvisioningService", + "resourceGroupName": "myResourceGroup", + "api-version": "2018-01-22", + "subscriptionId": "91d12660-3dec-467a-be2a-213b5544ddc0", + "location": "East US", + "type": "Microsoft.Devices/ProvisioningServices", + "ProvisioningServiceTags": { + "tags": { + "foo": "bar" + } + } + }, + "responses": { + "200": { + "body": { + "etag": "AAAAAAAADGk=", + "name": "myFirstProvisioningService", + "location": "eastus", + "properties": { + "state": "Active", + "allocationPolicy": "Hashed", + "serviceOperationsHostName": "myFirstProvisioningService.azure-devices-provisioning.net", + "deviceProvisioningHostName": "global.azure-devices-provisioning.net", + "idScope": "0ne00000012" + }, + "type": "Microsoft.Devices/ProvisioningServices", + "id": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/ProvisioningServices/myFirstProvisioningService", + "tags": { + "foo": "bar" + }, + "sku": { + "name": "S1", + "tier": "Standard", + "capacity": 1 + } + } + } + } + } \ No newline at end of file diff --git a/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/DPSUpdate.json b/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/DPSUpdate.json new file mode 100644 index 000000000000..586e2cf39db7 --- /dev/null +++ b/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/DPSUpdate.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "name": "myFirstProvisioningService", + "resourceGroupName": "myResourceGroup", + "api-version": "2018-01-22", + "subscriptionId": "91d12660-3dec-467a-be2a-213b5544ddc0", + "location": "East US", + "type": "Microsoft.Devices/ProvisioningServices", + "properties": { + "iotHubs": [ + { + "name": "test.azure-devices.net", + "connectionString": "#########", + "location": "westus" + }] + }, + "sku": { + "name": "S1", + "tier": "Standard", + "capacity": 1 + }, + "tags": {} + }, + "responses": { + "200": { + "body": { + "etag": "AAAAAAAADGk=", + "name": "myFirstProvisioningService", + "location": "eastus", + "properties": { + "state": "Active", + "allocationPolicy": "Hashed", + "serviceOperationsHostName": "myFirstProvisioningService.azure-devices-provisioning.net", + "deviceProvisioningHostName": "global.azure-devices-provisioning.net", + "idScope": "0ne00000012" + }, + "resourcegroup": "myResourceGroup", + "type": "Microsoft.Devices/ProvisioningServices", + "id": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/ProvisioningServices/myFirstProvisioningService", + "subscriptionid": "91d12660-3dec-467a-be2a-213b5544ddc0", + "tags": { + + }, + "sku": { + "name": "S1", + "tier": "Standard", + "capacity": 1 + } + } + } + } + } \ No newline at end of file diff --git a/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/DPSVerifyCertificate.json b/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/DPSVerifyCertificate.json new file mode 100644 index 000000000000..1e0fb01a9bb9 --- /dev/null +++ b/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/DPSVerifyCertificate.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "provisioningServiceName": "myFirstProvisioningService", + "resourceGroupName": "myResourceGroup", + "api-version": "2018-01-22", + "subscriptionId": "91d12660-3dec-467a-be2a-213b5544ddc0", + "certificateName": "cert", + "If-Match": "AAAAAAAADGk=", + "request": { + "certificate": "#####################################" + } + }, + "responses": { + "200": { + "body": { + "properties": { + "subject": "CN=andbucdevice1", + "expiry": "Sat, 31 Dec 2039 23:59:59 GMT", + "thumbprint": "97388663832D0393C9246CAB4FBA2C8677185A25", + "isVerified": true, + "created": "Thu, 12 Oct 2017 19:23:50 GMT", + "updated": "Thu, 12 Oct 2017 19:26:56 GMT" + }, + "id": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/ProvisioningServices/myFirstProvisioningService/certificates/cert", + "name": "cert", + "type": "Microsoft.Devices/ProvisioningServices/Certificates", + "etag": "AAAAAAExpTQ=" + } + } + } +} \ No newline at end of file diff --git a/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/iotdps.json b/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/iotdps.json new file mode 100644 index 000000000000..f0df376d9178 --- /dev/null +++ b/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2018-01-22/iotdps.json @@ -0,0 +1,1917 @@ +{ + "swagger": "2.0", + "info": { + "version": "2018-01-22", + "x-ms-code-generation-settings": { + "host": "management.azure.com" + }, + "title": "iotDpsClient", + "description": "API for using the Azure IoT Hub Device Provisioning Service features." + }, + + "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": { + "/providers/Microsoft.Devices/operations": { + "get": { + "tags": [ + "Operations" + ], + "operationId": "Operations_List", + "x-ms-examples": { + "DPSOperations": { "$ref": "./examples/DPSOperations.json" } + }, + "description": "Lists all of the available Microsoft.Devices REST API operations.", + "parameters": [ + { + "$ref": "#/parameters/api-version" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/OperationListResult" + } + }, + "default": { + "description": "Default error response.", + "schema": { + "$ref": "#/definitions/ErrorDetails" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{provisioningServiceName}/certificates/{certificateName}": { + "get": { + "tags": [ + "GET" + ], + "operationId": "DpsCertificate_Get", + "description": "Get the certificate from the provisioning service.", + "x-ms-examples": { + "DPSGetCertificate": { "$ref": "./examples/DPSGetCertificate.json" } + }, + "consumes": [], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "certificateName", + "in": "path", + "required": true, + "type": "string", + "description": "Name of the certificate to retrieve." + }, + { + "$ref": "#/parameters/subscriptionId" + }, + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "Resource group identifier." + }, + { + "name": "provisioningServiceName", + "in": "path", + "required": true, + "type": "string", + "description": "Name of the provisioning service the certificate is associated with." + }, + { + "name": "If-Match", + "in": "header", + "required": false, + "type": "string", + "description": "ETag of the certificate." + }, + { + "$ref": "#/parameters/api-version" + } + ], + "responses": { + "200": { + "description": "Metadata for the specified certificate.", + "schema": { + "$ref": "#/definitions/CertificateResponse" + } + }, + "default": { + "description": "Default error response.", + "schema": { + "$ref": "#/definitions/ErrorDetails" + } + } + } + }, + "put": { + "tags": [ + "PUT" + ], + "summary": "Upload the certificate to the provisioning service.", + "description": "Add new certificate or update an existing certificate.", + "operationId": "DpsCertificate_CreateOrUpdate", + "x-ms-examples": { + "DPSCreateOrUpdateCertificate": { "$ref": "./examples/DPSCertificateCreateOrUpdate.json" } + }, + "parameters": [ + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/subscriptionId" + }, + { + "name": "resourceGroupName", + "in": "path", + "description": "Resource group identifier.", + "required": true, + "type": "string" + }, + { + "name": "provisioningServiceName", + "in": "path", + "description": "The name of the provisioning service.", + "required": true, + "type": "string" + }, + { + "name": "certificateName", + "in": "path", + "description": "The name of the certificate create or update.", + "required": true, + "type": "string", + "maxLength": 256 + }, + { + "name": "certificateDescription", + "in": "body", + "description": "The certificate body.", + "required": true, + "schema": { + "$ref": "#/definitions/CertificateBodyDescription" + } + }, + { + "name": "If-Match", + "in": "header", + "required": false, + "type": "string", + "description": "ETag of the certificate. This is required to update an existing certificate, and ignored while creating a brand new certificate." + } + ], + "responses": { + "200": { + "description": "If certificate already exist and update was successful, the operation returns HTTP status code of 201 (OK).", + "schema": { + "$ref": "#/definitions/CertificateResponse" + } + }, + "default": { + "description": "Default error response.", + "schema": { + "$ref": "#/definitions/ErrorDetails" + } + } + }, + "deprecated": false, + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ] + }, + "delete": { + "tags": [ + "DELETE" + ], + "operationId": "DpsCertificate_Delete", + "summary": "Delete the Provisioning Service Certificate.", + "description": "Deletes the specified certificate assosciated with the Provisioning Service", + "x-ms-examples": { + "DPSDeleteCertificate": { "$ref": "./examples/DPSDeleteCertificate.json" } + }, + "consumes": [], + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/subscriptionId" + }, + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "Resource group identifier." + }, + { + "name": "If-Match", + "in": "header", + "required": true, + "type": "string", + "description": "ETag of the certificate" + }, + { + "name": "provisioningServiceName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the provisioning service." + }, + { + "name": "certificateName", + "in": "path", + "required": true, + "type": "string", + "description": "This is a mandatory field, and is the logical name of the certificate that the provisioning service will access by." + }, + { + "name": "certificate.name", + "in": "query", + "required": false, + "type": "string", + "description": "This is optional, and it is the Common Name of the certificate." + }, + { + "name": "certificate.rawBytes", + "in": "query", + "required": false, + "type": "string", + "format": "byte", + "description": "Raw data within the certificate." + }, + { + "name": "certificate.isVerified", + "in": "query", + "required": false, + "type": "boolean", + "description": "Indicates if certificate has been verified by owner of the private key." + }, + { + "name": "certificate.purpose", + "in": "query", + "required": false, + "type": "string", + "description": "A description that mentions the purpose of the certificate.", + "enum": [ + "clientAuthentication", + "serverAuthentication" + ], + "x-ms-enum": { + "name": "CertificatePurpose", + "modelAsString": true + } + }, + { + "name": "certificate.created", + "in": "query", + "description": "Time the certificate is created.", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "certificate.lastUpdated", + "in": "query", + "required": false, + "type": "string", + "description": "Time the certificate is last updated.", + "format": "date-time" + }, + { + "name": "certificate.hasPrivateKey", + "in": "query", + "required": false, + "type": "boolean", + "description": "Indicates if the certificate contains a private key." + }, + { + "name": "certificate.nonce", + "in": "query", + "required": false, + "type": "string", + "description": "Random number generated to indicate Proof of Possession." + }, + { + "$ref": "#/parameters/api-version" + } + ], + "responses": { + "200": { + "description": "OK." + }, + "204": { + "description": "No content." + }, + "default": { + "description": "Default error response.", + "schema": { + "$ref": "#/definitions/ErrorDetails" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{provisioningServiceName}": { + "get": { + "tags": [ + "GET" + ], + "summary": "Get the non-security related metadata of the provisioning service.", + "description": "Get the metadata of the provisioning service without SAS keys.", + "operationId": "IotDpsResource_Get", + "x-ms-examples": { + "DPSGet": { "$ref": "./examples/DPSGet.json" } + }, + "parameters": [ + { + "name": "provisioningServiceName", + "in": "path", + "required": true, + "type": "string", + "description": "Name of the provisioning service to retrieve." + }, + { + "$ref": "#/parameters/subscriptionId" + }, + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "Resource group name." + }, + { + "$ref": "#/parameters/api-version" + } + ], + "responses": { + "200": { + "description": "Provisioning service description with no keys is included in the response.", + "schema": { + "$ref": "#/definitions/ProvisioningServiceDescription" + } + }, + "default": { + "description": "Default error response", + "schema": { + "$ref": "#/definitions/ErrorDetails" + } + } + }, + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ] + }, + "put": { + "tags": [ + "PUT" + ], + "summary": "Create or update the metadata of the provisioning service.", + "description": "Create or update the metadata of the provisioning service. The usual pattern to modify a property is to retrieve the provisioning service metadata and security metadata, and then combine them with the modified values in a new body to update the provisioning service.", + "x-ms-long-running-operation": true, + "operationId": "IotDpsResource_CreateOrUpdate", + "x-ms-examples": { + "DPSCreate": { "$ref": "./examples/DPSCreate.json" } + }, + "parameters": [ + { + "$ref": "#/parameters/subscriptionId" + }, + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "Resource group identifier." + }, + { + "name": "provisioningServiceName", + "in": "path", + "required": true, + "type": "string", + "description": "Name of provisioning service to create or update." + }, + { + "name": "iotDpsDescription", + "in": "body", + "required": true, + "description": "Description of the provisioning service to create or update.", + "schema": { + "$ref": "#/definitions/ProvisioningServiceDescription" + } + }, + { + "$ref": "#/parameters/api-version" + } + ], + "responses": { + "200": { + "description": "The body contains all the non-security properties of the provisioning service. Security-related properties are set to null.", + "schema": { + "$ref": "#/definitions/ProvisioningServiceDescription" + } + }, + "201": { + "description": "This is a long running operation. The operation returns a 201 if the validation is complete. The response includes an Azure-AsyncOperation header that contains a status URL. Clients are expected to poll the status URL for the status of the operation. If successful, the operation returns HTTP status code of 201 (OK).", + "schema": { + "$ref": "#/definitions/ProvisioningServiceDescription" + } + }, + "default": { + "description": "Default error response.", + "schema": { + "$ref": "#/definitions/ErrorDetails" + } + } + }, + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ] + }, + "patch": { + "tags": [ + "PATCH" + ], + "summary": "Update an existing provisioning service's tags.", + "description": "Update an existing provisioning service's tags. to update other fields use the CreateOrUpdate method", + "x-ms-long-running-operation": true, + "operationId": "IotDpsResource_Update", + "x-ms-examples": { + "DPSPatch": { "$ref": "./examples/DPSPatch.json" } + }, + "parameters": [ + { + "$ref": "#/parameters/subscriptionId" + }, + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "Resource group identifier." + }, + { + "name": "provisioningServiceName", + "in": "path", + "required": true, + "type": "string", + "description": "Name of provisioning service to create or update." + }, + { + "name": "ProvisioningServiceTags", + "in": "body", + "required": true, + "description": "Updated tag information to set into the provisioning service instance.", + "schema": { + "$ref": "#/definitions/TagsResource" + } + }, + { + "$ref": "#/parameters/api-version" + } + ], + "responses": { + "200": { + "description": "Provisioning Service was successfully updated", + "schema": { + "$ref": "#/definitions/ProvisioningServiceDescription" + } + } + }, + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ] + }, + "delete": { + "tags": [ + "DELETE" + ], + "summary": "Delete the Provisioning Service", + "description": "Deletes the Provisioning Service.", + "x-ms-long-running-operation": true, + "operationId": "IotDpsResource_Delete", + "x-ms-examples": { + "DPSDelete": { "$ref": "./examples/DPSDelete.json" } + }, + "consumes": [], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "provisioningServiceName", + "in": "path", + "required": true, + "type": "string", + "description": "Name of provisioning service to delete." + }, + { + "$ref": "#/parameters/subscriptionId" + }, + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "Resource group identifier." + }, + { + "$ref": "#/parameters/api-version" + } + ], + "responses": { + "202": { + "description": "The provisioning service resource provider always returns a 202 Accepted status code with valid Location and Retry-After headers. The resource provider also sets the Azure-AsyncOperation header with a URL that points to the operation resource for this operation. Subsequent GET attempts on the resource after a DELETE operation return a resource representation that indicates a transitional provisioning state (such as Terminating). To retrieve the status of the operation, a client can either poll the URL returned in the Location header after the Retry-After interval, get the provisioning service status directly, or query the operation resource." + }, + "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." + }, + "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 provisioning service metadata in the service and the status of the delete operation is set to a completed state." + }, + "404": { + "description": "After the long running delete operation completes successfully, a 404 Not Found is returned when the status polling request no longer finds the provisioning service metadata in the service." + }, + "default": { + "description": "Default error response.", + "schema": { + "$ref": "#/definitions/ErrorDetails" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{provisioningServiceName}/certificates": { + "get": { + "tags": [ + "GET" + ], + "operationId": "DpsCertificates_List", + "description": "Get all the certificates tied to the provisioning service.", + "x-ms-examples": { + "DPSGetCertificates": { "$ref": "./examples/DPSGetCertificates.json" } + }, + "consumes": [], + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/subscriptionId" + }, + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "Name of resource group." + }, + { + "name": "provisioningServiceName", + "in": "path", + "required": true, + "type": "string", + "description": "Name of provisioning service to retrieve certificates for." + }, + { + "$ref": "#/parameters/api-version" + } + ], + "responses": { + "200": { + "description": "List of certificate descriptions in a JSON-serialized array.", + "schema": { + "$ref": "#/definitions/CertificateListDescription" + } + }, + "default": { + "description": "Default error response.", + "schema": { + "$ref": "#/definitions/ErrorDetails" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Devices/provisioningServices": { + "get": { + "tags": [ + "GET" + ], + "summary": "Get all the provisioning services in a subscription.", + "description": "List all the provisioning services for a given subscription id.", + "operationId": "IotDpsResource_ListBySubscription", + "x-ms-examples": { + "DPSListBySubscription": { "$ref": "./examples/DPSListBySubscription.json" } + }, + "parameters": [ + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/api-version" + } + ], + "responses": { + "200": { + "description": "This is a synchronous operation. The body contains a JSON-serialized array of the metadata from all the provisioning services in the subscription.", + "schema": { + "$ref": "#/definitions/ProvisioningServiceDescriptionListResult" + } + }, + "default": { + "description": "Default error response.", + "schema": { + "$ref": "#/definitions/ErrorDetails" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices": { + "get": { + "tags": [ + "GET" + ], + "operationId": "IotDpsResource_ListByResourceGroup", + "description": "Get a list of all provisioning services in the given resource group.", + "x-ms-examples": { + "DPSListByResourceGroup": { "$ref": "./examples/DPSListByResourceGroup.json" } + }, + "consumes": [], + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/subscriptionId" + }, + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "Resource group identifier." + }, + { + "$ref": "#/parameters/api-version" + } + ], + "responses": { + "200": { + "description": "List of provisioning services in the resource group.", + "schema": { + "$ref": "#/definitions/ProvisioningServiceDescriptionListResult" + } + }, + "default": { + "description": "Default error response.", + "schema": { + "$ref": "#/definitions/ErrorDetails" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{provisioningServiceName}/operationresults/{operationId}": { + "get": { + "tags": [ + "GET" + ], + "operationId": "IotDpsResource_GetOperationResult", + "description": "Gets the status of a long running operation, such as create, update or delete a provisioning service.", + "x-ms-examples": { + "DPSGetOperationResult": { "$ref": "./examples/DPSGetOperationResult.json" } + }, + "consumes": [], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "operationId", + "in": "path", + "required": true, + "type": "string", + "description": "Operation id corresponding to long running operation. Use this to poll for the status." + }, + { + "$ref": "#/parameters/subscriptionId" + }, + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "Resource group identifier." + }, + { + "name": "provisioningServiceName", + "in": "path", + "required": true, + "type": "string", + "description": "Name of provisioning service that the operation is running on." + }, + { + "name": "asyncinfo", + "in": "query", + "description": "Async header used to poll on the status of the operation, obtained while creating the long running operation.", + "required": true, + "type": "string", + "default": "true" + }, + { + "$ref": "#/parameters/api-version" + } + ], + "responses": { + "200": { + "description": "The status of the long running operation.", + "schema": { + "$ref": "#/definitions/AsyncOperationResult" + } + }, + "default": { + "description": "Default error response.", + "schema": { + "$ref": "#/definitions/ErrorDetails" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{provisioningServiceName}/skus": { + "get": { + "tags": [ + "GET" + ], + "summary": "Get the list of valid SKUs for a provisioning service.", + "description": "Gets the list of valid SKUs and tiers for a provisioning service.", + "operationId": "IotDpsResource_listValidSkus", + "x-ms-examples": { + "DPSGetValidSku": { "$ref": "./examples/DPSGetValidSku.json" } + }, + "parameters": [ + { + "name": "provisioningServiceName", + "in": "path", + "required": true, + "type": "string", + "description": "Name of provisioning service." + }, + { + "$ref": "#/parameters/subscriptionId" + }, + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "Name of resource group." + }, + { + "$ref": "#/parameters/api-version" + } + ], + "responses": { + "200": { + "description": "This is a synchronous operation. The body contains a JSON-serialized array of the valid SKUs for this provisioning service.", + "schema": { + "$ref": "#/definitions/IotDpsSkuDefinitionListResult" + } + }, + "default": { + "description": "Default error response.", + "schema": { + "$ref": "#/definitions/ErrorDetails" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{provisioningServiceName}/certificates/{certificateName}/generateVerificationCode": { + "post": { + "tags": [ + "POST" + ], + "operationId": "DpsCertificate_GenerateVerificationCode", + "description": "Generate verification code for Proof of Possession.", + "x-ms-examples": { + "DPSGenerateVerificationCode": { "$ref": "./examples/DPSGenerateVerificationCode.json" } + }, + "parameters": [ + { + "name": "certificateName", + "in": "path", + "required": true, + "type": "string", + "description": "The mandatory logical name of the certificate, that the provisioning service uses to access." + }, + { + "name": "If-Match", + "in": "header", + "required": true, + "type": "string", + "description": "ETag of the certificate. This is required to update an existing certificate, and ignored while creating a brand new certificate." + }, + { + "$ref": "#/parameters/subscriptionId" + }, + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "name of resource group." + }, + { + "name": "provisioningServiceName", + "in": "path", + "required": true, + "type": "string", + "description": "Name of provisioning service." + }, + { + "name": "certificate.name", + "in": "query", + "required": false, + "type": "string", + "description": "Common Name for the certificate." + }, + { + "name": "certificate.rawBytes", + "in": "query", + "required": false, + "type": "string", + "format": "byte", + "description": "Raw data of certificate." + }, + { + "name": "certificate.isVerified", + "in": "query", + "required": false, + "type": "boolean", + "description": "Indicates if the certificate has been verified by owner of the private key." + }, + { + "name": "certificate.purpose", + "in": "query", + "required": false, + "type": "string", + "description": "Description mentioning the purpose of the certificate.", + "enum": [ + "clientAuthentication", + "serverAuthentication" + ], + "x-ms-enum": { + "name": "CertificatePurpose", + "modelAsString": true + } + }, + { + "name": "certificate.created", + "in": "query", + "required": false, + "type": "string", + "format": "date-time", + "description": "Certificate creation time." + }, + { + "name": "certificate.lastUpdated", + "in": "query", + "required": false, + "type": "string", + "format": "date-time", + "description": "Certificate last updated time." + }, + { + "name": "certificate.hasPrivateKey", + "in": "query", + "required": false, + "type": "boolean", + "description": "Indicates if the certificate contains private key." + }, + { + "name": "certificate.nonce", + "in": "query", + "required": false, + "type": "string", + "description": "Random number generated to indicate Proof of Possession." + }, + { + "$ref": "#/parameters/api-version" + } + ], + "responses": { + "200": { + "description": "Generated verification code for that certificate is returned.", + "schema": { + "$ref": "#/definitions/VerificationCodeResponse" + } + }, + "default": { + "description": "Default error response.", + "schema": { + "$ref": "#/definitions/ErrorDetails" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{provisioningServiceName}/certificates/{certificateName}/verify": { + "post": { + "tags": [ + "POST" + ], + "operationId": "DpsCertificate_VerifyCertificate", + "summary": "Verify certificate's private key possession.", + "description": "Verifies the certificate's private key possession by providing the leaf cert issued by the verifying pre uploaded certificate.", + "x-ms-examples": { + "DPSVerifyCertificate": { "$ref": "./examples/DPSVerifyCertificate.json" } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "certificateName", + "in": "path", + "required": true, + "type": "string", + "description": "The mandatory logical name of the certificate, that the provisioning service uses to access." + }, + { + "name": "If-Match", + "in": "header", + "required": true, + "type": "string", + "description": "ETag of the certificate." + }, + { + "name": "request", + "in": "body", + "required": true, + "description": "The name of the certificate", + "schema": { + "$ref": "#/definitions/VerificationCodeRequest" + } + }, + { + "$ref": "#/parameters/subscriptionId" + }, + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "Resource group name." + }, + { + "name": "provisioningServiceName", + "in": "path", + "required": true, + "type": "string", + "description": "Provisioning service name." + }, + { + "name": "certificate.name", + "in": "query", + "required": false, + "type": "string", + "description": "Common Name for the certificate." + }, + { + "name": "certificate.rawBytes", + "in": "query", + "required": false, + "type": "string", + "format": "byte", + "description": "Raw data of certificate." + }, + { + "name": "certificate.isVerified", + "in": "query", + "required": false, + "type": "boolean", + "description": "Indicates if the certificate has been verified by owner of the private key." + }, + { + "name": "certificate.purpose", + "in": "query", + "required": false, + "description": "Describe the purpose of the certificate.", + "type": "string", + "enum": [ + "clientAuthentication", + "serverAuthentication" + ], + "x-ms-enum": { + "name": "CertificatePurpose", + "modelAsString": true + } + }, + { + "name": "certificate.created", + "in": "query", + "required": false, + "type": "string", + "format": "date-time", + "description": "Certificate creation time." + }, + { + "name": "certificate.lastUpdated", + "in": "query", + "required": false, + "type": "string", + "format": "date-time", + "description": "Certificate last updated time." + }, + { + "name": "certificate.hasPrivateKey", + "in": "query", + "required": false, + "type": "boolean", + "description": "Indicates if the certificate contains private key." + }, + { + "name": "certificate.nonce", + "in": "query", + "required": false, + "type": "string", + "description": "Random number generated to indicate Proof of Possession." + }, + { + "$ref": "#/parameters/api-version" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/CertificateResponse" + } + }, + "default": { + "description": "Default error response.", + "schema": { + "$ref": "#/definitions/ErrorDetails" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Devices/checkProvisioningServiceNameAvailability": { + "post": { + "tags": [ + "POST" + ], + "operationId": "IotDpsResource_CheckProvisioningServiceNameAvailability", + "x-ms-examples": { + "DPSCheckName": { "$ref": "./examples/DPSCheckNameAvailability.json" } + }, + "summary": "Check if a provisioning service name is available.", + "description": "Check if a provisioning service name is available. This will validate if the name is syntactically valid and if the name is usable", + "parameters": [ + { + "$ref": "#/parameters/subscriptionId" + }, + { + "name": "arguments", + "in": "body", + "required": true, + "description": "Set the name parameter in the OperationInputs structure to the name of the provisioning service to check.", + "schema": { + "$ref": "#/definitions/OperationInputs" + } + }, + { + "$ref": "#/parameters/api-version" + } + ], + "responses": { + "200": { + "description": "This is a synchronous operation. The body contains a JSON-serialized response that specifies whether the provisioning service name is available. If the name is not available, the body contains the reason.", + "schema": { + "$ref": "#/definitions/NameAvailabilityInfo" + } + }, + "default": { + "description": "Default error response.", + "schema": { + "$ref": "#/definitions/ErrorDetails" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{provisioningServiceName}/listkeys": { + "post": { + "tags": [ + "POST" + ], + "operationId": "IotDpsResource_ListKeys", + "x-ms-examples": { + "DPSListKeys": { "$ref": "./examples/DPSListKeys.json" } + }, + "summary": "Get the security metadata for a provisioning service.", + "description": "List the primary and secondary keys for a provisioning service.", + "parameters": [ + { + "name": "provisioningServiceName", + "in": "path", + "required": true, + "type": "string", + "description": "The provisioning service name to get the shared access keys for." + }, + { + "$ref": "#/parameters/subscriptionId" + }, + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "resource group name" + }, + { + "$ref": "#/parameters/api-version" + } + ], + "responses": { + "200": { + "description": "This is a synchronous operation. The body contains a JSON-serialized array of shared access policies, including keys, that you can use to access the provisioning service endpoints.", + "schema": { + "$ref": "#/definitions/SharedAccessSignatureAuthorizationRuleListResult" + } + }, + "default": { + "description": "Default error response.", + "schema": { + "$ref": "#/definitions/ErrorDetails" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{provisioningServiceName}/keys/{keyName}/listkeys": { + "post": { + "tags": [ + "POST" + ], + "operationId": "IotDpsResource_ListKeysForKeyName", + "x-ms-examples": { + "DPSGetKey": { "$ref": "./examples/DPSGetKey.json" } + }, + "summary": "Get a shared access policy by name from a provisioning service.", + "description": "List primary and secondary keys for a specific key name", + "parameters": [ + { + "name": "provisioningServiceName", + "in": "path", + "required": true, + "type": "string", + "description": "Name of the provisioning service." + }, + { + "name": "keyName", + "in": "path", + "required": true, + "type": "string", + "description": "Logical key name to get key-values for." + }, + { + "$ref": "#/parameters/subscriptionId" + }, + { + "name": "resourceGroupName", + "description": "The name of the resource group that contains the provisioning service.", + "in": "path", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/api-version" + } + ], + "responses": { + "200": { + "description": "This is a synchronous operation. The body contains a JSON-serialized shared access policy, including keys, that you can use to access one or more provisioning service endpoints.", + "schema": { + "$ref": "#/definitions/SharedAccessSignatureAuthorizationRule[AccessRightsDescription]" + } + }, + "default": { + "description": "Default error response.", + "schema": { + "$ref": "#/definitions/ErrorDetails" + } + } + } + } + } + }, + "definitions": { + "AsyncOperationResult": { + "type": "object", + "description": "Result of a long running operation.", + "properties": { + "status": { + "description": "current status of a long running operation.", + "type": "string" + }, + "error": { + "description": "Error message containing code, description and details", + "$ref": "#/definitions/ErrorMesssage" + } + } + }, + "ErrorMesssage": { + "description": "Error response containing message and code.", + "type": "object", + "properties": { + "code": { + "description": "standard error code", + "type": "string" + }, + "message": { + "description": "standard error description", + "type": "string" + }, + "details": { + "description": "detailed summary of error", + "type": "string" + } + } + }, + "CertificateListDescription": { + "description": "The JSON-serialized array of Certificate objects.", + "type": "object", + "properties": { + "value": { + "description": "The array of Certificate objects.", + "type": "array", + "items": { + "$ref": "#/definitions/CertificateResponse" + } + } + } + }, + "CertificateBodyDescription": { + "description": "The JSON-serialized X509 Certificate.", + "type": "object", + "properties": { + "certificate": { + "description": "Base-64 representation of the X509 leaf certificate .cer file or just .pem file content.", + "type": "string" + } + } + }, + "CertificateResponse": { + "description": "The X509 Certificate.", + "type": "object", + "properties": { + "properties": { + "description": "properties of a certificate", + "$ref": "#/definitions/CertificateProperties" + }, + "id": { + "readOnly": true, + "type": "string", + "description": "The resource identifier." + }, + "name": { + "description": "The name of the certificate.", + "type": "string", + "readOnly": true + }, + "etag": { + "description": "The entity tag.", + "type": "string", + "readOnly": true + }, + "type": { + "readOnly": true, + "type": "string", + "description": "The resource type." + } + }, + "x-ms-azure-resource": true + }, + "CertificateProperties": { + "description": "The description of an X509 CA Certificate.", + "type": "object", + "properties": { + "subject": { + "description": "The certificate's subject name.", + "type": "string", + "readOnly": true + }, + "expiry": { + "description": "The certificate's expiration date and time.", + "type": "string", + "format": "date-time-rfc1123", + "readOnly": true + }, + "thumbprint": { + "description": "The certificate's thumbprint.", + "type": "string", + "readOnly": true + }, + "isVerified": { + "description": "Determines whether certificate has been verified.", + "type": "boolean", + "readOnly": true + }, + "created": { + "description": "The certificate's creation date and time.", + "type": "string", + "format": "date-time-rfc1123", + "readOnly": true + }, + "updated": { + "description": "The certificate's last update date and time.", + "type": "string", + "format": "date-time-rfc1123", + "readOnly": true + } + } + }, + "IotDpsSkuInfo": { + "type": "object", + "description": "List of possible provisoning service SKUs.", + "properties": { + "name": { + "description": "Sku name.", + "enum": [ + "S1" + ], + "type": "string", + "x-ms-enum": { + "name": "IotDpsSku", + "modelAsString": true + } + }, + "tier": { + "type": "string", + "readOnly": true, + "description": "Pricing tier name of the provisioning service." + }, + "capacity": { + "format": "int64", + "type": "integer", + "description": "The number of units to provision" + } + } + }, + "ProvisioningServiceDescription": { + "description": "The description of the provisioning service.", + "type": "object", + "properties": { + "etag": { + "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.", + "type": "string" + }, + "properties": { + "description": "Service specific properties for a provisioning service", + "$ref": "#/definitions/IotDpsPropertiesDescription" + }, + "sku": { + "description": "Sku info for a provisioning Service.", + "$ref": "#/definitions/IotDpsSkuInfo" + } + }, + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "required": [ + "sku", + "properties" + ] + }, + "IotDpsPropertiesDescription": { + "description": "the service specific properties of a provisoning service, including keys, linked iot hubs, current state, and system generated properties such as hostname and idScope", + "type": "object", + "properties": { + "state": { + "description": "Current state of the provisioning service.", + "enum": [ + "Activating", + "Active", + "Deleting", + "Deleted", + "ActivationFailed", + "DeletionFailed", + "Transitioning", + "Suspending", + "Suspended", + "Resuming", + "FailingOver", + "FailoverFailed" + ], + "type": "string", + "x-ms-enum": { + "name": "state", + "modelAsString": true + } + }, + "provisioningState": { + "description": "The ARM provisioning state of the provisioning service.", + "type": "string" + }, + "iotHubs": { + "type": "array", + "description": "List of IoT hubs assosciated with this provisioning service.", + "items": { + "$ref": "#/definitions/IotHubDefinitionDescription" + } + }, + "allocationPolicy": { + "enum": [ + "Hashed", + "GeoLatency", + "Static" + ], + "type": "string", + "description": "Allocation policy to be used by this provisioning service.", + "x-ms-enum": { + "name": "AllocationPolicy", + "modelAsString": true + } + }, + "serviceOperationsHostName": { + "description": "Service endpoint for provisioning service.", + "type": "string", + "readOnly": true + }, + "deviceProvisioningHostName": { + "type": "string", + "description": "Device endpoint for this provisioning service.", + "readOnly": true + }, + "idScope": { + "type": "string", + "description": "Unique identifier of this provisioning service.", + "readOnly": true + }, + "authorizationPolicies": { + "description": "List of authorization keys for a provisioning service.", + "type": "array", + "items": { + "$ref": "#/definitions/SharedAccessSignatureAuthorizationRule[AccessRightsDescription]" + } + } + } + }, + "IotHubDefinitionDescription": { + "type": "object", + "description": "Description of the IoT hub.", + "properties": { + "applyAllocationPolicy": { + "description": "flag for applying allocationPolicy or not for a given iot hub.", + "type": "boolean" + }, + "allocationWeight": { + "description": "weight to apply for a given iot h.", + "format": "int32", + "type": "integer" + }, + "name": { + "type": "string", + "readOnly": true, + "description": "Host name of the IoT hub." + }, + "connectionString": { + "type": "string", + "description": "Connection string og the IoT hub." + }, + "location": { + "type": "string", + "description": "ARM region of the IoT hub." + } + }, + "required": [ + "connectionString", + "location" + ] + }, + "SharedAccessSignatureAuthorizationRule[AccessRightsDescription]": { + "type": "object", + "description": "Description of the shared access key.", + "properties": { + "keyName": { + "type": "string", + "description": "Name of the key." + }, + "primaryKey": { + "type": "string", + "description": "Primary SAS key value." + }, + "secondaryKey": { + "type": "string", + "description": "Secondary SAS key value." + }, + "rights": { + "description": "Rights that this key has.", + "enum": [ + "ServiceConfig", + "EnrollmentRead", + "EnrollmentWrite", + "DeviceConnect", + "RegistrationStatusRead", + "RegistrationStatusWrite" + ], + "type": "string", + "x-ms-enum": { + "name": "AccessRightsDescription", + "modelAsString": true + } + } + }, + "required": [ + "keyName", + "rights" + ] + }, + "Resource": { + "description": "The common properties of an Azure resource.", + "properties": { + "id": { + "readOnly": true, + "type": "string", + "description": "The resource identifier." + }, + "name": { + "readOnly": true, + "type": "string", + "description": "The resource name.", + "pattern": "^(?![0-9]+$)(?!-)[a-zA-Z0-9-]{2,49}[a-zA-Z0-9]$" + }, + "type": { + "readOnly": true, + "type": "string", + "description": "The resource type." + }, + "location": { + "type": "string", + "description": "The resource location." + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "The resource tags." + } + }, + "x-ms-azure-resource": true, + "required": [ + "location" + ] + }, + "OperationListResult": { + "description": "Result of the request to list IoT Hub operations. It contains a list of operations and a URL link to get the next set of results.", + "properties": { + "value": { + "description": "List of IoT Hub operations supported by the Microsoft.Devices resource provider.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/Operation" + } + }, + "nextLink": { + "readOnly": true, + "type": "string", + "description": "URL to get the next set of operation list results if there are any." + } + } + }, + "Operation": { + "description": "IoT Hub 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.", + "properties": { + "provider": { + "readOnly": true, + "type": "string", + "description": "Service provider: Microsoft Devices." + }, + "resource": { + "readOnly": true, + "type": "string", + "description": "Resource Type: ProvisioningServices." + }, + "operation": { + "readOnly": true, + "type": "string", + "description": "Name of the operation." + } + } + } + } + }, + "ErrorDetails": { + "description": "Error details.", + "type": "object", + "properties": { + "code": { + "description": "The error code.", + "type": "string", + "readOnly": true + }, + "httpStatusCode": { + "description": "The HTTP status code.", + "type": "string", + "readOnly": true + }, + "message": { + "description": "The error message.", + "type": "string", + "readOnly": true + }, + "details": { + "description": "The error details.", + "type": "string", + "readOnly": true + } + } + }, + "SharedAccessSignatureAuthorizationRuleListResult": { + "type": "object", + "description": "List of shared access keys.", + "properties": { + "value": { + "description": "The list of shared access policies.", + "type": "array", + "items": { + "$ref": "#/definitions/SharedAccessSignatureAuthorizationRule[AccessRightsDescription]" + } + }, + "nextLink": { + "description": "The next link.", + "type": "string", + "readOnly": true + } + } + }, + "IotDpsSkuDefinitionListResult": { + "type": "object", + "description": "List of available SKUs.", + "properties": { + "value": { + "description": "The list of SKU's", + "type": "array", + "items": { + "$ref": "#/definitions/IotDpsSkuDefinition" + } + }, + "nextLink": { + "description": "The next link.", + "type": "string", + "readOnly": true + } + } + }, + "IotDpsSkuDefinition": { + "type": "object", + "description": "Available Sku's of tier and units.", + "properties": { + "name": { + "description": "Sku name.", + "enum": [ + "S1" + ], + "type": "string", + "x-ms-enum": { + "name": "IotDpsSku", + "modelAsString": true + } + } + } + }, + "OperationInputs": { + "description": "Input values for operation results call.", + "type": "object", + "properties": { + "name": { + "description": "The name of the Provisioning Service to check.", + "type": "string" + } + }, + "required": [ + "name" + ] + }, + "NameAvailabilityInfo": { + "type": "object", + "description": "Description of name availability.", + "properties": { + "nameAvailable": { + "description": "specifies if a name is available or not", + "type": "boolean" + }, + "reason": { + "description": "specifies the reason a name is unavailable", + "enum": [ + "Invalid", + "AlreadyExists" + ], + "type": "string", + "x-ms-enum": { + "name": "NameUnavailabilityReason", + "modelAsString": true + } + }, + "message": { + "description": "message containing a etailed reason name is unavailable", + "type": "string" + } + } + }, + "TagsResource": { + "properties": { + "tags": { + "additionalProperties": { + "type": "string" + }, + "description": "Resource tags" + } + }, + "description": "A container holding only the Tags for a resource, allowing the user to update the tags on a Provisioning Service instance." + }, + "ProvisioningServiceDescriptionListResult": { + "type": "object", + "description": "List of provisioning service descriptions.", + "properties": { + "value": { + "description": "List of provisioning service descriptions.", + "type": "array", + "items": { + "$ref": "#/definitions/ProvisioningServiceDescription" + } + }, + "nextLink": { + "description": "the next link", + "type": "string", + "readOnly": true + } + } + }, + "VerificationCodeResponse": { + "type": "object", + "description": "Description of the response of the verification code.", + "properties": { + "name": { + "type": "string", + "description": "Name of certificate.", + "readOnly": true + }, + "etag": { + "readOnly": true, + "type": "string", + "description": "Request etag." + }, + "id": { + "readOnly": true, + "type": "string", + "description": "The resource identifier." + }, + "type": { + "readOnly": true, + "type": "string", + "description": "The resource type." + }, + "properties": { + "type": "object", + "properties": { + "verificationCode": { + "type": "string", + "description": "Verification code." + }, + "subject": { + "type": "string", + "description": "Certificate subject." + }, + "expiry": { + "type": "string", + "description": "Code expiry." + }, + "thumbprint": { + "type": "string", + "description": "Certificate thumbprint." + }, + "isVerified": { + "type": "boolean", + "description": "Indicate if the certificate is verified by owner of private key." + }, + "created": { + "type": "string", + "description": "Certificate created time." + }, + "updated": { + "type": "string", + "description": "Certificate updated time." + } + } + } + }, + "x-ms-azure-resource": true + }, + "VerificationCodeRequest": { + "type": "object", + "description": "The JSON-serialized leaf certificate", + "properties": { + "certificate": { + "description": "base-64 representation of X509 certificate .cer file or just .pem file content.", + "type": "string" + } + } + } + }, + "parameters": { + "subscriptionId": { + "name": "subscriptionId", + "in": "path", + "description": "The subscription identifier.", + "required": true, + "type": "string" + }, + "api-version": { + "name": "api-version", + "in": "query", + "description": "The version of the API.", + "required": true, + "type": "string" + } + } + } \ No newline at end of file diff --git a/specification/deviceprovisioningservices/resource-manager/readme.md b/specification/deviceprovisioningservices/resource-manager/readme.md index 31141f083874..8d5ee3c77490 100644 --- a/specification/deviceprovisioningservices/resource-manager/readme.md +++ b/specification/deviceprovisioningservices/resource-manager/readme.md @@ -24,7 +24,7 @@ These are the global settings for the API. ``` yaml openapi-type: arm -tag: package-2017-11 +tag: package-2018-01 ``` ### Tag: package-2017-08 @@ -45,6 +45,15 @@ input-file: - Microsoft.Devices/stable/2017-11-15/iotdps.json ``` +### Tag: package-2018-01 + +These settings apply only when `--tag=package-2018-01` is specified on the command line. + +``` yaml $(tag) == 'package-2018-01' +input-file: +- Microsoft.Devices/stable/2018-01-22/iotdps.json +``` + --- # Code Generation @@ -120,6 +129,17 @@ go: batch: - tag: package-2017-11 - tag: package-2017-08 + - tag: package-2018-01 +``` + + +### Tag: package-2018-01 and go + +These settings apply only when `--tag=package-2018-01 --go` is specified on the command line. +Please also specify `--go-sdk-folder=`. + +``` yaml $(tag)=='package-2017-11' && $(go) +output-folder: $(go-sdk-folder)/services/provisioningservices/mgmt/2018-01-22/iothub ``` ### Tag: package-2017-11 and go diff --git a/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/checkNameAvailability.json b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/checkNameAvailability.json new file mode 100644 index 000000000000..c4a2d329afb0 --- /dev/null +++ b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/checkNameAvailability.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "resourceName": "testHub", + "resourceGroupName": "myResourceGroup", + "api-version": "2018-01-22", + "subscriptionId": "91d12660-3dec-467a-be2a-213b5544ddc0", + "operationInputs": { + "name": "test-request" + } + }, + "responses": { + "200": { + "body": { + "nameAvailable": true, + "reason": "Invalid", + "message": "" + } + } + } +} \ No newline at end of file diff --git a/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_certificatescreateorupdate.json b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_certificatescreateorupdate.json new file mode 100644 index 000000000000..2d4be2a3aa04 --- /dev/null +++ b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_certificatescreateorupdate.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "resourceName": "iothub", + "resourceGroupName": "myResourceGroup", + "api-version":"2018-01-22", + "subscriptionId": "91d12660-3dec-467a-be2a-213b5544ddc0", + "certificateName": "cert", + "certificateDescription":{ + "certificate": "############################################" + } + }, + "responses": { + "201": { "body": { + "properties": { + "subject": "CN=testdevice1", + "expiry": "Sat, 31 Dec 2039 23:59:59 GMT", + "thumbprint": "97388663832D0393C9246CAB4FBA2C8677185A25", + "isVerified": false, + "created": "Thu, 12 Oct 2017 19:23:50 GMT", + "updated": "Thu, 12 Oct 2017 19:23:50 GMT" + }, + "id": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/ProvisioningServives/myFirstProvisioningService/certificates/cert", + "name": "cert", + "type": "Microsoft.Devices/IotHubs/Certificates", + "etag": "AAAAAAExpNs=" + }}, + "200": { + "body": { + "properties": { + "subject": "CN=testdevice1", + "expiry": "Sat, 31 Dec 2039 23:59:59 GMT", + "thumbprint": "97388663832D0393C9246CAB4FBA2C8677185A25", + "isVerified": false, + "created": "Thu, 12 Oct 2017 19:23:50 GMT", + "updated": "Thu, 12 Oct 2017 19:23:50 GMT" + }, + "id": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/ProvisioningServives/myFirstProvisioningService/certificates/cert", + "name": "cert", + "type": "Microsoft.Devices/IotHubs/Certificates", + "etag": "AAAAAAExpNs=" + } + } + } + } \ No newline at end of file diff --git a/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_certificatesdelete.json b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_certificatesdelete.json new file mode 100644 index 000000000000..4388f2679261 --- /dev/null +++ b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_certificatesdelete.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "resourceName": "myhub", + "resourceGroupName": "myResourceGroup", + "api-version": "2018-01-22", + "subscriptionId": "91d12660-3dec-467a-be2a-213b5544ddc0", + "certificateName": "cert", + "If-Match": "AAAAAAAADGk=" + }, + "responses": { + "200": {}, + "204": {} + } +} \ No newline at end of file diff --git a/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_certverify.json b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_certverify.json new file mode 100644 index 000000000000..1b64df894279 --- /dev/null +++ b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_certverify.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "resourceName": "myFirstProvisioningService", + "resourceGroupName": "myResourceGroup", + "api-version": "2018-01-22", + "subscriptionId": "91d12660-3dec-467a-be2a-213b5544ddc0", + "certificateName": "cert", + "If-Match": "AAAAAAAADGk=", + "certificateVerificationBody": { + "certificate": "#####################################" + } + }, + "responses": { + "200": { + "body": { + "properties": { + "subject": "CN=andbucdevice1", + "expiry": "Sat, 31 Dec 2039 23:59:59 GMT", + "thumbprint": "97388663832D0393C9246CAB4FBA2C8677185A25", + "isVerified": true, + "created": "Thu, 12 Oct 2017 19:23:50 GMT", + "updated": "Thu, 12 Oct 2017 19:26:56 GMT" + }, + "id": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/ProvisioningServices/myFirstProvisioningService/certificates/cert", + "name": "cert", + "type": "Microsoft.Devices/IotHubs/Certificates", + "etag": "AAAAAAExpTQ=" + } + } + } +} \ No newline at end of file diff --git a/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_createOrUpdate.json b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_createOrUpdate.json new file mode 100644 index 000000000000..f9ecea33caa7 --- /dev/null +++ b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_createOrUpdate.json @@ -0,0 +1,301 @@ +{ + "parameters": { + "resourceName": "testHub", + "resourceGroupName": "myResourceGroup", + "api-version": "2018-01-22", + "subscriptionId": "91d12660-3dec-467a-be2a-213b5544ddc0", + "iotHubDescription": { + "name": "iot-dps-cit-hub-1", + "type": "Microsoft.Devices/IotHubs", + "location": "centraluseuap", + "tags": {}, + "etag": "AAAAAAFD6M4=", + "properties": { + "operationsMonitoringProperties": { + "events": { + "None": "None", + "Connections": "None", + "DeviceTelemetry": "None", + "C2DCommands": "None", + "DeviceIdentityOperations": "None", + "FileUploadOperations": "None", + "Routes": "None" + } + }, + "state": "Active", + "provisioningState": "Succeeded", + "ipFilterRules": [], + "hostName": "iot-dps-cit-hub-1.azure-devices.net", + "eventHubEndpoints": { + "events": { + "retentionTimeInDays": 1, + "partitionCount": 2, + "partitionIds": [ + "0", + "1" + ], + "path": "iot-dps-cit-hub-1", + "endpoint": "sb://iothub-ns-iot-dps-ci-245306-76aca8e13b.servicebus.windows.net/" + }, + "operationsMonitoringEvents": { + "retentionTimeInDays": 1, + "partitionCount": 2, + "partitionIds": [ + "0", + "1" + ], + "path": "iot-dps-cit-hub-1-operationmonitoring", + "endpoint": "sb://iothub-ns-iot-dps-ci-245306-76aca8e13b.servicebus.windows.net/" + } + }, + "routing": { + "endpoints": { + "serviceBusQueues": [], + "serviceBusTopics": [], + "eventHubs": [], + "storageContainers": [] + }, + "routes": [], + "fallbackRoute": { + "name": "$fallback", + "source": "DeviceMessages", + "condition": "true", + "endpointNames": [ + "events" + ], + "isEnabled": true + } + }, + "storageEndpoints": { + "$default": { + "sasTtlAsIso8601": "PT1H", + "connectionString": "", + "containerName": "" + } + }, + "messagingEndpoints": { + "fileNotifications": { + "lockDurationAsIso8601": "PT1M", + "ttlAsIso8601": "PT1H", + "maxDeliveryCount": 10 + } + }, + "enableFileUploadNotifications": false, + "cloudToDevice": { + "maxDeliveryCount": 10, + "defaultTtlAsIso8601": "PT1H", + "feedback": { + "lockDurationAsIso8601": "PT1M", + "ttlAsIso8601": "PT1H", + "maxDeliveryCount": 10 + } + }, + "features": "None" + }, + "sku": { + "name": "S1", + "tier": "Standard", + "capacity": 1 + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/ae24ff83-d2ca-4fc8-9717-05dae4bba489/resourceGroups/myResourceGroup/providers/Microsoft.Devices/IotHubs/testHub", + "name": "testHub", + "type": "Microsoft.Devices/IotHubs", + "location": "centraluseuap", + "tags": {}, + "etag": "AAAAAAFD6M4=", + "properties": { + "operationsMonitoringProperties": { + "events": { + "None": "None", + "Connections": "None", + "DeviceTelemetry": "None", + "C2DCommands": "None", + "DeviceIdentityOperations": "None", + "FileUploadOperations": "None", + "Routes": "None" + } + }, + "state": "Active", + "provisioningState": "Succeeded", + "ipFilterRules": [], + "hostName": "iot-dps-cit-hub-1.azure-devices.net", + "eventHubEndpoints": { + "events": { + "retentionTimeInDays": 1, + "partitionCount": 2, + "partitionIds": [ + "0", + "1" + ], + "path": "iot-dps-cit-hub-1", + "endpoint": "sb://iothub-ns-iot-dps-ci-245306-76aca8e13b.servicebus.windows.net/" + }, + "operationsMonitoringEvents": { + "retentionTimeInDays": 1, + "partitionCount": 2, + "partitionIds": [ + "0", + "1" + ], + "path": "iot-dps-cit-hub-1-operationmonitoring", + "endpoint": "sb://iothub-ns-iot-dps-ci-245306-76aca8e13b.servicebus.windows.net/" + } + }, + "routing": { + "endpoints": { + "serviceBusQueues": [], + "serviceBusTopics": [], + "eventHubs": [], + "storageContainers": [] + }, + "routes": [], + "fallbackRoute": { + "name": "$fallback", + "source": "DeviceMessages", + "condition": "true", + "endpointNames": [ + "events" + ], + "isEnabled": true + } + }, + "storageEndpoints": { + "$default": { + "sasTtlAsIso8601": "PT1H", + "connectionString": "", + "containerName": "" + } + }, + "messagingEndpoints": { + "fileNotifications": { + "lockDurationAsIso8601": "PT1M", + "ttlAsIso8601": "PT1H", + "maxDeliveryCount": 10 + } + }, + "enableFileUploadNotifications": false, + "cloudToDevice": { + "maxDeliveryCount": 10, + "defaultTtlAsIso8601": "PT1H", + "feedback": { + "lockDurationAsIso8601": "PT1M", + "ttlAsIso8601": "PT1H", + "maxDeliveryCount": 10 + } + }, + "features": "None" + }, + "sku": { + "name": "S1", + "tier": "Standard", + "capacity": 1 + } + } + }, + "201": { + "body": { + "id": "/subscriptions/ae24ff83-d2ca-4fc8-9717-05dae4bba489/resourceGroups/myResourceGroup/providers/Microsoft.Devices/IotHubs/testHub", + "name": "testHub", + "type": "Microsoft.Devices/IotHubs", + "location": "centraluseuap", + "tags": {}, + "etag": "AAAAAAFD6M4=", + "properties": { + "operationsMonitoringProperties": { + "events": { + "None": "None", + "Connections": "None", + "DeviceTelemetry": "None", + "C2DCommands": "None", + "DeviceIdentityOperations": "None", + "FileUploadOperations": "None", + "Routes": "None" + } + }, + "state": "Active", + "provisioningState": "Succeeded", + "ipFilterRules": [], + "hostName": "iot-dps-cit-hub-1.azure-devices.net", + "eventHubEndpoints": { + "events": { + "retentionTimeInDays": 1, + "partitionCount": 2, + "partitionIds": [ + "0", + "1" + ], + "path": "iot-dps-cit-hub-1", + "endpoint": "sb://iothub-ns-iot-dps-ci-245306-76aca8e13b.servicebus.windows.net/" + }, + "operationsMonitoringEvents": { + "retentionTimeInDays": 1, + "partitionCount": 2, + "partitionIds": [ + "0", + "1" + ], + "path": "iot-dps-cit-hub-1-operationmonitoring", + "endpoint": "sb://iothub-ns-iot-dps-ci-245306-76aca8e13b.servicebus.windows.net/" + } + }, + "routing": { + "endpoints": { + "serviceBusQueues": [], + "serviceBusTopics": [], + "eventHubs": [], + "storageContainers": [] + }, + "routes": [], + "fallbackRoute": { + "name": "$fallback", + "source": "DeviceMessages", + "condition": "true", + "endpointNames": [ + "events" + ], + "isEnabled": true + } + }, + "storageEndpoints": { + "$default": { + "sasTtlAsIso8601": "PT1H", + "connectionString": "", + "containerName": "" + } + }, + "messagingEndpoints": { + "fileNotifications": { + "lockDurationAsIso8601": "PT1M", + "ttlAsIso8601": "PT1H", + "maxDeliveryCount": 10 + } + }, + "enableFileUploadNotifications": false, + "cloudToDevice": { + "maxDeliveryCount": 10, + "defaultTtlAsIso8601": "PT1H", + "feedback": { + "lockDurationAsIso8601": "PT1M", + "ttlAsIso8601": "PT1H", + "maxDeliveryCount": 10 + } + }, + "features": "None" + }, + "sku": { + "name": "S1", + "tier": "Standard", + "capacity": 1 + } + } + } + } +} + + + diff --git a/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_createconsumergroup.json b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_createconsumergroup.json new file mode 100644 index 000000000000..b8d10bdd2b5d --- /dev/null +++ b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_createconsumergroup.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "resourceName": "testHub", + "resourceGroupName": "myResourceGroup", + "api-version": "2018-01-22", + "eventHubEndpointName": "events", + "subscriptionId": "91d12660-3dec-467a-be2a-213b5544ddc0", + "name": "test" + }, + "responses": { + "200": { + "body": { + "properties": { + "created": "Thu, 15 Jun 2017 19:20:58 GMT" + }, + "id": "/subscriptions/cmd-sub-1/resourceGroups/cmd-rg-1/providers/Microsoft.Devices/IotHubs/test-hub-2/eventHubEndpoints/events/ConsumerGroups/%24Default", + "name": "test", + "type": "Microsoft.Devices/IotHubs/EventHubEndpoints/ConsumerGroups", + "etag": "AAAAAAFD6M4=" + } + } + } +} \ No newline at end of file diff --git a/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_delete.json b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_delete.json new file mode 100644 index 000000000000..94692d3ab547 --- /dev/null +++ b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_delete.json @@ -0,0 +1,206 @@ +{ + "parameters": { + "resourceName": "testHub", + "resourceGroupName": "myResourceGroup", + "api-version": "2018-01-22", + "subscriptionId": "91d12660-3dec-467a-be2a-213b5544ddc0" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/IotHubs/testHub", + "name": "testHub", + "type": "Microsoft.Devices/IotHubs", + "location": "centraluseuap", + "tags": {}, + "etag": "AAAAAAFD6M4=", + "properties": { + "operationsMonitoringProperties": { + "events": { + "None": "None", + "Connections": "None", + "DeviceTelemetry": "None", + "C2DCommands": "None", + "DeviceIdentityOperations": "None", + "FileUploadOperations": "None", + "Routes": "None" + } + }, + "state": "Active", + "provisioningState": "Succeeded", + "ipFilterRules": [], + "hostName": "iot-dps-cit-hub-1.azure-devices.net", + "eventHubEndpoints": { + "events": { + "retentionTimeInDays": 1, + "partitionCount": 2, + "partitionIds": [ + "0", + "1" + ], + "path": "iot-dps-cit-hub-1", + "endpoint": "sb://iothub-ns-iot-dps-ci-245306-76aca8e13b.servicebus.windows.net/" + }, + "operationsMonitoringEvents": { + "retentionTimeInDays": 1, + "partitionCount": 2, + "partitionIds": [ + "0", + "1" + ], + "path": "iot-dps-cit-hub-1-operationmonitoring", + "endpoint": "sb://iothub-ns-iot-dps-ci-245306-76aca8e13b.servicebus.windows.net/" + } + }, + "routing": { + "endpoints": { + "serviceBusQueues": [], + "serviceBusTopics": [], + "eventHubs": [], + "storageContainers": [] + }, + "routes": [], + "fallbackRoute": { + "source": "DeviceMessages", + "condition": "true", + "endpointNames": [ + "events" + ], + "isEnabled": true + } + }, + "storageEndpoints": { + "$default": { + "sasTtlAsIso8601": "PT1H", + "connectionString": "", + "containerName": "" + } + }, + "messagingEndpoints": { + "fileNotifications": { + "lockDurationAsIso8601": "PT1M", + "ttlAsIso8601": "PT1H", + "maxDeliveryCount": 10 + } + }, + "enableFileUploadNotifications": false, + "cloudToDevice": { + "maxDeliveryCount": 10, + "defaultTtlAsIso8601": "PT1H", + "feedback": { + "lockDurationAsIso8601": "PT1M", + "ttlAsIso8601": "PT1H", + "maxDeliveryCount": 10 + } + }, + "features": "None" + }, + "sku": { + "name": "S1", + "tier": "Standard", + "capacity": 1 + } + } + }, + "204": {}, + "202": { + "body": { + "id": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/IotHubs/testHub", + "name": "testHub", + "type": "Microsoft.Devices/IotHubs", + "location": "centraluseuap", + "tags": {}, + "etag": "AAAAAAFD6M4=", + "properties": { + "operationsMonitoringProperties": { + "events": { + "None": "None", + "Connections": "None", + "DeviceTelemetry": "None", + "C2DCommands": "None", + "DeviceIdentityOperations": "None", + "FileUploadOperations": "None", + "Routes": "None" + } + }, + "state": "Active", + "provisioningState": "Succeeded", + "ipFilterRules": [], + "hostName": "iot-dps-cit-hub-1.azure-devices.net", + "eventHubEndpoints": { + "events": { + "retentionTimeInDays": 1, + "partitionCount": 2, + "partitionIds": [ + "0", + "1" + ], + "path": "iot-dps-cit-hub-1", + "endpoint": "sb://iothub-ns-iot-dps-ci-245306-76aca8e13b.servicebus.windows.net/" + }, + "operationsMonitoringEvents": { + "retentionTimeInDays": 1, + "partitionCount": 2, + "partitionIds": [ + "0", + "1" + ], + "path": "iot-dps-cit-hub-1-operationmonitoring", + "endpoint": "sb://iothub-ns-iot-dps-ci-245306-76aca8e13b.servicebus.windows.net/" + } + }, + "routing": { + "endpoints": { + "serviceBusQueues": [], + "serviceBusTopics": [], + "eventHubs": [], + "storageContainers": [] + }, + "routes": [], + "fallbackRoute": { + "source": "DeviceMessages", + "condition": "true", + "endpointNames": [ + "events" + ], + "isEnabled": true + } + }, + "storageEndpoints": { + "$default": { + "sasTtlAsIso8601": "PT1H", + "connectionString": "", + "containerName": "" + } + }, + "messagingEndpoints": { + "fileNotifications": { + "lockDurationAsIso8601": "PT1M", + "ttlAsIso8601": "PT1H", + "maxDeliveryCount": 10 + } + }, + "enableFileUploadNotifications": false, + "cloudToDevice": { + "maxDeliveryCount": 10, + "defaultTtlAsIso8601": "PT1H", + "feedback": { + "lockDurationAsIso8601": "PT1M", + "ttlAsIso8601": "PT1H", + "maxDeliveryCount": 10 + } + }, + "features": "None" + }, + "sku": { + "name": "S1", + "tier": "Standard", + "capacity": 1 + } + } + }, + "404": { + "body": {} + } + } +} \ No newline at end of file diff --git a/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_deleteconsumergroup.json b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_deleteconsumergroup.json new file mode 100644 index 000000000000..5931a1124f20 --- /dev/null +++ b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_deleteconsumergroup.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "resourceName": "testHub", + "resourceGroupName": "myResourceGroup", + "api-version": "2018-01-22", + "eventHubEndpointName": "events", + "subscriptionId": "91d12660-3dec-467a-be2a-213b5544ddc0", + "name": "test" + }, + "responses": { + "200": {} + } +} \ No newline at end of file diff --git a/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_exportdevices.json b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_exportdevices.json new file mode 100644 index 000000000000..ac3d23fdc041 --- /dev/null +++ b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_exportdevices.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "resourceName": "testHub", + "resourceGroupName": "myResourceGroup", + "api-version": "2018-01-22", + "subscriptionId": "91d12660-3dec-467a-be2a-213b5544ddc0", + "exportDevicesParameters": { + "exportBlobContainerUri": "testBlob", + "excludeKeys": true + } + }, + "responses": { + "200": { + "body": { + "jobId": "test", + "startTimeUtc": "Thu, 15 Jun 2017 19:20:58 GMT", + "endTimeUtc": "Thu, 15 Jun 2017 19:20:58 GMT", + "type": "unknown", + "status": "unknown" + } + } + } +} \ No newline at end of file diff --git a/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_generateverificationcode.json b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_generateverificationcode.json new file mode 100644 index 000000000000..39fef43ce712 --- /dev/null +++ b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_generateverificationcode.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "resourceName": "testHub", + "resourceGroupName": "myResourceGroup", + "api-version": "2018-01-22", + "subscriptionId": "91d12660-3dec-467a-be2a-213b5544ddc0", + "certificateName": "cert", + "If-Match": "AAAAAAAADGk=" + }, + "responses": { + "200": { + "body": { + "name": "cert", + "properties": { + "verificationCode": "##################################", + "subject": "CN=andbucdevice1", + "expiry": "Sat, 31 Dec 2039 23:59:59 GMT", + "thumbprint": "##############################", + "isVerified": false, + "created": "Thu, 12 Oct 2017 19:23:50 GMT", + "updated": "Thu, 12 Oct 2017 19:26:56 GMT" + } + } + } + } +} \ No newline at end of file diff --git a/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_get.json b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_get.json new file mode 100644 index 000000000000..64e378a32938 --- /dev/null +++ b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_get.json @@ -0,0 +1,106 @@ +{ + "parameters": { + "resourceName": "testHub", + "resourceGroupName": "myResourceGroup", + "api-version": "2018-01-22", + "subscriptionId": "91d12660-3dec-467a-be2a-213b5544ddc0" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/IotHubs/testHub", + "name": "testHub", + "type": "Microsoft.Devices/IotHubs", + "location": "centraluseuap", + "tags": {}, + "etag": "AAAAAAFD6M4=", + "properties": { + "operationsMonitoringProperties": { + "events": { + "None": "None", + "Connections": "None", + "DeviceTelemetry": "None", + "C2DCommands": "None", + "DeviceIdentityOperations": "None", + "FileUploadOperations": "None", + "Routes": "None" + } + }, + "state": "Active", + "provisioningState": "Succeeded", + "ipFilterRules": [], + "hostName": "iot-dps-cit-hub-1.azure-devices.net", + "eventHubEndpoints": { + "events": { + "retentionTimeInDays": 1, + "partitionCount": 2, + "partitionIds": [ + "0", + "1" + ], + "path": "iot-dps-cit-hub-1", + "endpoint": "sb://iothub-ns-iot-dps-ci-245306-76aca8e13b.servicebus.windows.net/" + }, + "operationsMonitoringEvents": { + "retentionTimeInDays": 1, + "partitionCount": 2, + "partitionIds": [ + "0", + "1" + ], + "path": "iot-dps-cit-hub-1-operationmonitoring", + "endpoint": "sb://iothub-ns-iot-dps-ci-245306-76aca8e13b.servicebus.windows.net/" + } + }, + "routing": { + "endpoints": { + "serviceBusQueues": [], + "serviceBusTopics": [], + "eventHubs": [], + "storageContainers": [] + }, + "routes": [], + "fallbackRoute": { + "source": "DeviceMessages", + "condition": "true", + "endpointNames": [ + "events" + ], + "isEnabled": true + } + }, + "storageEndpoints": { + "$default": { + "sasTtlAsIso8601": "PT1H", + "connectionString": "", + "containerName": "" + } + }, + "messagingEndpoints": { + "fileNotifications": { + "lockDurationAsIso8601": "PT1M", + "ttlAsIso8601": "PT1H", + "maxDeliveryCount": 10 + } + }, + "enableFileUploadNotifications": false, + "cloudToDevice": { + "maxDeliveryCount": 10, + "defaultTtlAsIso8601": "PT1H", + "feedback": { + "lockDurationAsIso8601": "PT1M", + "ttlAsIso8601": "PT1H", + "maxDeliveryCount": 10 + } + }, + "features": "None" + }, + "sku": { + "name": "S1", + "tier": "Standard", + "capacity": 1 + } + } + } + } +} \ No newline at end of file diff --git a/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_getcertificate.json b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_getcertificate.json new file mode 100644 index 000000000000..5c03915d956e --- /dev/null +++ b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_getcertificate.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "resourceName": "testhub", + "resourceGroupName": "myResourceGroup", + "api-version": "2018-01-22", + "subscriptionId": "91d12660-3dec-467a-be2a-213b5544ddc0", + "certificateName": "cert" + }, + "responses": { + "200": { + "body": { + "properties": { + "subject": "CN=testdevice1", + "expiry": "Sat, 31 Dec 2039 23:59:59 GMT", + "thumbprint": "97388663832D0393C9246CAB4FBA2C8677185A25", + "isVerified": false, + "created": "Thu, 12 Oct 2017 19:23:50 GMT", + "updated": "Thu, 12 Oct 2017 19:23:50 GMT" + }, + "id": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/IotHubs/andbuc-hub/certificates/cert", + "name": "cert", + "type": "Microsoft.Devices/IotHubs/Certificates", + "etag": "AAAAAAExpNs=" + } + } + } +} \ No newline at end of file diff --git a/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_getconsumergroup.json b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_getconsumergroup.json new file mode 100644 index 000000000000..b8d10bdd2b5d --- /dev/null +++ b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_getconsumergroup.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "resourceName": "testHub", + "resourceGroupName": "myResourceGroup", + "api-version": "2018-01-22", + "eventHubEndpointName": "events", + "subscriptionId": "91d12660-3dec-467a-be2a-213b5544ddc0", + "name": "test" + }, + "responses": { + "200": { + "body": { + "properties": { + "created": "Thu, 15 Jun 2017 19:20:58 GMT" + }, + "id": "/subscriptions/cmd-sub-1/resourceGroups/cmd-rg-1/providers/Microsoft.Devices/IotHubs/test-hub-2/eventHubEndpoints/events/ConsumerGroups/%24Default", + "name": "test", + "type": "Microsoft.Devices/IotHubs/EventHubEndpoints/ConsumerGroups", + "etag": "AAAAAAFD6M4=" + } + } + } +} \ No newline at end of file diff --git a/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_getjob.json b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_getjob.json new file mode 100644 index 000000000000..572bedcfa89f --- /dev/null +++ b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_getjob.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "resourceName": "testHub", + "resourceGroupName": "myResourceGroup", + "api-version": "2018-01-22", + "subscriptionId": "91d12660-3dec-467a-be2a-213b5544ddc0", + "jobId": "test" + }, + "responses": { + "200": { + "body": { + "jobId": "test", + "startTimeUtc": "Thu, 15 Jun 2017 19:20:58 GMT", + "endTimeUtc": "Thu, 15 Jun 2017 19:20:58 GMT", + "type": "unknown", + "status": "unknown" + } + } + } +} \ No newline at end of file diff --git a/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_getkey.json b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_getkey.json new file mode 100644 index 000000000000..e9c85747001b --- /dev/null +++ b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_getkey.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "resourceName": "testHub", + "resourceGroupName": "myResourceGroup", + "api-version": "2018-01-22", + "subscriptionId": "91d12660-3dec-467a-be2a-213b5544ddc0", + "keyName": "iothubowner" + }, + "responses": { + "200": { + "body": { + "keyName": "iothubowner", + "primaryKey": "2aWPrKloLLdcug12ZHNpA0e07yJmRRmYMXDLpEOTd/Y=", + "secondaryKey": "DLyFnDTGMDK0BU2QjT5TCkNBQ4h08mi20vOqWMC7TxU=", + "rights": "RegistryWrite, ServiceConnect, DeviceConnect" + } + } + } +} \ No newline at end of file diff --git a/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_getskus.json b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_getskus.json new file mode 100644 index 000000000000..e26633d6328f --- /dev/null +++ b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_getskus.json @@ -0,0 +1,53 @@ +{ + "parameters": { + "resourceName": "testHub", + "resourceGroupName": "myResourceGroup", + "api-version": "2018-01-22", + "subscriptionId": "91d12660-3dec-467a-be2a-213b5544ddc0" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "resourceType": "Microsoft.Devices/IotHubs", + "sku": { + "name": "S1", + "tier": "Standard" + }, + "capacity": { + "default": 1, + "scaleType": "Manual" + } + }, + { + "resourceType": "Microsoft.Devices/IotHubs", + "sku": { + "name": "S2", + "tier": "Standard" + }, + "capacity": { + "minimum": 1, + "maximum": 200, + "default": 1, + "scaleType": "Manual" + } + }, + { + "resourceType": "Microsoft.Devices/IotHubs", + "sku": { + "name": "S3", + "tier": "Standard" + }, + "capacity": { + "minimum": 1, + "maximum": 10, + "default": 1, + "scaleType": "Manual" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_importdevices.json b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_importdevices.json new file mode 100644 index 000000000000..33ae3895660f --- /dev/null +++ b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_importdevices.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "resourceName": "testHub", + "resourceGroupName": "myResourceGroup", + "api-version": "2018-01-22", + "subscriptionId": "91d12660-3dec-467a-be2a-213b5544ddc0", + "importDevicesParameters": { + "inputBlobContainerUri": "testBlob", + "outputBlobContainerUri": "testBlob" + } + }, + "responses": { + "200": { + "body": { + "jobId": "test", + "startTimeUtc": "Thu, 15 Jun 2017 19:20:58 GMT", + "endTimeUtc": "Thu, 15 Jun 2017 19:20:58 GMT", + "type": "unknown", + "status": "unknown" + } + } + } +} \ No newline at end of file diff --git a/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_listbyrg.json b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_listbyrg.json new file mode 100644 index 000000000000..1f45e0518359 --- /dev/null +++ b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_listbyrg.json @@ -0,0 +1,111 @@ +{ + "parameters": { + "resourceName": "testHub", + "resourceGroupName": "myResourceGroup", + "api-version": "2018-01-22", + "subscriptionId": "91d12660-3dec-467a-be2a-213b5544ddc0" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/IotHubs/testHub", + "name": "testHub", + "type": "Microsoft.Devices/IotHubs", + "location": "centraluseuap", + "tags": {}, + "etag": "AAAAAAFD6M4=", + "properties": { + "operationsMonitoringProperties": { + "events": { + "None": "None", + "Connections": "None", + "DeviceTelemetry": "None", + "C2DCommands": "None", + "DeviceIdentityOperations": "None", + "FileUploadOperations": "None", + "Routes": "None" + } + }, + "state": "Active", + "provisioningState": "Succeeded", + "ipFilterRules": [], + "hostName": "iot-dps-cit-hub-1.azure-devices.net", + "eventHubEndpoints": { + "events": { + "retentionTimeInDays": 1, + "partitionCount": 2, + "partitionIds": [ + "0", + "1" + ], + "path": "iot-dps-cit-hub-1", + "endpoint": "sb://iothub-ns-iot-dps-ci-245306-76aca8e13b.servicebus.windows.net/" + }, + "operationsMonitoringEvents": { + "retentionTimeInDays": 1, + "partitionCount": 2, + "partitionIds": [ + "0", + "1" + ], + "path": "iot-dps-cit-hub-1-operationmonitoring", + "endpoint": "sb://iothub-ns-iot-dps-ci-245306-76aca8e13b.servicebus.windows.net/" + } + }, + "routing": { + "endpoints": { + "serviceBusQueues": [], + "serviceBusTopics": [], + "eventHubs": [], + "storageContainers": [] + }, + "routes": [], + "fallbackRoute": { + "name": "$fallback", + "source": "DeviceMessages", + "condition": "true", + "endpointNames": [ + "events" + ], + "isEnabled": true + } + }, + "storageEndpoints": { + "$default": { + "sasTtlAsIso8601": "PT1H", + "connectionString": "", + "containerName": "" + } + }, + "messagingEndpoints": { + "fileNotifications": { + "lockDurationAsIso8601": "PT1M", + "ttlAsIso8601": "PT1H", + "maxDeliveryCount": 10 + } + }, + "enableFileUploadNotifications": false, + "cloudToDevice": { + "maxDeliveryCount": 10, + "defaultTtlAsIso8601": "PT1H", + "feedback": { + "lockDurationAsIso8601": "PT1M", + "ttlAsIso8601": "PT1H", + "maxDeliveryCount": 10 + } + }, + "features": "None" + }, + "sku": { + "name": "S1", + "tier": "Standard", + "capacity": 1 + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_listbysubscription.json b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_listbysubscription.json new file mode 100644 index 000000000000..b8af4f55bb2a --- /dev/null +++ b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_listbysubscription.json @@ -0,0 +1,110 @@ +{ + "parameters": { + "resourceName": "testHub", + "api-version": "2018-01-22", + "subscriptionId": "91d12660-3dec-467a-be2a-213b5544ddc0" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/IotHubs/testHub", + "name": "testHub", + "type": "Microsoft.Devices/IotHubs", + "location": "centraluseuap", + "tags": {}, + "etag": "AAAAAAFD6M4=", + "properties": { + "operationsMonitoringProperties": { + "events": { + "None": "None", + "Connections": "None", + "DeviceTelemetry": "None", + "C2DCommands": "None", + "DeviceIdentityOperations": "None", + "FileUploadOperations": "None", + "Routes": "None" + } + }, + "state": "Active", + "provisioningState": "Succeeded", + "ipFilterRules": [], + "hostName": "iot-dps-cit-hub-1.azure-devices.net", + "eventHubEndpoints": { + "events": { + "retentionTimeInDays": 1, + "partitionCount": 2, + "partitionIds": [ + "0", + "1" + ], + "path": "iot-dps-cit-hub-1", + "endpoint": "sb://iothub-ns-iot-dps-ci-245306-76aca8e13b.servicebus.windows.net/" + }, + "operationsMonitoringEvents": { + "retentionTimeInDays": 1, + "partitionCount": 2, + "partitionIds": [ + "0", + "1" + ], + "path": "iot-dps-cit-hub-1-operationmonitoring", + "endpoint": "sb://iothub-ns-iot-dps-ci-245306-76aca8e13b.servicebus.windows.net/" + } + }, + "routing": { + "endpoints": { + "serviceBusQueues": [], + "serviceBusTopics": [], + "eventHubs": [], + "storageContainers": [] + }, + "routes": [], + "fallbackRoute": { + "name": "$fallback", + "source": "DeviceMessages", + "condition": "true", + "endpointNames": [ + "events" + ], + "isEnabled": true + } + }, + "storageEndpoints": { + "$default": { + "sasTtlAsIso8601": "PT1H", + "connectionString": "", + "containerName": "" + } + }, + "messagingEndpoints": { + "fileNotifications": { + "lockDurationAsIso8601": "PT1M", + "ttlAsIso8601": "PT1H", + "maxDeliveryCount": 10 + } + }, + "enableFileUploadNotifications": false, + "cloudToDevice": { + "maxDeliveryCount": 10, + "defaultTtlAsIso8601": "PT1H", + "feedback": { + "lockDurationAsIso8601": "PT1M", + "ttlAsIso8601": "PT1H", + "maxDeliveryCount": 10 + } + }, + "features": "None" + }, + "sku": { + "name": "S1", + "tier": "Standard", + "capacity": 1 + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_listcertificates.json b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_listcertificates.json new file mode 100644 index 000000000000..e314cf68e320 --- /dev/null +++ b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_listcertificates.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "resourceName": "testhub", + "resourceGroupName": "myResourceGroup", + "api-version": "2018-01-22", + "subscriptionId": "91d12660-3dec-467a-be2a-213b5544ddc0" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "subject": "CN=testdevice1", + "expiry": "Sat, 31 Dec 2039 23:59:59 GMT", + "thumbprint": "97388663832D0393C9246CAB4FBA2C8677185A25", + "isVerified": false, + "created": "Thu, 12 Oct 2017 19:23:50 GMT", + "updated": "Thu, 12 Oct 2017 19:23:50 GMT" + }, + "id": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/IotHubs/andbuc-hub/certificates/cert", + "name": "cert", + "type": "Microsoft.Devices/IotHubs/Certificates", + "etag": "AAAAAAExpNs=" + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_listehgroups.json b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_listehgroups.json new file mode 100644 index 000000000000..b38011f2b7dc --- /dev/null +++ b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_listehgroups.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "resourceName": "testHub", + "resourceGroupName": "myResourceGroup", + "api-version": "2018-01-22", + "eventHubEndpointName": "events", + "subscriptionId": "91d12660-3dec-467a-be2a-213b5544ddc0" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "created": "Thu, 15 Jun 2017 19:20:58 GMT" + }, + "id": "/subscriptions/cmd-sub-1/resourceGroups/cmd-rg-1/providers/Microsoft.Devices/IotHubs/test-hub-2/eventHubEndpoints/events/ConsumerGroups/%24Default", + "name": "$Default", + "type": "Microsoft.Devices/IotHubs/EventHubEndpoints/ConsumerGroups", + "etag": "AAAAAAFD6M4=" + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_listjobs.json b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_listjobs.json new file mode 100644 index 000000000000..c2a5bbb9d73e --- /dev/null +++ b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_listjobs.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "resourceName": "testHub", + "resourceGroupName": "myResourceGroup", + "api-version": "2018-01-22", + "subscriptionId": "91d12660-3dec-467a-be2a-213b5544ddc0" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "jobId": "test", + "startTimeUtc": "Thu, 15 Jun 2017 19:20:58 GMT", + "endTimeUtc": "Thu, 15 Jun 2017 19:20:58 GMT", + "type": "unknown", + "status": "unknown" + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_listkeys.json b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_listkeys.json new file mode 100644 index 000000000000..54b74f823281 --- /dev/null +++ b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_listkeys.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "resourceName": "testHub", + "resourceGroupName": "myResourceGroup", + "api-version": "2018-01-22", + "subscriptionId": "91d12660-3dec-467a-be2a-213b5544ddc0" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "keyName": "iothubowner", + "primaryKey": "2aWPrKloLLdcug12ZHNpA0e07yJmRRmYMXDLpEOTd/Y=", + "secondaryKey": "DLyFnDTGMDK0BU2QjT5TCkNBQ4h08mi20vOqWMC7TxU=", + "rights": "RegistryWrite, ServiceConnect, DeviceConnect" + }, + { + "keyName": "service", + "primaryKey": "DinqxWW+s814W2Pc3dLxleelksqSYGy8Jfymt8J7a4c=", + "secondaryKey": "5G8KgJ9Wx2T0f6HRIn25TgYcFmJnBSivawNaHssiP9Y=", + "rights": "ServiceConnect" + }, + { + "keyName": "device", + "primaryKey": "o/9gPc0oD8LY/r2lRurgl9U/sKFcL2c/tmFLKAiz+e0=", + "secondaryKey": "YOeBMHnYP95vH+ykR8OeapnhS6W8raMsXOdNFwqg4lg=", + "rights": "DeviceConnect" + }, + { + "keyName": "registryRead", + "primaryKey": "h2d4mPxy6jPCWX6mO+katV9QPNJivzt4aFq0iGVc1A8=", + "secondaryKey": "3TdcalZNTB7BZHl88LGsG1Z5T6+ElEODunrs1vylwGg=", + "rights": "RegistryRead" + }, + { + "keyName": "registryReadWrite", + "primaryKey": "tyNRcaI38fXL+gQTjCmrVZGTP4YFF7uACk7pppWLWzY=", + "secondaryKey": "6P6DXOp0W3HO5/IotzcPS1kx7PHiOdesaND07Im5cYI=", + "rights": "RegistryWrite" + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_operations.json b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_operations.json new file mode 100644 index 000000000000..484c2c9817ef --- /dev/null +++ b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_operations.json @@ -0,0 +1,328 @@ +{ + "parameters": { + "api-version": "2018-01-22" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "Microsoft.Devices/register/action", + "display": { + "provider": "Microsoft Devices", + "resource": "IotHubs", + "operation": "Register Resource Provider", + "description": "Register the subscription for the IotHub resource provider and enables the creation of IotHub resources" + } + }, + { + "name": "Microsoft.Devices/IotHubs/diagnosticSettings/read", + "display": { + "provider": "Microsoft Devices", + "resource": "IotHubs", + "operation": "Get Diagnostic Setting", + "description": "Gets the diagnostic setting for the resource" + } + }, + { + "name": "Microsoft.Devices/IotHubs/diagnosticSettings/write", + "display": { + "provider": "Microsoft Devices", + "resource": "IotHubs", + "operation": "Set Diagnostic Setting", + "description": "Creates or updates the diagnostic setting for the resource" + } + }, + { + "name": "Microsoft.Devices/IotHubs/metricDefinitions/read", + "display": { + "provider": "Microsoft Devices", + "resource": "IotHubs", + "operation": "Read IotHub service metric definitions", + "description": "Gets the available metrics for the IotHub service" + } + }, + { + "name": "Microsoft.Devices/IotHubs/logDefinitions/read", + "display": { + "provider": "Microsoft Devices", + "resource": "IotHubs", + "operation": "Read IotHub service log definitions", + "description": "Gets the available log definitions for the IotHub Service" + } + }, + { + "name": "Microsoft.Devices/operations/Read", + "display": { + "provider": "Microsoft Devices", + "resource": "IotHubs", + "operation": "Get All ResourceProvider Operations", + "description": "Get All ResourceProvider Operations" + } + }, + { + "name": "Microsoft.Devices/checkNameAvailability/Action", + "display": { + "provider": "Microsoft Devices", + "resource": "IotHubs", + "operation": "Check If IotHub name is available", + "description": "Check If IotHub name is available" + } + }, + { + "name": "Microsoft.Devices/usages/Read", + "display": { + "provider": "Microsoft Devices", + "resource": "IotHubs", + "operation": "Get Subscription Usages", + "description": "Get subscription usage details for this provider." + } + }, + { + "name": "Microsoft.Devices/iotHubs/Read", + "display": { + "provider": "Microsoft Devices", + "resource": "IotHubs", + "operation": "Get IotHub(s)", + "description": "Gets the IotHub resource(s)" + } + }, + { + "name": "Microsoft.Devices/iotHubs/Write", + "display": { + "provider": "Microsoft Devices", + "resource": "IotHubs", + "operation": "Create or update IotHub Resource", + "description": "Create or update IotHub Resource" + } + }, + { + "name": "Microsoft.Devices/iotHubs/Delete", + "display": { + "provider": "Microsoft Devices", + "resource": "IotHubs", + "operation": "Delete IotHub Resource", + "description": "Delete IotHub Resource" + } + }, + { + "name": "Microsoft.Devices/iotHubs/iotHubStats/Read", + "display": { + "provider": "Microsoft Devices", + "resource": "IotHubs", + "operation": "Get IotHub Statistics", + "description": "Get IotHub Statistics" + } + }, + { + "name": "Microsoft.Devices/iotHubs/skus/Read", + "display": { + "provider": "Microsoft Devices", + "resource": "IotHubs", + "operation": "Get valid IotHub Skus", + "description": "Get valid IotHub Skus" + } + }, + { + "name": "Microsoft.Devices/iotHubs/listkeys/Action", + "display": { + "provider": "Microsoft Devices", + "resource": "IotHubs", + "operation": "Get all IotHub Keys", + "description": "Get all IotHub Keys" + } + }, + { + "name": "Microsoft.Devices/iotHubs/iotHubKeys/listkeys/Action", + "display": { + "provider": "Microsoft Devices", + "resource": "IotHubs", + "operation": "Get IotHub Key for the given name", + "description": "Get IotHub Key for the given name" + } + }, + { + "name": "Microsoft.Devices/iotHubs/eventHubEndpoints/consumerGroups/Write", + "display": { + "provider": "Microsoft Devices", + "resource": "IotHubs", + "operation": "Create EventHub Consumer Group", + "description": "Create EventHub Consumer Group" + } + }, + { + "name": "Microsoft.Devices/iotHubs/eventHubEndpoints/consumerGroups/Read", + "display": { + "provider": "Microsoft Devices", + "resource": "IotHubs", + "operation": "Get EventHub Consumer Group(s)", + "description": "Get EventHub Consumer Group(s)" + } + }, + { + "name": "Microsoft.Devices/iotHubs/eventHubEndpoints/consumerGroups/Delete", + "display": { + "provider": "Microsoft Devices", + "resource": "IotHubs", + "operation": "Delete EventHub Consumer Group", + "description": "Delete EventHub Consumer Group" + } + }, + { + "name": "Microsoft.Devices/iotHubs/exportDevices/Action", + "display": { + "provider": "Microsoft Devices", + "resource": "IotHubs", + "operation": "Export Devices", + "description": "Export Devices" + } + }, + { + "name": "Microsoft.Devices/iotHubs/importDevices/Action", + "display": { + "provider": "Microsoft Devices", + "resource": "IotHubs", + "operation": "Import Devices", + "description": "Import Devices" + } + }, + { + "name": "Microsoft.Devices/iotHubs/jobs/Read", + "display": { + "provider": "Microsoft Devices", + "resource": "IotHubs", + "operation": "Get the Job(s) on IotHub", + "description": "Get Job(s) details submitted on given IotHub" + } + }, + { + "name": "Microsoft.Devices/iotHubs/quotaMetrics/Read", + "display": { + "provider": "Microsoft Devices", + "resource": "IotHubs", + "operation": "Get Quota Metrics", + "description": "Get Quota Metrics" + } + }, + { + "name": "Microsoft.Devices/iotHubs/routing/routes/$testall/Action", + "display": { + "provider": "Microsoft Devices", + "resource": "IotHubs", + "operation": "Routing Rule Test All", + "description": "Test a message against all existing Routes" + } + }, + { + "name": "Microsoft.Devices/iotHubs/routing/routes/$testnew/Action", + "display": { + "provider": "Microsoft Devices", + "resource": "IotHubs", + "operation": "Routing Rule Test Route", + "description": "Test a message against a provided test Route" + } + }, + { + "name": "Microsoft.Devices/iotHubs/routingEndpointsHealth/Read", + "display": { + "provider": "Microsoft Devices", + "resource": "IotHubs", + "operation": "Get Endpoint Health", + "description": "Gets the health of all routing Endpoints for an IotHub" + } + }, + { + "name": "Microsoft.Devices/ProvisioningServices/diagnosticSettings/read", + "display": { + "provider": "Microsoft Devices", + "resource": "IotHubs", + "operation": "Get Diagnostic Setting", + "description": "Gets the diagnostic setting for the resource" + } + }, + { + "name": "Microsoft.Devices/ProvisioningServices/diagnosticSettings/write", + "display": { + "provider": "Microsoft Devices", + "resource": "IotHubs", + "operation": "Set Diagnostic Setting", + "description": "Creates or updates the diagnostic setting for the resource" + } + }, + { + "name": "Microsoft.Devices/ProvisioningServices/metricDefinitions/read", + "display": { + "provider": "Microsoft Devices", + "resource": "IotHubs", + "operation": "Read DPS service metric definitions", + "description": "Gets the available metrics for the DPS service" + } + }, + { + "name": "Microsoft.Devices/ProvisioningServices/logDefinitions/read", + "display": { + "provider": "Microsoft Devices", + "resource": "IotHubs", + "operation": "Read DPS service log definitions", + "description": "Gets the available log definitions for the DPS Service" + } + }, + { + "name": "Microsoft.Devices/checkProvisioningServiceNameAvailability/Action", + "display": { + "provider": "Microsoft Devices", + "resource": "ProvisioningServives", + "operation": "Check If Provisioning Service name is available", + "description": "Check If Provisioning Service name is available" + } + }, + { + "name": "Microsoft.Devices/provisioningServices/Read", + "display": { + "provider": "Microsoft Devices", + "resource": "ProvisioningServices", + "operation": "Get Provisioning Service resource" , + "description": "Get Provisioning Service resource" + } + }, + { + "name": "Microsoft.Devices/provisioningServices/Write", + "display": { + "provider": "Microsoft Devices", + "resource": "ProvisioningServices", + "operation": "Create Provisioning Service resource", + "description": "Create Provisioning Service resource" + } + }, + { + "name": "Microsoft.Devices/provisioningServices/Delete", + "display": { + "provider": "Microsoft Devices", + "resource": "ProvisioningServices", + "operation": "Delete Provisioning Service resource", + "description": "Delete Provisioning Service resource" + } + }, + { + "name": "Microsoft.Devices/provisioningServices/skus/Read", + "display": { + "provider": "Microsoft Devices", + "resource": "ProvisioningServices", + "operation": "Delete Provisioning Service resource", + "description": "Delete Provisioning Service resource" + } + }, + { + "name": "Microsoft.Devices/provisioningServices/listkeys/Action", + "display": { + "provider": "Microsoft Devices", + "resource": "ProvisioningServices", + "operation": "get security related metadata", + "description": "get security related metadata" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_patch.json b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_patch.json new file mode 100644 index 000000000000..384de49b0949 --- /dev/null +++ b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_patch.json @@ -0,0 +1,116 @@ +{ + "parameters": { + "resourceName": "myHub", + "resourceGroupName": "myResourceGroup", + "api-version": "2018-01-22", + "subscriptionId": "91d12660-3dec-467a-be2a-213b5544ddc0", + "location": "East US", + "type": "Microsoft.Devices/IotHubs", + "IotHubTags": { + "tags": { + "foo": "bar" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/ae24ff83-d2ca-4fc8-9717-05dae4bba489/resourceGroups/myResourceGroup/providers/Microsoft.Devices/IotHubs/testHub", + "name": "testHub", + "type": "Microsoft.Devices/IotHubs", + "location": "centraluseuap", + "tags": { + "foo" : "bar" + }, + "etag": "AAAAAAFD6M4=", + "properties": { + "operationsMonitoringProperties": { + "events": { + "None": "None", + "Connections": "None", + "DeviceTelemetry": "None", + "C2DCommands": "None", + "DeviceIdentityOperations": "None", + "FileUploadOperations": "None", + "Routes": "None" + } + }, + "state": "Active", + "provisioningState": "Succeeded", + "ipFilterRules": [], + "hostName": "iot-dps-cit-hub-1.azure-devices.net", + "eventHubEndpoints": { + "events": { + "retentionTimeInDays": 1, + "partitionCount": 2, + "partitionIds": [ + "0", + "1" + ], + "path": "iot-dps-cit-hub-1", + "endpoint": "sb://iothub-ns-iot-dps-ci-245306-76aca8e13b.servicebus.windows.net/" + }, + "operationsMonitoringEvents": { + "retentionTimeInDays": 1, + "partitionCount": 2, + "partitionIds": [ + "0", + "1" + ], + "path": "iot-dps-cit-hub-1-operationmonitoring", + "endpoint": "sb://iothub-ns-iot-dps-ci-245306-76aca8e13b.servicebus.windows.net/" + } + }, + "routing": { + "endpoints": { + "serviceBusQueues": [], + "serviceBusTopics": [], + "eventHubs": [], + "storageContainers": [] + }, + "routes": [], + "fallbackRoute": { + "name": "$fallback", + "source": "DeviceMessages", + "condition": "true", + "endpointNames": [ + "events" + ], + "isEnabled": true + } + }, + "storageEndpoints": { + "$default": { + "sasTtlAsIso8601": "PT1H", + "connectionString": "", + "containerName": "" + } + }, + "messagingEndpoints": { + "fileNotifications": { + "lockDurationAsIso8601": "PT1M", + "ttlAsIso8601": "PT1H", + "maxDeliveryCount": 10 + } + }, + "enableFileUploadNotifications": false, + "cloudToDevice": { + "maxDeliveryCount": 10, + "defaultTtlAsIso8601": "PT1H", + "feedback": { + "lockDurationAsIso8601": "PT1M", + "ttlAsIso8601": "PT1H", + "maxDeliveryCount": 10 + } + }, + "features": "None" + }, + "sku": { + "name": "S1", + "tier": "Standard", + "capacity": 1 + } + } + } + } +} \ No newline at end of file diff --git a/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_quotametrics.json b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_quotametrics.json new file mode 100644 index 000000000000..80d90d83432b --- /dev/null +++ b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_quotametrics.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "resourceName": "testHub", + "resourceGroupName": "myResourceGroup", + "api-version": "2018-01-22", + "subscriptionId": "91d12660-3dec-467a-be2a-213b5544ddc0" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "TotalMessages", + "currentValue": 0, + "maxValue": 400000 + }, + { + "name": "TotalDeviceCount", + "currentValue": 0, + "maxValue": 500000 + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_stats.json b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_stats.json new file mode 100644 index 000000000000..778c4107a787 --- /dev/null +++ b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/examples/iothub_stats.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "resourceName": "testHub", + "resourceGroupName": "myResourceGroup", + "api-version": "2018-01-22", + "subscriptionId": "91d12660-3dec-467a-be2a-213b5544ddc0" + }, + "responses": { + "200": { + "body": { + "totalDeviceCount": 0, + "enabledDeviceCount": 0, + "disabledDeviceCount": 0 + } + } + } +} \ No newline at end of file diff --git a/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/iothub.json b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/iothub.json new file mode 100644 index 000000000000..a2a2999804f5 --- /dev/null +++ b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/iothub.json @@ -0,0 +1,2664 @@ +{ + "swagger": "2.0", + "info": { + "version": "2018-01-22", + "title": "iotHubClient", + "description": "Use this API to manage the IoT hubs in your Azure subscription.", + "x-ms-code-generation-settings": { + "header": "MICROSOFT_MIT_NO_VERSION" + } + }, + "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": { + "/providers/Microsoft.Devices/operations": { + "get": { + "tags": [ + "Operations" + ], + "x-ms-examples": { + "Operations_List": { "$ref": "./examples/iothub_operations.json" } + }, + "operationId": "Operations_List", + "description": "Lists all of the available IoT Hub REST API operations.", + "parameters": [ + { + "$ref": "#/parameters/api-version" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/OperationListResult" + } + }, + "default": { + "description": "DefaultErrorResponse", + "schema": { + "$ref": "#/definitions/ErrorDetails" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}": { + "get": { + "tags": [ "GET" ], + "summary": "Get the non-security related metadata of an IoT hub.", + "description": "Get the non-security related metadata of an IoT hub.", + "operationId": "IotHubResource_Get", + "x-ms-examples": { + "IotHubResource_Get": { "$ref": "./examples/iothub_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 hub. Security-related properties are set to null.", + "schema": { + "$ref": "#/definitions/IotHubDescription" + } + }, + "default": { + "description": "DefaultErrorResponse", + "schema": { + "$ref": "#/definitions/ErrorDetails" + } + } + }, + "deprecated": false + }, + "put": { + "tags": [ "PUT" ], + "summary": "Create or update the metadata of an IoT hub.", + "description": "Create or update the metadata of an Iot hub. The usual pattern to modify a property is to retrieve the IoT hub metadata and security metadata, and then combine them with the modified values in a new body to update the IoT hub.", + "operationId": "IotHubResource_CreateOrUpdate", + "x-ms-examples": { + "IotHubResource_CreateOrUpdate": { "$ref": "./examples/iothub_createOrUpdate.json" } + }, + "x-ms-long-running-operation": true, + "parameters": [ + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/resourceGroupName" + }, + { + "$ref": "#/parameters/resourceName" + }, + { + "name": "iotHubDescription", + "in": "body", + "description": "The IoT hub metadata and security metadata.", + "required": true, + "schema": { + "$ref": "#/definitions/IotHubDescription" + } + }, + { + "name": "If-Match", + "in": "header", + "required": false, + "type": "string", + "description": "ETag of the IoT Hub. Do not specify for creating a brand new IoT Hub. Required to update an existing IoT Hub." + } + ], + "responses": { + "201": { + "description": "This is a long running operation. The operation returns a 201 if the validation is complete. The response includes an Azure-AsyncOperation header that contains a status URL. Clients are expected to poll the status URL for the status of the operation. If successful, the operation returns HTTP status code of 201 (OK).", + "schema": { + "$ref": "#/definitions/IotHubDescription" + } + }, + "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/IotHubDescription" + } + }, + "default": { + "description": "DefaultErrorResponse", + "schema": { + "$ref": "#/definitions/ErrorDetails" + } + } + }, + "deprecated": false + }, + "patch": { + "tags": [ + "PATCH" + ], + "summary": "Update an existing IoT Hubs tags.", + "description": "Update an existing IoT Hub tags. to update other fields use the CreateOrUpdate method", + "x-ms-long-running-operation": true, + "operationId": "IotHubResource_Update", + "x-ms-examples": { + "IotHubResource_Update": { "$ref": "./examples/iothub_patch.json" } + }, + "parameters": [ + { + "$ref": "#/parameters/subscriptionId" + }, + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "Resource group identifier." + }, + { + "name": "resourceName", + "in": "path", + "required": true, + "type": "string", + "description": "Name of iot hub to update." + }, + { + "name": "IotHubTags", + "in": "body", + "required": true, + "description": "Updated tag information to set into the iot hub instance.", + "schema": { + "$ref": "#/definitions/TagsResource" + } + }, + { + "$ref": "#/parameters/api-version" + } + ], + "responses": { + "200": { + "description": "Iot Hub was successfully updated", + "schema": { + "$ref": "#/definitions/IotHubDescription" + } + } + }, + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ] + }, + "delete": { + "tags": [ "DELETE" ], + "summary": "Delete an IoT hub.", + "description": "Delete an IoT hub.", + "operationId": "IotHubResource_Delete", + "x-ms-examples": { + "IotHubResource_Delete": { "$ref": "./examples/iothub_delete.json" } + }, + "x-ms-long-running-operation": true, + "parameters": [ + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/resourceGroupName" + }, + { + "$ref": "#/parameters/resourceName" + } + ], + "responses": { + "202": { + "description": "The Iot Hub resource provider always returns a 202 Accepted status code with valid Location and Retry-After headers. The resource provider also sets the Azure-AsyncOperation header with a URL that points to the operation resource for this operation. Subsequent GET attempts on the resource after a DELETE operation return a resource representation that indicates a transitional provisioning state (such as Terminating). To retrieve the status of the operation, a client can either poll the URL returned in the Location header after the Retry-After interval, get the IoT Hub service status directly, or query the operation resource.", + "schema": { + "$ref": "#/definitions/IotHubDescription" + } + }, + "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.", + "schema": { + "$ref": "#/definitions/IotHubDescription" + } + }, + "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 hub metadata in the service and the status of the delete operation is set to a completed state." + }, + "404": { + "description": "After the long running delete operation completes successfully, a 404 Not Found is returned when the status polling request no longer finds the Iot hub metadata in the service.", + "schema": { + "$ref": "#/definitions/ErrorDetails" + } + }, + "default": { + "description": "DefaultErrorResponse", + "schema": { + "$ref": "#/definitions/ErrorDetails" + } + } + }, + "deprecated": false + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Devices/IotHubs": { + "get": { + "tags": [ "GET" ], + "summary": "Get all the IoT hubs in a subscription.", + "description": "Get all the IoT hubs in a subscription.", + "operationId": "IotHubResource_ListBySubscription", + "x-ms-examples": { + "IotHubResource_ListBySubscription": { "$ref": "./examples/iothub_listbysubscription.json" } + }, + "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 hubs in the subscription.", + "schema": { + "$ref": "#/definitions/IotHubDescriptionListResult" + } + }, + "default": { + "description": "DefaultErrorResponse", + "schema": { + "$ref": "#/definitions/ErrorDetails" + } + } + }, + "deprecated": false, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs": { + "get": { + "tags": [ "GET" ], + "summary": "Get all the IoT hubs in a resource group.", + "description": "Get all the IoT hubs in a resource group.", + "operationId": "IotHubResource_ListByResourceGroup", + "x-ms-examples": { + "IotHubResource_ListByResourceGroup": { "$ref": "./examples/iothub_listbyrg.json" } + }, + "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 hubs in the resource group.", + "schema": { + "$ref": "#/definitions/IotHubDescriptionListResult" + } + }, + "default": { + "description": "DefaultErrorResponse", + "schema": { + "$ref": "#/definitions/ErrorDetails" + } + } + }, + "deprecated": false, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/IotHubStats": { + "get": { + "tags": [ "GET" ], + "summary": "Get the statistics from an IoT hub.", + "description": "Get the statistics from an IoT hub.", + "operationId": "IotHubResource_GetStats", + "x-ms-examples": { + "IotHubResource_GetStats": { "$ref": "./examples/iothub_stats.json" } + }, + "parameters": [ + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/resourceGroupName" + }, + { + "$ref": "#/parameters/resourceName" + } + ], + "responses": { + "200": { + "description": "This is a synchronous operation. The body contains JSON-serialized statistics from the identity registry in the IoT hub.", + "schema": { + "$ref": "#/definitions/RegistryStatistics" + } + }, + "default": { + "description": "DefaultErrorResponse", + "schema": { + "$ref": "#/definitions/ErrorDetails" + } + } + }, + "deprecated": false + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/skus": { + "get": { + "tags": [ "GET" ], + "summary": "Get the list of valid SKUs for an IoT hub.", + "description": "Get the list of valid SKUs for an IoT hub.", + "operationId": "IotHubResource_GetValidSkus", + "x-ms-examples": { + "IotHubResource_GetValidSkus": { "$ref": "./examples/iothub_getskus.json" } + }, + "parameters": [ + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/resourceGroupName" + }, + { + "$ref": "#/parameters/resourceName" + } + ], + "responses": { + "200": { + "description": "This is a synchronous operation. The body contains a JSON-serialized array of the valid SKUs for this IoT hub.", + "schema": { + "$ref": "#/definitions/IotHubSkuDescriptionListResult" + } + }, + "default": { + "description": "DefaultErrorResponse", + "schema": { + "$ref": "#/definitions/ErrorDetails" + } + } + }, + "deprecated": false, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/eventHubEndpoints/{eventHubEndpointName}/ConsumerGroups": { + "get": { + "tags": [ "GET" ], + "summary": "Get a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint in an IoT hub.", + "description": "Get a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint in an IoT hub.", + "operationId": "IotHubResource_ListEventHubConsumerGroups", + "x-ms-examples": { + "IotHubResource_ListEventHubConsumerGroups": { "$ref": "./examples/iothub_listehgroups.json" } + }, + "parameters": [ + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/resourceGroupName" + }, + { + "$ref": "#/parameters/resourceName" + }, + { + "name": "eventHubEndpointName", + "in": "path", + "description": "The name of the Event Hub-compatible endpoint.", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "This is a synchronous operation. The body contains a JSON-serialized list of the consumer groups in the the Event Hub-compatible endpoint in this IoT hub", + "schema": { + "$ref": "#/definitions/EventHubConsumerGroupsListResult" + } + }, + "default": { + "description": "DefaultErrorResponse", + "schema": { + "$ref": "#/definitions/ErrorDetails" + } + } + }, + "deprecated": false, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/eventHubEndpoints/{eventHubEndpointName}/ConsumerGroups/{name}": { + "get": { + "tags": [ "GET" ], + "summary": "Get a consumer group from the Event Hub-compatible device-to-cloud endpoint for an IoT hub.", + "description": "Get a consumer group from the Event Hub-compatible device-to-cloud endpoint for an IoT hub.", + "operationId": "IotHubResource_GetEventHubConsumerGroup", + "x-ms-examples": { + "IotHubResource_ListEventHubConsumerGroups": { "$ref": "./examples/iothub_getconsumergroup.json" } + }, + "parameters": [ + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/resourceGroupName" + }, + { + "$ref": "#/parameters/resourceName" + }, + { + "name": "eventHubEndpointName", + "in": "path", + "description": "The name of the Event Hub-compatible endpoint in the IoT hub.", + "required": true, + "type": "string" + }, + { + "name": "name", + "in": "path", + "description": "The name of the consumer group to retrieve.", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "This is a synchronous operation. The body contains a JSON-serialized consumer group.", + "schema": { + "$ref": "#/definitions/EventHubConsumerGroupInfo" + } + }, + "default": { + "description": "DefaultErrorResponse", + "schema": { + "$ref": "#/definitions/ErrorDetails" + } + } + }, + "deprecated": false + }, + "put": { + "tags": [ "PUT" ], + "summary": "Add a consumer group to an Event Hub-compatible endpoint in an IoT hub.", + "description": "Add a consumer group to an Event Hub-compatible endpoint in an IoT hub.", + "operationId": "IotHubResource_CreateEventHubConsumerGroup", + "x-ms-examples": { + "IotHubResource_CreateEventHubConsumerGroup": { "$ref": "./examples/iothub_createconsumergroup.json" } + }, + "parameters": [ + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/resourceGroupName" + }, + { + "$ref": "#/parameters/resourceName" + }, + { + "name": "eventHubEndpointName", + "in": "path", + "description": "The name of the Event Hub-compatible endpoint in the IoT hub.", + "required": true, + "type": "string" + }, + { + "name": "name", + "in": "path", + "description": "The name of the consumer group to add.", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "This is a synchronous operation.", + "schema": { + "$ref": "#/definitions/EventHubConsumerGroupInfo" + } + }, + "default": { + "description": "DefaultErrorResponse", + "schema": { + "$ref": "#/definitions/ErrorDetails" + } + } + }, + "deprecated": false + }, + "delete": { + "tags": [ "DELETE" ], + "summary": "Delete a consumer group from an Event Hub-compatible endpoint in an IoT hub.", + "description": "Delete a consumer group from an Event Hub-compatible endpoint in an IoT hub.", + "operationId": "IotHubResource_DeleteEventHubConsumerGroup", + "x-ms-examples": { + "IotHubResource_DeleteEventHubConsumerGroup": { "$ref": "./examples/iothub_deleteconsumergroup.json" } + }, + "parameters": [ + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/resourceGroupName" + }, + { + "$ref": "#/parameters/resourceName" + }, + { + "name": "eventHubEndpointName", + "in": "path", + "description": "The name of the Event Hub-compatible endpoint in the IoT hub.", + "required": true, + "type": "string" + }, + { + "name": "name", + "in": "path", + "description": "The name of the consumer group to delete.", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "This is a synchronous operation." + }, + "default": { + "description": "DefaultErrorResponse", + "schema": { + "$ref": "#/definitions/ErrorDetails" + } + } + }, + "deprecated": false + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/jobs": { + "get": { + "tags": [ "GET" ], + "summary": "Get a list of all the jobs in an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry.", + "description": "Get a list of all the jobs in an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry.", + "operationId": "IotHubResource_ListJobs", + "x-ms-examples": { + "IotHubResource_ListJobs": { "$ref": "./examples/iothub_listjobs.json" } + }, + "parameters": [ + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/resourceGroupName" + }, + { + "$ref": "#/parameters/resourceName" + } + ], + "responses": { + "200": { + "description": "This is a synchronous operation. The response contains a JSON-serialized array of all the jobs in the IoT hub.", + "schema": { + "$ref": "#/definitions/JobResponseListResult" + } + }, + "default": { + "description": "DefaultErrorResponse", + "schema": { + "$ref": "#/definitions/ErrorDetails" + } + } + }, + "deprecated": false, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/jobs/{jobId}": { + "get": { + "tags": [ "GET" ], + "summary": "Get the details of a job from an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry.", + "description": "Get the details of a job from an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry.", + "operationId": "IotHubResource_GetJob", + "x-ms-examples": { + "IotHubResource_GetJob": { "$ref": "./examples/iothub_getjob.json" } + }, + "parameters": [ + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/resourceGroupName" + }, + { + "$ref": "#/parameters/resourceName" + }, + { + "name": "jobId", + "in": "path", + "description": "The job identifier.", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "This is a synchronous operation. The response contains a JSON-serialized description of the job in the IoT hub.", + "schema": { + "$ref": "#/definitions/JobResponse" + } + }, + "default": { + "description": "DefaultErrorResponse", + "schema": { + "$ref": "#/definitions/ErrorDetails" + } + } + }, + "deprecated": false + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/quotaMetrics": { + "get": { + "tags": [ "GET" ], + "summary": "Get the quota metrics for an IoT hub.", + "description": "Get the quota metrics for an IoT hub.", + "operationId": "IotHubResource_GetQuotaMetrics", + "x-ms-examples": { + "IotHubResource_GetQuotaMetrics": { "$ref": "./examples/iothub_quotametrics.json" } + }, + "parameters": [ + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/resourceGroupName" + }, + { + "$ref": "#/parameters/resourceName" + } + ], + "responses": { + "200": { + "description": "This is a synchronous operation. The response contains a JSON-serialized array of the quota metrics for the IoT hub.", + "schema": { + "$ref": "#/definitions/IotHubQuotaMetricInfoListResult" + } + }, + "default": { + "description": "DefaultErrorResponse", + "schema": { + "$ref": "#/definitions/ErrorDetails" + } + } + }, + "deprecated": false, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Devices/checkNameAvailability": { + "post": { + "tags": [ "POST" ], + "summary": "Check if an IoT hub name is available.", + "description": "Check if an IoT hub name is available.", + "operationId": "IotHubResource_CheckNameAvailability", + "x-ms-examples": { + "IotHubResource_CheckNameAvailability": { "$ref": "./examples/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 hub 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 hub name is available. If the name is not available, the body contains the reason.", + "schema": { + "$ref": "#/definitions/IotHubNameAvailabilityInfo" + } + }, + "default": { + "description": "DefaultErrorResponse", + "schema": { + "$ref": "#/definitions/ErrorDetails" + } + } + }, + "deprecated": false + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/listkeys": { + "post": { + "tags": [ "POST" ], + "summary": "Get the security metadata for an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security.", + "description": "Get the security metadata for an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security.", + "operationId": "IotHubResource_ListKeys", + "x-ms-examples": { + "IotHubResource_ListKeys": { "$ref": "./examples/iothub_listkeys.json" } + }, + "parameters": [ + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/resourceGroupName" + }, + { + "$ref": "#/parameters/resourceName" + } + ], + "responses": { + "200": { + "description": "This is a synchronous operation. The body contains a JSON-serialized array of shared access policies, including keys, that you can use to access the IoT hub endpoints.", + "schema": { + "$ref": "#/definitions/SharedAccessSignatureAuthorizationRuleListResult" + } + }, + "default": { + "description": "DefaultErrorResponse", + "schema": { + "$ref": "#/definitions/ErrorDetails" + } + } + }, + "deprecated": false, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/IotHubKeys/{keyName}/listkeys": { + "post": { + "tags": [ "POST" ], + "summary": "Get a shared access policy by name from an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security.", + "description": "Get a shared access policy by name from an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security.", + "operationId": "IotHubResource_GetKeysForKeyName", + "x-ms-examples": { + "IotHubResource_GetKeysForKeyName": { "$ref": "./examples/iothub_getkey.json" } + }, + "parameters": [ + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/resourceGroupName" + }, + { + "$ref": "#/parameters/resourceName" + }, + { + "name": "keyName", + "in": "path", + "description": "The name of the shared access policy.", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "This is a synchronous operation. The body contains a JSON-serialized shared access policy, including keys, that you can use to access one or more IoT hub endpoints.", + "schema": { + "$ref": "#/definitions/SharedAccessSignatureAuthorizationRule" + } + }, + "default": { + "description": "DefaultErrorResponse", + "schema": { + "$ref": "#/definitions/ErrorDetails" + } + } + }, + "deprecated": false + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/exportDevices": { + "post": { + "tags": [ "POST" ], + "summary": "Exports all the device identities in the IoT hub identity registry to an Azure Storage blob container. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities.", + "description": "Exports all the device identities in the IoT hub identity registry to an Azure Storage blob container. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities.", + "operationId": "IotHubResource_ExportDevices", + "x-ms-examples": { + "IotHubResource_ExportDevices": { "$ref": "./examples/iothub_exportdevices.json" } + }, + "parameters": [ + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/resourceGroupName" + }, + { + "$ref": "#/parameters/resourceName" + }, + { + "name": "exportDevicesParameters", + "in": "body", + "description": "The parameters that specify the export devices operation.", + "required": true, + "schema": { + "$ref": "#/definitions/ExportDevicesRequest" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/JobResponse" + } + }, + "default": { + "description": "DefaultErrorResponse", + "schema": { + "$ref": "#/definitions/ErrorDetails" + } + } + }, + "deprecated": false + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/importDevices": { + "post": { + "tags": [ "POST" ], + "summary": "Import, update, or delete device identities in the IoT hub identity registry from a blob. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities.", + "description": "Import, update, or delete device identities in the IoT hub identity registry from a blob. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities.", + "operationId": "IotHubResource_ImportDevices", + "x-ms-examples": { + "IotHubResource_ImportDevices": { "$ref": "./examples/iothub_importdevices.json" } + }, + "parameters": [ + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/resourceGroupName" + }, + { + "$ref": "#/parameters/resourceName" + }, + { + "name": "importDevicesParameters", + "in": "body", + "description": "The parameters that specify the import devices operation.", + "required": true, + "schema": { + "$ref": "#/definitions/ImportDevicesRequest" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/JobResponse" + } + }, + "default": { + "description": "DefaultErrorResponse", + "schema": { + "$ref": "#/definitions/ErrorDetails" + } + } + }, + "deprecated": false + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/certificates": { + "get": { + "tags": [ "Certificates" ], + "summary": "Get the certificate list.", + "description": "Returns the list of certificates.", + "operationId": "Certificates_ListByIotHub", + "x-ms-examples": { + "Certificates_ListByIotHub": { "$ref": "./examples/iothub_listcertificates.json" } + }, + "parameters": [ + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/resourceGroupName" + }, + { + "$ref": "#/parameters/resourceName" + } + ], + "responses": { + "200": { + "description": "The body contains all the certificate list.", + "schema": { + "$ref": "#/definitions/CertificateListDescription" + } + }, + "default": { + "description": "DefaultErrorResponse", + "schema": { + "$ref": "#/definitions/ErrorDetails" + } + } + }, + "deprecated": false + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/certificates/{certificateName}": { + "get": { + "tags": [ "Certificates" ], + "summary": "Get the certificate.", + "description": "Returns the certificate.", + "operationId": "Certificates_Get", + "x-ms-examples": { + "Certificates_Get": { "$ref": "./examples/iothub_getcertificate.json" } + }, + "parameters": [ + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/resourceGroupName" + }, + { + "$ref": "#/parameters/resourceName" + }, + { + "$ref": "#/parameters/certificateName" + } + ], + "responses": { + "200": { + "description": "The body contains the certificate.", + "schema": { + "$ref": "#/definitions/CertificateDescription" + } + }, + "default": { + "description": "DefaultErrorResponse", + "schema": { + "$ref": "#/definitions/ErrorDetails" + } + } + }, + "deprecated": false + }, + "put": { + "tags": [ "Certificates" ], + "summary": "Upload the certificate to the IoT hub.", + "description": "Adds new or replaces existing certificate.", + "operationId": "Certificates_CreateOrUpdate", + "x-ms-examples": { + "Certificates_CreateOrUpdate": { "$ref": "./examples/iothub_certificatescreateorupdate.json" } + }, + "parameters": [ + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/resourceGroupName" + }, + { + "$ref": "#/parameters/resourceName" + }, + { + "$ref": "#/parameters/certificateName" + }, + { + "name": "certificateDescription", + "in": "body", + "description": "The certificate body.", + "required": true, + "schema": { + "$ref": "#/definitions/CertificateBodyDescription" + } + }, + { + "name": "If-Match", + "in": "header", + "required": false, + "type": "string", + "description": "ETag of the Certificate. Do not specify for creating a brand new certificate. Required to update an existing certificate." + } + ], + "responses": { + "201": { + "description": "If certificate didn't exist creation was successful, the operation returns HTTP status code of 201 (OK).", + "schema": { + "$ref": "#/definitions/CertificateDescription" + } + }, + "200": { + "description": "If certificate already exist and update was successful, the operation returns HTTP status code of 201 (OK).", + "schema": { + "$ref": "#/definitions/CertificateDescription" + } + }, + "default": { + "description": "DefaultErrorResponse", + "schema": { + "$ref": "#/definitions/ErrorDetails" + } + } + }, + "deprecated": false + }, + "delete": { + "tags": [ "Certificates" ], + "summary": "Delete an X509 certificate.", + "description": "Deletes an existing X509 certificate or does nothing if it does not exist.", + "operationId": "Certificates_Delete", + "x-ms-examples": { + "Certificates_Delete": { "$ref": "./examples/iothub_certificatesdelete.json" } + }, + "parameters": [ + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/resourceGroupName" + }, + { + "$ref": "#/parameters/resourceName" + }, + { + "$ref": "#/parameters/certificateName" + }, + { + "name": "If-Match", + "in": "header", + "required": true, + "type": "string", + "description": "ETag of the Certificate." + } + ], + "responses": { + "200": { + "description": "Certificate has been deleted." + }, + "204": { + "description": "Certificate does not exist." + }, + "default": { + "description": "DefaultErrorResponse", + "schema": { + "$ref": "#/definitions/ErrorDetails" + } + } + }, + "deprecated": false + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/certificates/{certificateName}/generateVerificationCode": { + "post": { + "tags": [ "Certificates" ], + "summary": "Generate verification code for proof of possession flow.", + "description": "Generates verification code for proof of possession flow. The verification code will be used to generate a leaf certificate.", + "operationId": "Certificates_GenerateVerificationCode", + "x-ms-examples": { + "Certificates_GenerateVerificationCode": { "$ref": "./examples/iothub_generateverificationcode.json" } + }, + "parameters": [ + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/resourceGroupName" + }, + { + "$ref": "#/parameters/resourceName" + }, + { + "$ref": "#/parameters/certificateName" + }, + { + "name": "If-Match", + "in": "header", + "required": true, + "type": "string", + "description": "ETag of the Certificate." + } + ], + "responses": { + "200": { + "description": "The body contains the certificate.", + "schema": { + "$ref": "#/definitions/CertificateWithNonceDescription" + } + }, + "default": { + "description": "DefaultErrorResponse", + "schema": { + "$ref": "#/definitions/ErrorDetails" + } + } + }, + "deprecated": false + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/certificates/{certificateName}/verify": { + "post": { + "tags": [ "Certificates" ], + "summary": "Verify certificate's private key possession.", + "description": "Verifies the certificate's private key possession by providing the leaf cert issued by the verifying pre uploaded certificate.", + "operationId": "Certificates_Verify", + "x-ms-examples": { + "Certificates_Verify": { "$ref": "./examples/iothub_certverify.json" } + }, + "parameters": [ + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/resourceGroupName" + }, + { + "$ref": "#/parameters/resourceName" + }, + { + "$ref": "#/parameters/certificateName" + }, + { + "name": "certificateVerificationBody", + "in":"body", + "description":"The name of the certificate", + "required":true, + "schema": { + "$ref": "#/definitions/CertificateVerificationDescription" + } + }, + { + "name": "If-Match", + "in": "header", + "required": true, + "type": "string", + "description": "ETag of the Certificate." + } + ], + "responses": { + "200": { + "description": "The body contains the certificate.", + "schema": { + "$ref": "#/definitions/CertificateDescription" + } + }, + "default": { + "description": "DefaultErrorResponse", + "schema": { + "$ref": "#/definitions/ErrorDetails" + } + } + }, + "deprecated": false + } + } + }, + "definitions": { + "CertificateVerificationDescription":{ + "description": "The JSON-serialized leaf certificate", + "type": "object", + "properties": { + "certificate": { + "description": "base-64 representation of X509 certificate .cer file or just .pem file content.", + "type": "string" + } + } + }, + "CertificateBodyDescription":{ + "description": "The JSON-serialized X509 Certificate.", + "type": "object", + "properties": { + "certificate": { + "description": "base-64 representation of the X509 leaf certificate .cer file or just .pem file content.", + "type": "string" + } + } + }, + "CertificateListDescription": { + "description": "The JSON-serialized array of Certificate objects.", + "type": "object", + "properties": { + "value": { + "description": "The array of Certificate objects.", + "type": "array", + "items": { + "$ref": "#/definitions/CertificateDescription" + } + } + } + }, + "CertificateDescription": { + "description": "The X509 Certificate.", + "type": "object", + "properties": { + "properties" : { + "$ref": "#/definitions/CertificateProperties" + }, + "id": { + "readOnly": true, + "type": "string", + "description": "The resource identifier." + }, + "name": { + "description": "The name of the certificate.", + "type": "string", + "readOnly": true + }, + "etag": { + "description": "The entity tag.", + "type": "string", + "readOnly": true + }, + "type": { + "readOnly": true, + "type": "string", + "description": "The resource type." + } + }, + "x-ms-azure-resource": true + }, + "CertificateWithNonceDescription": { + "description": "The X509 Certificate.", + "type": "object", + "properties": { + "properties" : { + "$ref": "#/definitions/CertificatePropertiesWithNonce" + }, + "id": { + "readOnly": true, + "type": "string", + "description": "The resource identifier." + }, + "name": { + "description": "The name of the certificate.", + "type": "string", + "readOnly": true + }, + "etag": { + "description": "The entity tag.", + "type": "string", + "readOnly": true + }, + "type": { + "readOnly": true, + "type": "string", + "description": "The resource type." + } + }, + "x-ms-azure-resource": true + }, + "SharedAccessSignatureAuthorizationRule": { + "description": "The properties of an IoT hub shared access policy.", + "type": "object", + "properties": { + "keyName": { + "description": "The name of the shared access policy.", + "type": "string" + }, + "primaryKey": { + "description": "The primary key.", + "type": "string" + }, + "secondaryKey": { + "description": "The secondary key.", + "type": "string" + }, + "rights": { + "description": "The permissions assigned to the shared access policy.", + "enum": [ + "RegistryRead", + "RegistryWrite", + "ServiceConnect", + "DeviceConnect", + "RegistryRead, RegistryWrite", + "RegistryRead, ServiceConnect", + "RegistryRead, DeviceConnect", + "RegistryWrite, ServiceConnect", + "RegistryWrite, DeviceConnect", + "ServiceConnect, DeviceConnect", + "RegistryRead, RegistryWrite, ServiceConnect", + "RegistryRead, RegistryWrite, DeviceConnect", + "RegistryRead, ServiceConnect, DeviceConnect", + "RegistryWrite, ServiceConnect, DeviceConnect", + "RegistryRead, RegistryWrite, ServiceConnect, DeviceConnect" + ], + "type": "string", + "x-ms-enum": { + "name": "AccessRights", + "modelAsString": false + } + } + }, + "required": [ + "keyName", + "rights" + ] + }, + "CertificateProperties": + { + "description": "The description of an X509 CA Certificate.", + "type": "object", + "properties": { + "subject": { + "description": "The certificate's subject name.", + "type": "string", + "readOnly": true + }, + "expiry": { + "description": "The certificate's expiration date and time.", + "type": "string", + "format": "date-time-rfc1123", + "readOnly": true + }, + "thumbprint": { + "description": "The certificate's thumbprint.", + "type": "string", + "readOnly": true + }, + "isVerified": { + "description": "Determines whether certificate has been verified.", + "type": "boolean", + "readOnly": true + }, + "created": { + "description": "The certificate's create date and time.", + "type": "string", + "format": "date-time-rfc1123", + "readOnly": true + }, + "updated": { + "description": "The certificate's last update date and time.", + "type": "string", + "format": "date-time-rfc1123", + "readOnly": true + } + } + }, + "CertificatePropertiesWithNonce": + { + "description": "The description of an X509 CA Certificate including the challenge nonce issued for the Proof-Of-Possession flow.", + "type": "object", + "properties": { + "subject": { + "description": "The certificate's subject name.", + "type": "string", + "readOnly": true + }, + "expiry": { + "description": "The certificate's expiration date and time.", + "type": "string", + "format": "date-time-rfc1123", + "readOnly": true + }, + "thumbprint": { + "description": "The certificate's thumbprint.", + "type": "string", + "readOnly": true + }, + "isVerified": { + "description": "Determines whether certificate has been verified.", + "type": "boolean", + "readOnly": true + }, + "created": { + "description": "The certificate's create date and time.", + "type": "string", + "format": "date-time-rfc1123", + "readOnly": true + }, + "updated": { + "description": "The certificate's last update date and time.", + "type": "string", + "format": "date-time-rfc1123", + "readOnly": true + }, + "verificationCode": { + "description": "The certificate's verification code that will be used for proof of possession.", + "type": "string", + "readOnly": true + } + } + }, + "IotHubProperties": { + "description": "The properties of an IoT hub.", + "type": "object", + "properties": { + "authorizationPolicies": { + "description": "The shared access policies you can use to secure a connection to the IoT hub.", + "type": "array", + "items": { + "$ref": "#/definitions/SharedAccessSignatureAuthorizationRule" + } + }, + "ipFilterRules": { + "description": "The IP filter rules.", + "type": "array", + "items": { + "$ref": "#/definitions/IpFilterRule" + } + }, + "provisioningState": { + "description": "The provisioning state.", + "type": "string", + "readOnly": true + }, + "state": { + "description": "Thehub state state.", + "type": "string", + "readOnly": true + }, + "hostName": { + "description": "The name of the host.", + "type": "string", + "readOnly": true + }, + "eventHubEndpoints": { + "description": "The Event Hub-compatible endpoint properties. The possible keys to this dictionary are events and operationsMonitoringEvents. Both of these keys have to be present in the dictionary while making create or update calls for the IoT hub.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/EventHubProperties" + } + }, + "routing": { + "$ref": "#/definitions/RoutingProperties" + }, + "storageEndpoints": { + "description": "The list of Azure Storage endpoints where you can upload files. Currently you can configure only one Azure Storage account and that MUST have its key as $default. Specifying more than one storage account causes an error to be thrown. Not specifying a value for this property when the enableFileUploadNotifications property is set to True, causes an error to be thrown.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/StorageEndpointProperties" + } + }, + "messagingEndpoints": { + "description": "The messaging endpoint properties for the file upload notification queue.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/MessagingEndpointProperties" + } + }, + "enableFileUploadNotifications": { + "description": "If True, file upload notifications are enabled.", + "type": "boolean" + }, + "cloudToDevice": { + "$ref": "#/definitions/CloudToDeviceProperties" + }, + "comments": { + "description": "IoT hub comments.", + "type": "string" + }, + "operationsMonitoringProperties": { + "$ref": "#/definitions/OperationsMonitoringProperties" + }, + "features": { + "description": "The capabilities and features enabled for the IoT hub.", + "enum": [ "None", "DeviceManagement" ], + "type": "string", + "x-ms-enum": { + "name": "Capabilities", + "modelAsString": true + } + } + } + }, + "IotHubSkuInfo": { + "description": "Information about the SKU of the IoT hub.", + "type": "object", + "properties": { + "name": { + "description": "The name of the SKU.", + "enum": [ "F1", "S1", "S2", "S3" ], + "type": "string", + "x-ms-enum": { + "name": "IotHubSku", + "modelAsString": true + } + }, + "tier": { + "description": "The billing tier for the IoT hub.", + "enum": [ "Free", "Standard" ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "IotHubSkuTier", + "modelAsString": false + } + }, + "capacity": { + "format": "int64", + "description": "The number of provisioned IoT Hub units. See: https://docs.microsoft.com/azure/azure-subscription-service-limits#iot-hub-limits.", + "type": "integer" + } + }, + "required": [ + "name" + ] + }, + "EventHubProperties": { + "description": "The properties of the provisioned Event Hub-compatible endpoint used by the IoT hub.", + "type": "object", + "properties": { + "retentionTimeInDays": { + "format": "int64", + "description": "The retention time for device-to-cloud messages in days. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages", + "type": "integer" + }, + "partitionCount": { + "format": "int32", + "description": "The number of partitions for receiving device-to-cloud messages in the Event Hub-compatible endpoint. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages.", + "type": "integer" + }, + "partitionIds": { + "description": "The partition ids in the Event Hub-compatible endpoint.", + "readOnly": true, + "type": "array", + "items": { + "type": "string" + } + }, + "path": { + "description": "The Event Hub-compatible name.", + "type": "string", + "readOnly": true + }, + "endpoint": { + "description": "The Event Hub-compatible endpoint.", + "type": "string", + "readOnly": true + } + } + }, + "StorageEndpointProperties": { + "description": "The properties of the Azure Storage endpoint for file upload.", + "type": "object", + "properties": { + "sasTtlAsIso8601": { + "description": "The period of time for which the the SAS URI generated by IoT Hub for file upload is valid. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload#file-upload-notification-configuration-options.", + "type": "string", + "format": "duration" + }, + "connectionString": { + "description": "The connection string for the Azure Storage account to which files are uploaded.", + "type": "string" + }, + "containerName": { + "description": "The name of the root container where you upload files. The container need not exist but should be creatable using the connectionString specified.", + "type": "string" + } + }, + "required": [ + "connectionString", + "containerName" + ] + }, + "MessagingEndpointProperties": { + "description": "The properties of the messaging endpoints used by this IoT hub.", + "type": "object", + "properties": { + "lockDurationAsIso8601": { + "description": "The lock duration. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload.", + "type": "string", + "format": "duration" + }, + "ttlAsIso8601": { + "description": "The period of time for which a message is available to consume before it is expired by the IoT hub. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload.", + "type": "string", + "format": "duration" + }, + "maxDeliveryCount": { + "description": "The number of times the IoT hub attempts to deliver a message. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload.", + "format": "int32", + "type": "integer", + "minimum": 1, + "maximum": 100 + } + } + }, + "CloudToDeviceProperties": { + "description": "The IoT hub cloud-to-device messaging properties.", + "type": "object", + "properties": { + "maxDeliveryCount": { + "description": "The max delivery count for cloud-to-device messages in the device queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.", + "format": "int32", + "type": "integer", + "minimum": 1, + "maximum": 100 + }, + "defaultTtlAsIso8601": { + "description": "The default time to live for cloud-to-device messages in the device queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.", + "type": "string", + "format": "duration" + }, + "feedback": { + "$ref": "#/definitions/FeedbackProperties" + } + } + }, + "OperationsMonitoringProperties": { + "description": "The operations monitoring properties for the IoT hub. The possible keys to the dictionary are Connections, DeviceTelemetry, C2DCommands, DeviceIdentityOperations, FileUploadOperations, Routes, D2CTwinOperations, C2DTwinOperations, TwinQueries, JobsOperations, DirectMethods.", + "type": "object", + "properties": { + "events": { + "type": "object", + "additionalProperties": { + "enum": [ "None", "Error", "Information", "Error, Information" ], + "description": "The operations monitoring level.", + "type": "string", + "x-ms-enum": { + "name": "OperationMonitoringLevel", + "modelAsString": true + } + } + } + } + }, + "IpFilterRule": { + "description": "The IP filter rules for the IoT hub.", + "type": "object", + "properties": { + "filterName": { + "description": "The name of the IP filter rule.", + "type": "string" + }, + "action": { + "description": "The desired action for requests captured by this rule.", + "enum": [ "Accept", "Reject" ], + "type": "string", + "x-ms-enum": { + "name": "IpFilterActionType", + "modelAsString": false + } + }, + "ipMask": { + "description": "A string that contains the IP address range in CIDR notation for the rule.", + "type": "string" + } + }, + "required": [ + "filterName", + "action", + "ipMask" + ] + }, + "FeedbackProperties": { + "description": "The properties of the feedback queue for cloud-to-device messages.", + "type": "object", + "properties": { + "lockDurationAsIso8601": { + "description": "The lock duration for the feedback queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.", + "type": "string", + "format": "duration" + }, + "ttlAsIso8601": { + "description": "The period of time for which a message is available to consume before it is expired by the IoT hub. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.", + "type": "string", + "format": "duration" + }, + "maxDeliveryCount": { + "description": "The number of times the IoT hub attempts to deliver a message on the feedback queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.", + "format": "int32", + "type": "integer", + "minimum": 1, + "maximum": 100 + } + } + }, + "RoutingProperties": { + "description": "The routing related properties of the IoT hub. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging", + "type": "object", + "properties": { + "endpoints": { + "$ref": "#/definitions/RoutingEndpoints" + }, + "routes": { + "description": "The list of user-provided routing rules that the IoT hub uses to route messages to built-in and custom endpoints. A maximum of 100 routing rules are allowed for paid hubs and a maximum of 5 routing rules are allowed for free hubs.", + "type": "array", + "items": { + "$ref": "#/definitions/RouteProperties" + } + }, + "fallbackRoute": { + "description": "The properties of the route that is used as a fall-back route when none of the conditions specified in the 'routes' section are met. This is an optional parameter. When this property is not set, the messages which do not meet any of the conditions specified in the 'routes' section get routed to the built-in eventhub endpoint.", + "$ref": "#/definitions/FallbackRouteProperties" + } + } + }, + "RoutingEndpoints": { + "description": "The properties related to the custom endpoints to which your IoT hub routes messages based on the routing rules. A maximum of 10 custom endpoints are allowed across all endpoint types for paid hubs and only 1 custom endpoint is allowed across all endpoint types for free hubs.", + "type": "object", + "properties": { + "serviceBusQueues": { + "description": "The list of Service Bus queue endpoints that IoT hub routes the messages to, based on the routing rules.", + "type": "array", + "items": { + "$ref": "#/definitions/RoutingServiceBusQueueEndpointProperties" + } + }, + "serviceBusTopics": { + "description": "The list of Service Bus topic endpoints that the IoT hub routes the messages to, based on the routing rules.", + "type": "array", + "items": { + "$ref": "#/definitions/RoutingServiceBusTopicEndpointProperties" + } + }, + "eventHubs": { + "description": "The list of Event Hubs endpoints that IoT hub routes messages to, based on the routing rules. This list does not include the built-in Event Hubs endpoint.", + "type": "array", + "items": { + "$ref": "#/definitions/RoutingEventHubProperties" + } + }, + "storageContainers": { + "description": "The list of storage container endpoints that IoT hub routes messages to, based on the routing rules.", + "type": "array", + "items": { + "$ref": "#/definitions/RoutingStorageContainerProperties" + } + } + } + }, + "RoutingServiceBusQueueEndpointProperties": { + "description": "The properties related to service bus queue endpoint types.", + "type": "object", + "properties": { + "connectionString": { + "description": "The connection string of the service bus queue endpoint.", + "type": "string" + }, + "name": { + "description": "The name that identifies this endpoint. The name can only include alphanumeric characters, periods, underscores, hyphens and has a maximum length of 64 characters. The following names are reserved: events, operationsMonitoringEvents, fileNotifications, $default. Endpoint names must be unique across endpoint types. The name need not be the same as the actual queue name.", + "type": "string", + "pattern": "^[A-Za-z0-9-._]{1,64}$" + }, + "subscriptionId": { + "description": "The subscription identifier of the service bus queue endpoint.", + "type": "string" + }, + "resourceGroup": { + "description": "The name of the resource group of the service bus queue endpoint.", + "type": "string" + } + }, + "required": [ + "name", + "connectionString" + ] + }, + "RoutingServiceBusTopicEndpointProperties": { + "description": "The properties related to service bus topic endpoint types.", + "type": "object", + "properties": { + "connectionString": { + "description": "The connection string of the service bus topic endpoint.", + "type": "string" + }, + "name": { + "description": "The name that identifies this endpoint. The name can only include alphanumeric characters, periods, underscores, hyphens and has a maximum length of 64 characters. The following names are reserved: events, operationsMonitoringEvents, fileNotifications, $default. Endpoint names must be unique across endpoint types. The name need not be the same as the actual topic name.", + "type": "string", + "pattern": "^[A-Za-z0-9-._]{1,64}$" + }, + "subscriptionId": { + "description": "The subscription identifier of the service bus topic endpoint.", + "type": "string" + }, + "resourceGroup": { + "description": "The name of the resource group of the service bus topic endpoint.", + "type": "string" + } + }, + "required": [ + "name", + "connectionString" + ] + }, + "RoutingEventHubProperties": { + "description": "The properties related to an event hub endpoint.", + "type": "object", + "properties": { + "connectionString": { + "description": "The connection string of the event hub endpoint. ", + "type": "string" + }, + "name": { + "description": "The name that identifies this endpoint. The name can only include alphanumeric characters, periods, underscores, hyphens and has a maximum length of 64 characters. The following names are reserved: events, operationsMonitoringEvents, fileNotifications, $default. Endpoint names must be unique across endpoint types.", + "type": "string", + "pattern": "^[A-Za-z0-9-._]{1,64}$" + }, + "subscriptionId": { + "description": "The subscription identifier of the event hub endpoint.", + "type": "string" + }, + "resourceGroup": { + "description": "The name of the resource group of the event hub endpoint.", + "type": "string" + } + }, + "required": [ + "name", + "connectionString" + ] + }, + "RoutingStorageContainerProperties": { + "description": "The properties related to a storage container endpoint.", + "type": "object", + "properties": { + "connectionString": { + "description": "The connection string of the storage account.", + "type": "string" + }, + "name": { + "description": "The name that identifies this endpoint. The name can only include alphanumeric characters, periods, underscores, hyphens and has a maximum length of 64 characters. The following names are reserved: events, operationsMonitoringEvents, fileNotifications, $default. Endpoint names must be unique across endpoint types.", + "type": "string", + "pattern": "^[A-Za-z0-9-._]{1,64}$" + }, + "subscriptionId": { + "description": "The subscription identifier of the storage account.", + "type": "string" + }, + "resourceGroup": { + "description": "The name of the resource group of the storage account.", + "type": "string" + }, + "containerName": { + "description": "The name of storage container in the storage account.", + "type": "string" + }, + "fileNameFormat": { + "description": "File name format for the blob. Default format is {iothub}/{partition}/{YYYY}/{MM}/{DD}/{HH}/{mm}. All parameters are mandatory but can be reordered.", + "type": "string" + }, + "batchFrequencyInSeconds": { + "description": "Time interval at which blobs are written to storage. Value should be between 60 and 720 seconds. Default value is 300 seconds.", + "format": "int32", + "type": "integer", + "maximum": 720, + "minimum": 60 + }, + "maxChunkSizeInBytes": { + "description": "Maximum number of bytes for each blob written to storage. Value should be between 10485760(10MB) and 524288000(500MB). Default value is 314572800(300MB).", + "format": "int32", + "type": "integer", + "maximum": 524288000, + "minimum": 10485760 + }, + "encoding": { + "description": "Encoding that is used to serialize messages to blobs. Supported values are 'avro' and 'avrodeflate'. Default value is 'avro'.", + "type": "string" + } + }, + "required": [ + "name", + "connectionString", + "containerName" + ] + }, + "RouteProperties": { + "description": "The properties of a routing rule that your IoT hub uses to route messages to endpoints.", + "type": "object", + "properties": { + "name": { + "description": "The name of the route. The name can only include alphanumeric characters, periods, underscores, hyphens, has a maximum length of 64 characters, and must be unique.", + "type": "string", + "pattern": "^[A-Za-z0-9-._]{1,64}$" + }, + "source": { + "description": "The source that the routing rule is to be applied to, such as DeviceMessages.", + "enum": ["DeviceMessages", "TwinChangeEvents", "DeviceLifecycleEvents", "DeviceJobLifecycleEvents"], + "type": "string", + "x-ms-enum": { + "name": "RoutingSource", + "modelAsString": true + } + }, + "condition": { + "description": "The condition that is evaluated to apply the routing rule. If no condition is provided, it evaluates to true by default. For grammar, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language", + "type": "string" + }, + "endpointNames": { + "description": "The list of endpoints to which messages that satisfy the condition are routed. Currently only one endpoint is allowed.", + "minItems": 1, + "maxItems": 1, + "type": "array", + "items": { + "type": "string" + } + }, + "isEnabled": { + "description": "Used to specify whether a route is enabled.", + "type": "boolean" + } + }, + "required": [ + "name", + "endpointNames", + "source", + "isEnabled" + ] + }, + "FallbackRouteProperties": { + "description": "The properties of the fallback route. IoT Hub uses these properties when it routes messages to the fallback endpoint.", + "type": "object", + "properties": { + "name": { + "description": "The name of the route. The name can only include alphanumeric characters, periods, underscores, hyphens, has a maximum length of 64 characters, and must be unique.", + "type": "string" + }, + "source": { + "description": "The source to which the routing rule is to be applied to. For example, DeviceMessages", + "enum": ["DeviceMessages"], + "type": "string", + "x-ms-enum": { + "name": "RoutingSource", + "modelAsString": true + } + }, + "condition": { + "description": "The condition which is evaluated in order to apply the fallback route. If the condition is not provided it will evaluate to true by default. For grammar, See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language", + "type": "string" + }, + "endpointNames": { + "description": "The list of endpoints to which the messages that satisfy the condition are routed to. Currently only 1 endpoint is allowed.", + "minItems": 1, + "maxItems": 1, + "type": "array", + "items": { + "type": "string" + } + }, + "isEnabled": { + "description": "Used to specify whether the fallback route is enabled.", + "type": "boolean" + } + }, + "required": [ + "endpointNames", + "source", + "isEnabled" + ] + }, + "IotHubDescription": { + "description": "The description of the IoT hub.", + "type": "object", + "properties": { + "etag": { + "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.", + "type": "string" + }, + "properties": { + "$ref": "#/definitions/IotHubProperties" + }, + "sku": { + "$ref": "#/definitions/IotHubSkuInfo" + } + }, + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "required": [ + "sku" + ] + }, + "Resource": { + "description": "The common properties of an Azure resource.", + "properties": { + "id": { + "readOnly": true, + "type": "string", + "description": "The resource identifier." + }, + "name": { + "readOnly": true, + "type": "string", + "description": "The resource name.", + "pattern": "^(?![0-9]+$)(?!-)[a-zA-Z0-9-]{2,49}[a-zA-Z0-9]$" + }, + "type": { + "readOnly": true, + "type": "string", + "description": "The resource type." + }, + "location": { + "type": "string", + "description": "The resource location." + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "The resource tags." + } + }, + "x-ms-azure-resource": true, + "required": [ + "location" + ] + }, + "SharedAccessSignatureAuthorizationRuleListResult": { + "description": "The list of shared access policies with a next link.", + "type": "object", + "properties": { + "value": { + "description": "The list of shared access policies.", + "type": "array", + "items": { + "$ref": "#/definitions/SharedAccessSignatureAuthorizationRule" + } + }, + "nextLink": { + "description": "The next link.", + "type": "string", + "readOnly": true + } + } + }, + "OperationListResult": { + "description": "Result of the request to list IoT Hub operations. It contains a list of operations and a URL link to get the next set of results.", + "properties": { + "value": { + "description": "List of IoT Hub operations supported by the Microsoft.Devices resource provider.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/Operation" + } + }, + "nextLink": { + "readOnly": true, + "type": "string", + "description": "URL to get the next set of operation list results if there are any." + } + } + }, + "Operation": { + "description": "IoT Hub 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.", + "properties": { + "provider": { + "readOnly": true, + "type": "string", + "description": "Service provider: Microsoft Devices" + }, + "resource": { + "readOnly": true, + "type": "string", + "description": "Resource Type: IotHubs" + }, + "operation": { + "readOnly": true, + "type": "string", + "description": "Name of the operation" + } + } + } + } + }, + "ErrorDetails": { + "description": "Error details.", + "type": "object", + "properties": { + "code": { + "description": "The error code.", + "type": "string", + "readOnly": true + }, + "httpStatusCode": { + "description": "The HTTP status code.", + "type": "string", + "readOnly": true + }, + "message": { + "description": "The error message.", + "type": "string", + "readOnly": true + }, + "details": { + "description": "The error details.", + "type": "string", + "readOnly": true + } + } + }, + "IotHubQuotaMetricInfoListResult": { + "description": "The JSON-serialized array of IotHubQuotaMetricInfo objects with a next link.", + "type": "object", + "properties": { + "value": { + "description": "The array of quota metrics objects.", + "type": "array", + "items": { + "$ref": "#/definitions/IotHubQuotaMetricInfo" + } + }, + "nextLink": { + "description": "The next link.", + "type": "string", + "readOnly": true + } + } + }, + "RegistryStatistics": { + "description": "Identity registry statistics.", + "type": "object", + "properties": { + "totalDeviceCount": { + "format": "int64", + "description": "The total count of devices in the identity registry.", + "type": "integer", + "readOnly": true + }, + "enabledDeviceCount": { + "format": "int64", + "description": "The count of enabled devices in the identity registry.", + "type": "integer", + "readOnly": true + }, + "disabledDeviceCount": { + "format": "int64", + "description": "The count of disabled devices in the identity registry.", + "type": "integer", + "readOnly": true + } + } + }, + "JobResponseListResult": { + "description": "The JSON-serialized array of JobResponse objects with a next link.", + "type": "object", + "properties": { + "value": { + "description": "The array of JobResponse objects.", + "type": "array", + "items": { + "$ref": "#/definitions/JobResponse" + } + }, + "nextLink": { + "description": "The next link.", + "type": "string", + "readOnly": true + } + } + }, + "IotHubSkuDescription": { + "description": "SKU properties.", + "type": "object", + "properties": { + "resourceType": { + "description": "The type of the resource.", + "type": "string", + "readOnly": true + }, + "sku": { + "description": "The type of the resource.", + "$ref": "#/definitions/IotHubSkuInfo" + }, + "capacity": { + "$ref": "#/definitions/IotHubCapacity" + } + }, + "required": [ + "sku", + "capacity" + ] + }, + "TagsResource": { + "properties": { + "tags": { + "additionalProperties": { + "type": "string" + }, + "description": "Resource tags" + } + }, + "description": "A container holding only the Tags for a resource, allowing the user to update the tags on an IoT Hub instance." + }, + "IotHubCapacity": { + "description": "IoT Hub capacity information.", + "type": "object", + "properties": { + "minimum": { + "format": "int64", + "description": "The minimum number of units.", + "type": "integer", + "minimum": 1, + "maximum": 1, + "readOnly": true + }, + "maximum": { + "format": "int64", + "description": "The maximum number of units.", + "type": "integer", + "readOnly": true + }, + "default": { + "format": "int64", + "description": "The default number of units.", + "type": "integer", + "readOnly": true + }, + "scaleType": { + "description": "The type of the scaling enabled.", + "enum": [ "Automatic", "Manual", "None" ], + "readOnly": true, + "type": "string", + "x-ms-enum": { + "name": "IotHubScaleType", + "modelAsString": false + } + } + } + }, + "EventHubConsumerGroupsListResult": { + "description": "The JSON-serialized array of Event Hub-compatible consumer group names with a next link.", + "type": "object", + "properties": { + "value": { + "description": "List of consumer groups objects", + "type": "array", + "items": { + "$ref": "#/definitions/EventHubConsumerGroupInfo" + } + }, + "nextLink": { + "description": "The next link.", + "type": "string", + "readOnly": true + } + } + }, + "EventHubConsumerGroupInfo": { + "description": "The properties of the EventHubConsumerGroupInfo object.", + "x-ms-azure-resource": true, + "type": "object", + "properties": { + "properties": { + "description": "The tags.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "id": { + "description": "The Event Hub-compatible consumer group identifier.", + "type": "string", + "readOnly": true + }, + "name": { + "description": "The Event Hub-compatible consumer group name.", + "type": "string", + "readOnly": true + }, + "type": { + "description": "the resource type.", + "type": "string", + "readOnly": true + }, + "etag": { + "description": "The etag.", + "type": "string", + "readOnly": true + } + } + }, + "IotHubSkuDescriptionListResult": { + "description": "The JSON-serialized array of IotHubSkuDescription objects with a next link.", + "type": "object", + "properties": { + "value": { + "description": "The array of IotHubSkuDescription.", + "type": "array", + "items": { + "$ref": "#/definitions/IotHubSkuDescription" + } + }, + "nextLink": { + "description": "The next link.", + "type": "string", + "readOnly": true + } + } + }, + "JobResponse": { + "description": "The properties of the Job Response object.", + "type": "object", + "properties": { + "jobId": { + "description": "The job identifier.", + "type": "string", + "readOnly": true + }, + "startTimeUtc": { + "format": "date-time-rfc1123", + "description": "The start time of the job.", + "type": "string", + "readOnly": true + }, + "endTimeUtc": { + "format": "date-time-rfc1123", + "description": "The time the job stopped processing.", + "type": "string", + "readOnly": true + }, + "type": { + "description": "The type of the job.", + "enum": [ "unknown", "export", "import", "backup", "readDeviceProperties", "writeDeviceProperties", "updateDeviceConfiguration", "rebootDevice", "factoryResetDevice", "firmwareUpdate" ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "JobType", + "modelAsString": true + } + }, + "status": { + "description": "The status of the job.", + "enum": [ "unknown", "enqueued", "running", "completed", "failed", "cancelled" ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "JobStatus", + "modelAsString": false + } + }, + "failureReason": { + "description": "If status == failed, this string containing the reason for the failure.", + "type": "string", + "readOnly": true + }, + "statusMessage": { + "description": "The status message for the job.", + "type": "string", + "readOnly": true + }, + "parentJobId": { + "description": "The job identifier of the parent job, if any.", + "type": "string", + "readOnly": true + } + } + }, + "IotHubDescriptionListResult": { + "description": "The JSON-serialized array of IotHubDescription objects with a next link.", + "type": "object", + "properties": { + "value": { + "description": "The array of IotHubDescription objects.", + "type": "array", + "items": { + "$ref": "#/definitions/IotHubDescription" + } + }, + "nextLink": { + "description": "The next link.", + "type": "string", + "readOnly": true + } + } + }, + "IotHubQuotaMetricInfo": { + "description": "Quota metrics properties.", + "type": "object", + "properties": { + "name": { + "description": "The name of the quota metric.", + "type": "string", + "readOnly": true + }, + "currentValue": { + "format": "int64", + "description": "The current value for the quota metric.", + "type": "integer", + "readOnly": true + }, + "maxValue": { + "format": "int64", + "description": "The maximum value of the quota metric.", + "type": "integer", + "readOnly": true + } + } + }, + "OperationInputs": { + "description": "Input values.", + "type": "object", + "properties": { + "name": { + "description": "The name of the IoT hub to check.", + "type": "string" + } + }, + "required": [ + "name" + ] + }, + "IotHubNameAvailabilityInfo": { + "description": "The properties indicating whether a given IoT hub 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": "IotHubNameUnavailabilityReason", + "modelAsString": false + } + }, + "message": { + "description": "The detailed reason message.", + "type": "string" + } + } + }, + "ExportDevicesRequest": { + "description": "Use to provide parameters when requesting an export of all devices in the IoT hub.", + "type": "object", + "properties": { + "exportBlobContainerUri": { + "description": "The export blob container URI.", + "type": "string" + }, + "excludeKeys": { + "description": "The value indicating whether keys should be excluded during export.", + "type": "boolean" + } + }, + "required": [ + "exportBlobContainerUri", + "excludeKeys" + ] + }, + "ImportDevicesRequest": { + "description": "Use to provide parameters when requesting an import of all devices in the hub.", + "type": "object", + "properties": { + "inputBlobContainerUri": { + "description": "The input blob container URI.", + "type": "string" + }, + "outputBlobContainerUri": { + "description": "The output blob container URI.", + "type": "string" + } + }, + "required": [ + "inputBlobContainerUri", + "outputBlobContainerUri" + ] + } + }, + "parameters": { + "subscriptionId": { + "name": "subscriptionId", + "in": "path", + "description": "The subscription identifier.", + "required": true, + "type": "string" + }, + "api-version": { + "name": "api-version", + "in": "query", + "description": "The version of the API.", + "required": true, + "type": "string" + }, + "resourceGroupName": { + "name": "resourceGroupName", + "description": "The name of the resource group that contains the IoT hub.", + "in": "path", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "resourceName":{ + "name": "resourceName", + "in": "path", + "description": "The name of the IoT hub.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "certificateName":{ + "name": "certificateName", + "in":"path", + "description":"The name of the certificate", + "required":true, + "type":"string", + "pattern":"^[A-Za-z0-9-._]{1,64}$", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/iothub/resource-manager/readme.md b/specification/iothub/resource-manager/readme.md index be8deca8947d..d171ad8f1be6 100644 --- a/specification/iothub/resource-manager/readme.md +++ b/specification/iothub/resource-manager/readme.md @@ -26,7 +26,16 @@ These are the global settings for the IotHub API. ``` yaml openapi-type: arm -tag: package-2017-07 +tag: package-2018-01 +``` + +### Tag: package-2018-01 + +These settings apply only when `--tag=package-2018-01` is specified on the command line. + +``` yaml $(tag) == 'package-2018-01' +input-file: +- Microsoft.Devices/stable/2018-01-22/iothub.json ``` ### Tag: package-2017-07