instances
Creates, updates, deletes, gets or lists an instances resource.
Overview
| Name | instances |
| Type | Resource |
| Id | azure.device_update.instances |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_account
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
accountName | string | Parent Device Update Account name which Instance belongs to. |
diagnosticStorageProperties | object | Customer-initiated diagnostic log collection storage properties. |
enableDiagnostics | boolean | Enables or Disables the diagnostic logs collection. |
iotHubs | array | List of IoT Hubs associated with the account. |
location | string | The geo-location where the resource lives. Required. |
provisioningState | string | Provisioning state. Known values are: "Succeeded", "Deleted", "Failed", "Canceled", "Accepted", and "Creating". |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
accountName | string | Parent Device Update Account name which Instance belongs to. |
diagnosticStorageProperties | object | Customer-initiated diagnostic log collection storage properties. |
enableDiagnostics | boolean | Enables or Disables the diagnostic logs collection. |
iotHubs | array | List of IoT Hubs associated with the account. |
location | string | The geo-location where the resource lives. Required. |
provisioningState | string | Provisioning state. Known values are: "Succeeded", "Deleted", "Failed", "Canceled", "Accepted", and "Creating". |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, account_name, instance_name, subscription_id | Returns instance details for the given instance and account name. | |
list_by_account | select | resource_group_name, account_name, subscription_id | Returns instances for the given account name. | |
create | insert | resource_group_name, account_name, instance_name, subscription_id, location | Creates or updates instance. | |
update | update | resource_group_name, account_name, instance_name, subscription_id | Updates instance's tags. | |
delete | delete | resource_group_name, account_name, instance_name, subscription_id | Deletes instance. | |
head | exec | resource_group_name, account_name, instance_name, subscription_id | Checks whether instance exists. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
account_name | string | Account name. Required. |
instance_name | string | Instance name. Required. |
resource_group_name | string | The resource group name. Required. |
subscription_id | string |
SELECT examples
- get
- list_by_account
Returns instance details for the given instance and account name.
SELECT
id,
name,
accountName,
diagnosticStorageProperties,
enableDiagnostics,
iotHubs,
location,
provisioningState,
systemData,
tags,
type
FROM azure.device_update.instances
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND account_name = '{{ account_name }}' -- required
AND instance_name = '{{ instance_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Returns instances for the given account name.
SELECT
id,
name,
accountName,
diagnosticStorageProperties,
enableDiagnostics,
iotHubs,
location,
provisioningState,
systemData,
tags,
type
FROM azure.device_update.instances
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND account_name = '{{ account_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create
- Manifest
Creates or updates instance.
INSERT INTO azure.device_update.instances (
tags,
location,
properties,
resource_group_name,
account_name,
instance_name,
subscription_id
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ properties }}',
'{{ resource_group_name }}',
'{{ account_name }}',
'{{ instance_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type
;
# Description fields are for documentation purposes
- name: instances
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the instances resource.
- name: account_name
value: "{{ account_name }}"
description: Required parameter for the instances resource.
- name: instance_name
value: "{{ instance_name }}"
description: Required parameter for the instances resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the instances resource.
- name: tags
value: "{{ tags }}"
description: |
Resource tags.
- name: location
value: "{{ location }}"
description: |
The geo-location where the resource lives. Required.
- name: properties
value:
iotHubs:
- resourceId: "{{ resourceId }}"
enableDiagnostics: {{ enableDiagnostics }}
diagnosticStorageProperties:
authenticationType: "{{ authenticationType }}"
connectionString: "{{ connectionString }}"
resourceId: "{{ resourceId }}"
UPDATE examples
- update
Updates instance's tags.
UPDATE azure.device_update.instances
SET
tags = '{{ tags }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND account_name = '{{ account_name }}' --required
AND instance_name = '{{ instance_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type;
DELETE examples
- delete
Deletes instance.
DELETE FROM azure.device_update.instances
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND account_name = '{{ account_name }}' --required
AND instance_name = '{{ instance_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;
Lifecycle Methods
- head
Checks whether instance exists.
EXEC azure.device_update.instances.head
@resource_group_name='{{ resource_group_name }}' --required,
@account_name='{{ account_name }}' --required,
@instance_name='{{ instance_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;