namespace_assets
Creates, updates, deletes, gets or lists a namespace_assets resource.
Overview
| Name | namespace_assets |
| Type | Resource |
| Id | azure.device_registry.namespace_assets |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_resource_group
| 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. |
assetTypeRefs | array | URIs or type definition IDs. |
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. |
defaultDatasetsDestinations | array | Default destinations for a dataset. |
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. |
defaultEventsDestinations | array | Default destinations for an event. |
defaultManagementGroupsConfiguration | string | Stringified JSON that contains connector-specific default configuration for all management groups. Each management group can have its own configuration that overrides the default settings here. |
defaultStreamsConfiguration | string | Stringified JSON that contains connector-specific default configuration for all streams. Each stream can have its own configuration that overrides the default settings here. |
defaultStreamsDestinations | array | Default destinations for a stream. |
description | string | Human-readable description of the asset. |
deviceRef | object | Reference to the device that provides data for this asset. Must provide device name & endpoint on the device to use. Required. |
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 | Asset documentation reference. |
enabled | boolean | Enabled/disabled status of the asset. |
eventGroups | array | Array of event groups that are part of the asset. Each event group can have per-event group configuration. |
extendedLocation | object | The extended location. Required. |
externalAssetId | string | Asset ID provided by the customer. |
hardwareRevision | string | Asset hardware revision number. |
lastTransitionTime | string (date-time) | A timestamp (in UTC) that is updated each time the resource is modified. |
location | string | The geo-location where the resource lives. Required. |
managementGroups | array | Array of management groups that are part of the asset. Each management group can have a per-group configuration. |
manufacturer | string | Asset manufacturer. |
manufacturerUri | string | Asset manufacturer URI. |
model | string | Asset model. |
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 | Asset software revision number. |
status | object | Read only object to reflect changes that have occurred on the Edge. Similar to Kubernetes status property for custom resources. |
streams | array | Array of streams that are part of the asset. Each stream can have a per-stream configuration. |
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. |
assetTypeRefs | array | URIs or type definition IDs. |
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. |
defaultDatasetsDestinations | array | Default destinations for a dataset. |
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. |
defaultEventsDestinations | array | Default destinations for an event. |
defaultManagementGroupsConfiguration | string | Stringified JSON that contains connector-specific default configuration for all management groups. Each management group can have its own configuration that overrides the default settings here. |
defaultStreamsConfiguration | string | Stringified JSON that contains connector-specific default configuration for all streams. Each stream can have its own configuration that overrides the default settings here. |
defaultStreamsDestinations | array | Default destinations for a stream. |
description | string | Human-readable description of the asset. |
deviceRef | object | Reference to the device that provides data for this asset. Must provide device name & endpoint on the device to use. Required. |
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 | Asset documentation reference. |
enabled | boolean | Enabled/disabled status of the asset. |
eventGroups | array | Array of event groups that are part of the asset. Each event group can have per-event group configuration. |
extendedLocation | object | The extended location. Required. |
externalAssetId | string | Asset ID provided by the customer. |
hardwareRevision | string | Asset hardware revision number. |
lastTransitionTime | string (date-time) | A timestamp (in UTC) that is updated each time the resource is modified. |
location | string | The geo-location where the resource lives. Required. |
managementGroups | array | Array of management groups that are part of the asset. Each management group can have a per-group configuration. |
manufacturer | string | Asset manufacturer. |
manufacturerUri | string | Asset manufacturer URI. |
model | string | Asset model. |
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 | Asset software revision number. |
status | object | Read only object to reflect changes that have occurred on the Edge. Similar to Kubernetes status property for custom resources. |
streams | array | Array of streams that are part of the asset. Each stream can have a per-stream configuration. |
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, namespace_name, asset_name, subscription_id | Get a NamespaceAsset. | |
list_by_resource_group | select | resource_group_name, namespace_name, subscription_id | List NamespaceAsset resources by Namespace. | |
create_or_replace | insert | resource_group_name, namespace_name, asset_name, subscription_id, location, extendedLocation | Create a NamespaceAsset. | |
update | update | resource_group_name, namespace_name, asset_name, subscription_id | Update a NamespaceAsset. | |
create_or_replace | replace | resource_group_name, namespace_name, asset_name, subscription_id, location, extendedLocation | Create a NamespaceAsset. | |
delete | delete | resource_group_name, namespace_name, asset_name, subscription_id | Delete a NamespaceAsset. |
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 | The name of the asset. Required. |
namespace_name | string | The name of the namespace. 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
Get a NamespaceAsset.
SELECT
id,
name,
assetTypeRefs,
attributes,
datasets,
defaultDatasetsConfiguration,
defaultDatasetsDestinations,
defaultEventsConfiguration,
defaultEventsDestinations,
defaultManagementGroupsConfiguration,
defaultStreamsConfiguration,
defaultStreamsDestinations,
description,
deviceRef,
discoveredAssetRefs,
displayName,
documentationUri,
enabled,
eventGroups,
extendedLocation,
externalAssetId,
hardwareRevision,
lastTransitionTime,
location,
managementGroups,
manufacturer,
manufacturerUri,
model,
productCode,
provisioningState,
serialNumber,
softwareRevision,
status,
streams,
systemData,
tags,
type,
uuid,
version
FROM azure.device_registry.namespace_assets
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND namespace_name = '{{ namespace_name }}' -- required
AND asset_name = '{{ asset_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
List NamespaceAsset resources by Namespace.
SELECT
id,
name,
assetTypeRefs,
attributes,
datasets,
defaultDatasetsConfiguration,
defaultDatasetsDestinations,
defaultEventsConfiguration,
defaultEventsDestinations,
defaultManagementGroupsConfiguration,
defaultStreamsConfiguration,
defaultStreamsDestinations,
description,
deviceRef,
discoveredAssetRefs,
displayName,
documentationUri,
enabled,
eventGroups,
extendedLocation,
externalAssetId,
hardwareRevision,
lastTransitionTime,
location,
managementGroups,
manufacturer,
manufacturerUri,
model,
productCode,
provisioningState,
serialNumber,
softwareRevision,
status,
streams,
systemData,
tags,
type,
uuid,
version
FROM azure.device_registry.namespace_assets
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND namespace_name = '{{ namespace_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create_or_replace
- Manifest
Create a NamespaceAsset.
INSERT INTO azure.device_registry.namespace_assets (
tags,
location,
properties,
extendedLocation,
resource_group_name,
namespace_name,
asset_name,
subscription_id
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ properties }}',
'{{ extendedLocation }}' /* required */,
'{{ resource_group_name }}',
'{{ namespace_name }}',
'{{ asset_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
extendedLocation,
location,
properties,
systemData,
tags,
type
;
# Description fields are for documentation purposes
- name: namespace_assets
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the namespace_assets resource.
- name: namespace_name
value: "{{ namespace_name }}"
description: Required parameter for the namespace_assets resource.
- name: asset_name
value: "{{ asset_name }}"
description: Required parameter for the namespace_assets resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the namespace_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 }}"
deviceRef:
deviceName: "{{ deviceName }}"
endpointName: "{{ endpointName }}"
assetTypeRefs:
- "{{ assetTypeRefs }}"
version: {{ version }}
lastTransitionTime: "{{ lastTransitionTime }}"
manufacturer: "{{ manufacturer }}"
manufacturerUri: "{{ manufacturerUri }}"
model: "{{ model }}"
productCode: "{{ productCode }}"
hardwareRevision: "{{ hardwareRevision }}"
softwareRevision: "{{ softwareRevision }}"
documentationUri: "{{ documentationUri }}"
serialNumber: "{{ serialNumber }}"
attributes: "{{ attributes }}"
discoveredAssetRefs:
- "{{ discoveredAssetRefs }}"
defaultDatasetsConfiguration: "{{ defaultDatasetsConfiguration }}"
defaultEventsConfiguration: "{{ defaultEventsConfiguration }}"
defaultStreamsConfiguration: "{{ defaultStreamsConfiguration }}"
defaultManagementGroupsConfiguration: "{{ defaultManagementGroupsConfiguration }}"
defaultDatasetsDestinations:
- target: "{{ target }}"
defaultEventsDestinations:
- target: "{{ target }}"
defaultStreamsDestinations:
- target: "{{ target }}"
datasets:
- name: "{{ name }}"
dataSource: "{{ dataSource }}"
typeRef: "{{ typeRef }}"
datasetConfiguration: "{{ datasetConfiguration }}"
destinations: "{{ destinations }}"
dataPoints: "{{ dataPoints }}"
eventGroups:
- name: "{{ name }}"
dataSource: "{{ dataSource }}"
eventGroupConfiguration: "{{ eventGroupConfiguration }}"
defaultDestinations: "{{ defaultDestinations }}"
typeRef: "{{ typeRef }}"
events: "{{ events }}"
streams:
- name: "{{ name }}"
streamConfiguration: "{{ streamConfiguration }}"
typeRef: "{{ typeRef }}"
destinations: "{{ destinations }}"
managementGroups:
- name: "{{ name }}"
dataSource: "{{ dataSource }}"
managementGroupConfiguration: "{{ managementGroupConfiguration }}"
typeRef: "{{ typeRef }}"
defaultTopic: "{{ defaultTopic }}"
defaultTimeoutInSeconds: {{ defaultTimeoutInSeconds }}
actions: "{{ actions }}"
status:
config:
version: {{ version }}
lastTransitionTime: "{{ lastTransitionTime }}"
error:
code: "{{ code }}"
message: "{{ message }}"
details:
- code: "{{ code }}"
message: "{{ message }}"
info: "{{ info }}"
correlationId: "{{ correlationId }}"
datasets:
- name: "{{ name }}"
messageSchemaReference:
schemaRegistryNamespace: "{{ schemaRegistryNamespace }}"
schemaName: "{{ schemaName }}"
schemaVersion: "{{ schemaVersion }}"
error:
code: "{{ code }}"
message: "{{ message }}"
details:
- code: "{{ code }}"
message: "{{ message }}"
info: "{{ info }}"
correlationId: "{{ correlationId }}"
eventGroups:
- name: "{{ name }}"
events: "{{ events }}"
streams:
- name: "{{ name }}"
messageSchemaReference:
schemaRegistryNamespace: "{{ schemaRegistryNamespace }}"
schemaName: "{{ schemaName }}"
schemaVersion: "{{ schemaVersion }}"
error:
code: "{{ code }}"
message: "{{ message }}"
details:
- code: "{{ code }}"
message: "{{ message }}"
info: "{{ info }}"
correlationId: "{{ correlationId }}"
managementGroups:
- name: "{{ name }}"
actions: "{{ actions }}"
provisioningState: "{{ provisioningState }}"
- name: extendedLocation
description: |
The extended location. Required.
value:
type: "{{ type }}"
name: "{{ name }}"
UPDATE examples
- update
Update a NamespaceAsset.
UPDATE azure.device_registry.namespace_assets
SET
tags = '{{ tags }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND namespace_name = '{{ namespace_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 NamespaceAsset.
REPLACE azure.device_registry.namespace_assets
SET
tags = '{{ tags }}',
location = '{{ location }}',
properties = '{{ properties }}',
extendedLocation = '{{ extendedLocation }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND namespace_name = '{{ namespace_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 NamespaceAsset.
DELETE FROM azure.device_registry.namespace_assets
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND namespace_name = '{{ namespace_name }}' --required
AND asset_name = '{{ asset_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;