Skip to main content

namespace_assets

Creates, updates, deletes, gets or lists a namespace_assets resource.

Overview

Namenamespace_assets
TypeResource
Idazure.device_registry.namespace_assets

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
assetTypeRefsarrayURIs or type definition IDs.
attributesobjectA set of key-value pairs that contain custom attributes set by the customer.
datasetsarrayArray of datasets that are part of the asset. Each dataset describes the data points that make up the set.
defaultDatasetsConfigurationstringStringified JSON that contains connector-specific default configuration for all datasets. Each dataset can have its own configuration that overrides the default settings here.
defaultDatasetsDestinationsarrayDefault destinations for a dataset.
defaultEventsConfigurationstringStringified JSON that contains connector-specific default configuration for all events. Each event can have its own configuration that overrides the default settings here.
defaultEventsDestinationsarrayDefault destinations for an event.
defaultManagementGroupsConfigurationstringStringified 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.
defaultStreamsConfigurationstringStringified JSON that contains connector-specific default configuration for all streams. Each stream can have its own configuration that overrides the default settings here.
defaultStreamsDestinationsarrayDefault destinations for a stream.
descriptionstringHuman-readable description of the asset.
deviceRefobjectReference to the device that provides data for this asset. Must provide device name & endpoint on the device to use. Required.
discoveredAssetRefsarrayReference to a list of discovered assets. Populated only if the asset has been created from discovery flow. Discovered asset names must be provided.
displayNamestringHuman-readable display name.
documentationUristringAsset documentation reference.
enabledbooleanEnabled/disabled status of the asset.
eventGroupsarrayArray of event groups that are part of the asset. Each event group can have per-event group configuration.
extendedLocationobjectThe extended location. Required.
externalAssetIdstringAsset ID provided by the customer.
hardwareRevisionstringAsset hardware revision number.
lastTransitionTimestring (date-time)A timestamp (in UTC) that is updated each time the resource is modified.
locationstringThe geo-location where the resource lives. Required.
managementGroupsarrayArray of management groups that are part of the asset. Each management group can have a per-group configuration.
manufacturerstringAsset manufacturer.
manufacturerUristringAsset manufacturer URI.
modelstringAsset model.
productCodestringAsset product code.
provisioningStatestringProvisioning state of the resource. Known values are: "Succeeded", "Failed", "Canceled", "Accepted", and "Deleting". (Succeeded, Failed, Canceled, Accepted, Deleting)
serialNumberstringAsset serial number.
softwareRevisionstringAsset software revision number.
statusobjectRead only object to reflect changes that have occurred on the Edge. Similar to Kubernetes status property for custom resources.
streamsarrayArray of streams that are part of the asset. Each stream can have a per-stream configuration.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
tagsobjectResource tags.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
uuidstringGlobally unique, immutable, non-reusable ID.
versionintegerAn integer that is incremented each time the resource is modified.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, namespace_name, asset_name, subscription_idGet a NamespaceAsset.
list_by_resource_groupselectresource_group_name, namespace_name, subscription_idList NamespaceAsset resources by Namespace.
create_or_replaceinsertresource_group_name, namespace_name, asset_name, subscription_id, location, extendedLocationCreate a NamespaceAsset.
updateupdateresource_group_name, namespace_name, asset_name, subscription_idUpdate a NamespaceAsset.
create_or_replacereplaceresource_group_name, namespace_name, asset_name, subscription_id, location, extendedLocationCreate a NamespaceAsset.
deletedeleteresource_group_name, namespace_name, asset_name, subscription_idDelete 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.

NameDatatypeDescription
asset_namestringThe name of the asset. Required.
namespace_namestringThe name of the namespace. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring

SELECT examples

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
;

INSERT examples

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
;

UPDATE examples

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 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 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
;