namespace_discovered_assets
Creates, updates, deletes, gets or lists a namespace_discovered_assets resource.
Overview
| Name | namespace_discovered_assets |
| Type | Resource |
| Id | azure.device_registry.namespace_discovered_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. |
datasets | array | Array of datasets that are part of the asset. Each dataset spec 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. |
discoveryId | string | Identifier used to detect changes in the asset. Required. |
displayName | string | Human-readable display name. |
documentationUri | string | Asset documentation reference. |
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. |
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. |
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". |
version | integer | An integer that is incremented each time the resource is modified. Required. |
| 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. |
datasets | array | Array of datasets that are part of the asset. Each dataset spec 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. |
discoveryId | string | Identifier used to detect changes in the asset. Required. |
displayName | string | Human-readable display name. |
documentationUri | string | Asset documentation reference. |
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. |
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. |
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". |
version | integer | An integer that is incremented each time the resource is modified. Required. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, namespace_name, discovered_asset_name, subscription_id | Get a NamespaceDiscoveredAsset. | |
list_by_resource_group | select | resource_group_name, namespace_name, subscription_id | List NamespaceDiscoveredAsset resources by Namespace. | |
create_or_replace | insert | resource_group_name, namespace_name, discovered_asset_name, subscription_id, location, extendedLocation | Create a NamespaceDiscoveredAsset. | |
update | update | resource_group_name, namespace_name, discovered_asset_name, subscription_id | Update a NamespaceDiscoveredAsset. | |
create_or_replace | replace | resource_group_name, namespace_name, discovered_asset_name, subscription_id, location, extendedLocation | Create a NamespaceDiscoveredAsset. | |
delete | delete | resource_group_name, namespace_name, discovered_asset_name, subscription_id | Delete a NamespaceDiscoveredAsset. |
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 |
|---|---|---|
discovered_asset_name | string | The name of the discovered 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 NamespaceDiscoveredAsset.
SELECT
id,
name,
assetTypeRefs,
attributes,
datasets,
defaultDatasetsConfiguration,
defaultDatasetsDestinations,
defaultEventsConfiguration,
defaultEventsDestinations,
defaultManagementGroupsConfiguration,
defaultStreamsConfiguration,
defaultStreamsDestinations,
description,
deviceRef,
discoveryId,
displayName,
documentationUri,
eventGroups,
extendedLocation,
externalAssetId,
hardwareRevision,
location,
managementGroups,
manufacturer,
manufacturerUri,
model,
productCode,
provisioningState,
serialNumber,
softwareRevision,
streams,
systemData,
tags,
type,
version
FROM azure.device_registry.namespace_discovered_assets
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND namespace_name = '{{ namespace_name }}' -- required
AND discovered_asset_name = '{{ discovered_asset_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
List NamespaceDiscoveredAsset resources by Namespace.
SELECT
id,
name,
assetTypeRefs,
attributes,
datasets,
defaultDatasetsConfiguration,
defaultDatasetsDestinations,
defaultEventsConfiguration,
defaultEventsDestinations,
defaultManagementGroupsConfiguration,
defaultStreamsConfiguration,
defaultStreamsDestinations,
description,
deviceRef,
discoveryId,
displayName,
documentationUri,
eventGroups,
extendedLocation,
externalAssetId,
hardwareRevision,
location,
managementGroups,
manufacturer,
manufacturerUri,
model,
productCode,
provisioningState,
serialNumber,
softwareRevision,
streams,
systemData,
tags,
type,
version
FROM azure.device_registry.namespace_discovered_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 NamespaceDiscoveredAsset.
INSERT INTO azure.device_registry.namespace_discovered_assets (
tags,
location,
properties,
extendedLocation,
resource_group_name,
namespace_name,
discovered_asset_name,
subscription_id
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ properties }}',
'{{ extendedLocation }}' /* required */,
'{{ resource_group_name }}',
'{{ namespace_name }}',
'{{ discovered_asset_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
extendedLocation,
location,
properties,
systemData,
tags,
type
;
# Description fields are for documentation purposes
- name: namespace_discovered_assets
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the namespace_discovered_assets resource.
- name: namespace_name
value: "{{ namespace_name }}"
description: Required parameter for the namespace_discovered_assets resource.
- name: discovered_asset_name
value: "{{ discovered_asset_name }}"
description: Required parameter for the namespace_discovered_assets resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the namespace_discovered_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:
deviceRef:
deviceName: "{{ deviceName }}"
endpointName: "{{ endpointName }}"
displayName: "{{ displayName }}"
assetTypeRefs:
- "{{ assetTypeRefs }}"
description: "{{ description }}"
discoveryId: "{{ discoveryId }}"
externalAssetId: "{{ externalAssetId }}"
version: {{ version }}
manufacturer: "{{ manufacturer }}"
manufacturerUri: "{{ manufacturerUri }}"
model: "{{ model }}"
productCode: "{{ productCode }}"
hardwareRevision: "{{ hardwareRevision }}"
softwareRevision: "{{ softwareRevision }}"
documentationUri: "{{ documentationUri }}"
serialNumber: "{{ serialNumber }}"
attributes: "{{ attributes }}"
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 }}"
lastUpdatedOn: "{{ lastUpdatedOn }}"
eventGroups:
- name: "{{ name }}"
dataSource: "{{ dataSource }}"
eventGroupConfiguration: "{{ eventGroupConfiguration }}"
defaultDestinations: "{{ defaultDestinations }}"
typeRef: "{{ typeRef }}"
events: "{{ events }}"
streams:
- name: "{{ name }}"
streamConfiguration: "{{ streamConfiguration }}"
typeRef: "{{ typeRef }}"
destinations: "{{ destinations }}"
lastUpdatedOn: "{{ lastUpdatedOn }}"
managementGroups:
- name: "{{ name }}"
managementGroupConfiguration: "{{ managementGroupConfiguration }}"
typeRef: "{{ typeRef }}"
dataSource: "{{ dataSource }}"
defaultTopic: "{{ defaultTopic }}"
defaultTimeoutInSeconds: {{ defaultTimeoutInSeconds }}
actions: "{{ actions }}"
lastUpdatedOn: "{{ lastUpdatedOn }}"
provisioningState: "{{ provisioningState }}"
- name: extendedLocation
description: |
The extended location. Required.
value:
type: "{{ type }}"
name: "{{ name }}"
UPDATE examples
- update
Update a NamespaceDiscoveredAsset.
UPDATE azure.device_registry.namespace_discovered_assets
SET
tags = '{{ tags }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND namespace_name = '{{ namespace_name }}' --required
AND discovered_asset_name = '{{ discovered_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 NamespaceDiscoveredAsset.
REPLACE azure.device_registry.namespace_discovered_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 discovered_asset_name = '{{ discovered_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 NamespaceDiscoveredAsset.
DELETE FROM azure.device_registry.namespace_discovered_assets
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND namespace_name = '{{ namespace_name }}' --required
AND discovered_asset_name = '{{ discovered_asset_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;