assets
Creates, updates, deletes, gets or lists an assets resource.
Overview
| Name | assets |
| Type | Resource |
| Id | azure.device_registry.assets |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_resource_group
- list_by_subscription
| 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. |
assetEndpointProfileRef | string | A reference to the asset endpoint profile (connection information) used by brokers to connect to an endpoint that provides data points for this asset. Must provide asset endpoint profile name. Required. |
attributes | object | A set of key-value pairs that contain custom attributes set by the customer. |
datasets | array | Array of datasets that are part of the asset. Each dataset describes the data points that make up the set. |
defaultDatasetsConfiguration | string | Stringified JSON that contains connector-specific default configuration for all datasets. Each dataset can have its own configuration that overrides the default settings here. |
defaultEventsConfiguration | string | Stringified JSON that contains connector-specific default configuration for all events. Each event can have its own configuration that overrides the default settings here. |
defaultTopic | object | Object that describes the default topic information for the asset. |
description | string | Human-readable description of the asset. |
discoveredAssetRefs | array | Reference to a list of discovered assets. Populated only if the asset has been created from discovery flow. Discovered asset names must be provided. |
displayName | string | Human-readable display name. |
documentationUri | string | Reference to the documentation. |
enabled | boolean | Enabled/Disabled status of the asset. |
events | array | Array of events that are part of the asset. Each event can have per-event configuration. |
extendedLocation | object | The extended location. Required. |
externalAssetId | string | Asset id provided by the customer. |
hardwareRevision | string | Revision number of the hardware. |
location | string | The geo-location where the resource lives. Required. |
manufacturer | string | Asset manufacturer name. |
manufacturerUri | string | Asset manufacturer URI. |
model | string | Asset model name. |
productCode | string | Asset product code. |
provisioningState | string | Provisioning state of the resource. Known values are: "Succeeded", "Failed", "Canceled", "Accepted", and "Deleting". (Succeeded, Failed, Canceled, Accepted, Deleting) |
serialNumber | string | Asset serial number. |
softwareRevision | string | Revision number of the software. |
status | object | Read only object to reflect changes that have occurred on the Edge. Similar to Kubernetes status property for custom resources. |
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". |
uuid | string | Globally unique, immutable, non-reusable id. |
version | integer | An integer that is incremented each time the resource is modified. |
| 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. |
assetEndpointProfileRef | string | A reference to the asset endpoint profile (connection information) used by brokers to connect to an endpoint that provides data points for this asset. Must provide asset endpoint profile name. Required. |
attributes | object | A set of key-value pairs that contain custom attributes set by the customer. |
datasets | array | Array of datasets that are part of the asset. Each dataset describes the data points that make up the set. |
defaultDatasetsConfiguration | string | Stringified JSON that contains connector-specific default configuration for all datasets. Each dataset can have its own configuration that overrides the default settings here. |
defaultEventsConfiguration | string | Stringified JSON that contains connector-specific default configuration for all events. Each event can have its own configuration that overrides the default settings here. |
defaultTopic | object | Object that describes the default topic information for the asset. |
description | string | Human-readable description of the asset. |
discoveredAssetRefs | array | Reference to a list of discovered assets. Populated only if the asset has been created from discovery flow. Discovered asset names must be provided. |
displayName | string | Human-readable display name. |
documentationUri | string | Reference to the documentation. |
enabled | boolean | Enabled/Disabled status of the asset. |
events | array | Array of events that are part of the asset. Each event can have per-event configuration. |
extendedLocation | object | The extended location. Required. |
externalAssetId | string | Asset id provided by the customer. |
hardwareRevision | string | Revision number of the hardware. |
location | string | The geo-location where the resource lives. Required. |
manufacturer | string | Asset manufacturer name. |
manufacturerUri | string | Asset manufacturer URI. |
model | string | Asset model name. |
productCode | string | Asset product code. |
provisioningState | string | Provisioning state of the resource. Known values are: "Succeeded", "Failed", "Canceled", "Accepted", and "Deleting". (Succeeded, Failed, Canceled, Accepted, Deleting) |
serialNumber | string | Asset serial number. |
softwareRevision | string | Revision number of the software. |
status | object | Read only object to reflect changes that have occurred on the Edge. Similar to Kubernetes status property for custom resources. |
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". |
uuid | string | Globally unique, immutable, non-reusable id. |
version | integer | An integer that is incremented each time the resource is modified. |
| 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. |
assetEndpointProfileRef | string | A reference to the asset endpoint profile (connection information) used by brokers to connect to an endpoint that provides data points for this asset. Must provide asset endpoint profile name. Required. |
attributes | object | A set of key-value pairs that contain custom attributes set by the customer. |
datasets | array | Array of datasets that are part of the asset. Each dataset describes the data points that make up the set. |
defaultDatasetsConfiguration | string | Stringified JSON that contains connector-specific default configuration for all datasets. Each dataset can have its own configuration that overrides the default settings here. |
defaultEventsConfiguration | string | Stringified JSON that contains connector-specific default configuration for all events. Each event can have its own configuration that overrides the default settings here. |
defaultTopic | object | Object that describes the default topic information for the asset. |
description | string | Human-readable description of the asset. |
discoveredAssetRefs | array | Reference to a list of discovered assets. Populated only if the asset has been created from discovery flow. Discovered asset names must be provided. |
displayName | string | Human-readable display name. |
documentationUri | string | Reference to the documentation. |
enabled | boolean | Enabled/Disabled status of the asset. |
events | array | Array of events that are part of the asset. Each event can have per-event configuration. |
extendedLocation | object | The extended location. Required. |
externalAssetId | string | Asset id provided by the customer. |
hardwareRevision | string | Revision number of the hardware. |
location | string | The geo-location where the resource lives. Required. |
manufacturer | string | Asset manufacturer name. |
manufacturerUri | string | Asset manufacturer URI. |
model | string | Asset model name. |
productCode | string | Asset product code. |
provisioningState | string | Provisioning state of the resource. Known values are: "Succeeded", "Failed", "Canceled", "Accepted", and "Deleting". (Succeeded, Failed, Canceled, Accepted, Deleting) |
serialNumber | string | Asset serial number. |
softwareRevision | string | Revision number of the software. |
status | object | Read only object to reflect changes that have occurred on the Edge. Similar to Kubernetes status property for custom resources. |
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". |
uuid | string | Globally unique, immutable, non-reusable id. |
version | integer | An integer that is incremented each time the resource is modified. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, asset_name, subscription_id | Get a Asset. | |
list_by_resource_group | select | resource_group_name, subscription_id | List Asset resources by resource group. | |
list_by_subscription | select | subscription_id | List Asset resources by subscription ID. | |
create_or_replace | insert | resource_group_name, asset_name, subscription_id, location, extendedLocation | Create a Asset. | |
update | update | resource_group_name, asset_name, subscription_id | Update a Asset. | |
create_or_replace | replace | resource_group_name, asset_name, subscription_id, location, extendedLocation | Create a Asset. | |
delete | delete | resource_group_name, asset_name, subscription_id | Delete a Asset. |
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 |
|---|---|---|
asset_name | string | Asset name parameter. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string |
SELECT examples
- get
- list_by_resource_group
- list_by_subscription
Get a Asset.
SELECT
id,
name,
assetEndpointProfileRef,
attributes,
datasets,
defaultDatasetsConfiguration,
defaultEventsConfiguration,
defaultTopic,
description,
discoveredAssetRefs,
displayName,
documentationUri,
enabled,
events,
extendedLocation,
externalAssetId,
hardwareRevision,
location,
manufacturer,
manufacturerUri,
model,
productCode,
provisioningState,
serialNumber,
softwareRevision,
status,
systemData,
tags,
type,
uuid,
version
FROM azure.device_registry.assets
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND asset_name = '{{ asset_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
List Asset resources by resource group.
SELECT
id,
name,
assetEndpointProfileRef,
attributes,
datasets,
defaultDatasetsConfiguration,
defaultEventsConfiguration,
defaultTopic,
description,
discoveredAssetRefs,
displayName,
documentationUri,
enabled,
events,
extendedLocation,
externalAssetId,
hardwareRevision,
location,
manufacturer,
manufacturerUri,
model,
productCode,
provisioningState,
serialNumber,
softwareRevision,
status,
systemData,
tags,
type,
uuid,
version
FROM azure.device_registry.assets
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
List Asset resources by subscription ID.
SELECT
id,
name,
assetEndpointProfileRef,
attributes,
datasets,
defaultDatasetsConfiguration,
defaultEventsConfiguration,
defaultTopic,
description,
discoveredAssetRefs,
displayName,
documentationUri,
enabled,
events,
extendedLocation,
externalAssetId,
hardwareRevision,
location,
manufacturer,
manufacturerUri,
model,
productCode,
provisioningState,
serialNumber,
softwareRevision,
status,
systemData,
tags,
type,
uuid,
version
FROM azure.device_registry.assets
WHERE subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create_or_replace
- Manifest
Create a Asset.
INSERT INTO azure.device_registry.assets (
tags,
location,
properties,
extendedLocation,
resource_group_name,
asset_name,
subscription_id
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ properties }}',
'{{ extendedLocation }}' /* required */,
'{{ resource_group_name }}',
'{{ asset_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
extendedLocation,
location,
properties,
systemData,
tags,
type
;
# Description fields are for documentation purposes
- name: assets
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the assets resource.
- name: asset_name
value: "{{ asset_name }}"
description: Required parameter for the assets resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the assets resource.
- name: tags
value: "{{ tags }}"
description: |
Resource tags.
- name: location
value: "{{ location }}"
description: |
The geo-location where the resource lives. Required.
- name: properties
description: |
The resource-specific properties for this resource.
value:
uuid: "{{ uuid }}"
enabled: {{ enabled }}
externalAssetId: "{{ externalAssetId }}"
displayName: "{{ displayName }}"
description: "{{ description }}"
assetEndpointProfileRef: "{{ assetEndpointProfileRef }}"
version: {{ version }}
manufacturer: "{{ manufacturer }}"
manufacturerUri: "{{ manufacturerUri }}"
model: "{{ model }}"
productCode: "{{ productCode }}"
hardwareRevision: "{{ hardwareRevision }}"
softwareRevision: "{{ softwareRevision }}"
documentationUri: "{{ documentationUri }}"
serialNumber: "{{ serialNumber }}"
attributes: "{{ attributes }}"
discoveredAssetRefs:
- "{{ discoveredAssetRefs }}"
defaultDatasetsConfiguration: "{{ defaultDatasetsConfiguration }}"
defaultEventsConfiguration: "{{ defaultEventsConfiguration }}"
defaultTopic:
path: "{{ path }}"
retain: "{{ retain }}"
datasets:
- name: "{{ name }}"
datasetConfiguration: "{{ datasetConfiguration }}"
topic:
path: "{{ path }}"
retain: "{{ retain }}"
dataPoints: "{{ dataPoints }}"
events:
- name: "{{ name }}"
eventNotifier: "{{ eventNotifier }}"
eventConfiguration: "{{ eventConfiguration }}"
topic:
path: "{{ path }}"
retain: "{{ retain }}"
observabilityMode: "{{ observabilityMode }}"
status:
errors:
- code: {{ code }}
message: "{{ message }}"
version: {{ version }}
datasets:
- name: "{{ name }}"
messageSchemaReference:
schemaRegistryNamespace: "{{ schemaRegistryNamespace }}"
schemaName: "{{ schemaName }}"
schemaVersion: "{{ schemaVersion }}"
events:
- name: "{{ name }}"
messageSchemaReference:
schemaRegistryNamespace: "{{ schemaRegistryNamespace }}"
schemaName: "{{ schemaName }}"
schemaVersion: "{{ schemaVersion }}"
provisioningState: "{{ provisioningState }}"
- name: extendedLocation
description: |
The extended location. Required.
value:
type: "{{ type }}"
name: "{{ name }}"
UPDATE examples
- update
Update a Asset.
UPDATE azure.device_registry.assets
SET
tags = '{{ tags }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND asset_name = '{{ asset_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
extendedLocation,
location,
properties,
systemData,
tags,
type;
REPLACE examples
- create_or_replace
Create a Asset.
REPLACE azure.device_registry.assets
SET
tags = '{{ tags }}',
location = '{{ location }}',
properties = '{{ properties }}',
extendedLocation = '{{ extendedLocation }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND asset_name = '{{ asset_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND location = '{{ location }}' --required
AND extendedLocation = '{{ extendedLocation }}' --required
RETURNING
id,
name,
extendedLocation,
location,
properties,
systemData,
tags,
type;
DELETE examples
- delete
Delete a Asset.
DELETE FROM azure.device_registry.assets
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND asset_name = '{{ asset_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;