network_devices
Creates, updates, deletes, gets or lists a network_devices resource.
Overview
| Name | network_devices |
| Type | Resource |
| Id | azure_extras.managed_network_fabric.network_devices |
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. |
administrativeState | string | Administrative state of the resource. Known values are: "Enabled", "Disabled", "MAT", "RMA", "UnderMaintenance", and "EnabledDegraded". (Enabled, Disabled, MAT, RMA, UnderMaintenance, EnabledDegraded) |
annotation | string | Switch configuration description. |
certificateRotationStatus | array | Certificate rotation status for the device's certificates. |
configurationState | string | Configuration state of the resource. Known values are: "Succeeded", "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", "PendingCommit", and "PendingAdministrativeUpdate". (Succeeded, Failed, Rejected, Accepted, Provisioned, ErrorProvisioning, Deprovisioning, Deprovisioned, ErrorDeprovisioning, DeferredControl, Provisioning, PendingCommit, PendingAdministrativeUpdate) |
hostName | string | The host name of the device. |
identity | object | The managed service identities assigned to this resource. |
identitySelector | object | The selection of the managed identity to use with this storage account. The identity type must be either system assigned or user assigned. |
lastOperation | object | Details of the last operation performed on the resource. |
location | string | The geo-location where the resource lives. Required. |
managementIpv4Address | string | Management IPv4 Address. |
managementIpv6Address | string | Management IPv6 Address. |
networkDeviceRole | string | NetworkDeviceRole is the device role: Example: CE | ToR. Known values are: "CE", "ToR", "NPB", "TS", and "Management". (CE, ToR, NPB, TS, Management) |
networkDeviceSku | string | Network Device SKU name. |
networkFabricId | string | Associated Network Fabric Resource ID. |
networkRackId | string | Reference to network rack resource id. |
provisioningState | string | Provisioning state of the resource. Known values are: "Accepted", "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". (Accepted, Succeeded, Updating, Deleting, Failed, Canceled) |
rwDeviceConfig | string | User configured read-write configuration applied on the network devices. |
secretRotationStatus | array | Secret rotation status for the device's secrets. |
serialNumber | string | Serial number of the device. Format of serial Number - Make;Model;HardwareRevisionId;SerialNumber. Required. |
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 | string | Current version of the device as defined in SKU. |
| 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. |
administrativeState | string | Administrative state of the resource. Known values are: "Enabled", "Disabled", "MAT", "RMA", "UnderMaintenance", and "EnabledDegraded". (Enabled, Disabled, MAT, RMA, UnderMaintenance, EnabledDegraded) |
annotation | string | Switch configuration description. |
certificateRotationStatus | array | Certificate rotation status for the device's certificates. |
configurationState | string | Configuration state of the resource. Known values are: "Succeeded", "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", "PendingCommit", and "PendingAdministrativeUpdate". (Succeeded, Failed, Rejected, Accepted, Provisioned, ErrorProvisioning, Deprovisioning, Deprovisioned, ErrorDeprovisioning, DeferredControl, Provisioning, PendingCommit, PendingAdministrativeUpdate) |
hostName | string | The host name of the device. |
identity | object | The managed service identities assigned to this resource. |
identitySelector | object | The selection of the managed identity to use with this storage account. The identity type must be either system assigned or user assigned. |
lastOperation | object | Details of the last operation performed on the resource. |
location | string | The geo-location where the resource lives. Required. |
managementIpv4Address | string | Management IPv4 Address. |
managementIpv6Address | string | Management IPv6 Address. |
networkDeviceRole | string | NetworkDeviceRole is the device role: Example: CE | ToR. Known values are: "CE", "ToR", "NPB", "TS", and "Management". (CE, ToR, NPB, TS, Management) |
networkDeviceSku | string | Network Device SKU name. |
networkFabricId | string | Associated Network Fabric Resource ID. |
networkRackId | string | Reference to network rack resource id. |
provisioningState | string | Provisioning state of the resource. Known values are: "Accepted", "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". (Accepted, Succeeded, Updating, Deleting, Failed, Canceled) |
rwDeviceConfig | string | User configured read-write configuration applied on the network devices. |
secretRotationStatus | array | Secret rotation status for the device's secrets. |
serialNumber | string | Serial number of the device. Format of serial Number - Make;Model;HardwareRevisionId;SerialNumber. Required. |
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 | string | Current version of the device as defined in SKU. |
| 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. |
administrativeState | string | Administrative state of the resource. Known values are: "Enabled", "Disabled", "MAT", "RMA", "UnderMaintenance", and "EnabledDegraded". (Enabled, Disabled, MAT, RMA, UnderMaintenance, EnabledDegraded) |
annotation | string | Switch configuration description. |
certificateRotationStatus | array | Certificate rotation status for the device's certificates. |
configurationState | string | Configuration state of the resource. Known values are: "Succeeded", "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", "PendingCommit", and "PendingAdministrativeUpdate". (Succeeded, Failed, Rejected, Accepted, Provisioned, ErrorProvisioning, Deprovisioning, Deprovisioned, ErrorDeprovisioning, DeferredControl, Provisioning, PendingCommit, PendingAdministrativeUpdate) |
hostName | string | The host name of the device. |
identity | object | The managed service identities assigned to this resource. |
identitySelector | object | The selection of the managed identity to use with this storage account. The identity type must be either system assigned or user assigned. |
lastOperation | object | Details of the last operation performed on the resource. |
location | string | The geo-location where the resource lives. Required. |
managementIpv4Address | string | Management IPv4 Address. |
managementIpv6Address | string | Management IPv6 Address. |
networkDeviceRole | string | NetworkDeviceRole is the device role: Example: CE | ToR. Known values are: "CE", "ToR", "NPB", "TS", and "Management". (CE, ToR, NPB, TS, Management) |
networkDeviceSku | string | Network Device SKU name. |
networkFabricId | string | Associated Network Fabric Resource ID. |
networkRackId | string | Reference to network rack resource id. |
provisioningState | string | Provisioning state of the resource. Known values are: "Accepted", "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". (Accepted, Succeeded, Updating, Deleting, Failed, Canceled) |
rwDeviceConfig | string | User configured read-write configuration applied on the network devices. |
secretRotationStatus | array | Secret rotation status for the device's secrets. |
serialNumber | string | Serial number of the device. Format of serial Number - Make;Model;HardwareRevisionId;SerialNumber. Required. |
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 | string | Current version of the device as defined in SKU. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, network_device_name, subscription_id | Gets the Network Device resource details. | |
list_by_resource_group | select | resource_group_name, subscription_id | List all the Network Device resources in a given resource group. | |
list_by_subscription | select | subscription_id | List all the Network Device resources in a given subscription. | |
create | insert | resource_group_name, network_device_name, subscription_id, location, properties | Create a Network Device resource. | |
update | update | resource_group_name, network_device_name, subscription_id | Update certain properties of the Network Device resource. | |
delete | delete | resource_group_name, network_device_name, subscription_id | Delete the Network Device resource. | |
reboot | exec | resource_group_name, network_device_name, subscription_id | Reboot the Network Device. | |
refresh_configuration | exec | resource_group_name, network_device_name, subscription_id | Refreshes the configuration the Network Device. | |
update_administrative_state | exec | resource_group_name, network_device_name, subscription_id | Updates the Administrative state of the Network Device. | |
upgrade | exec | resource_group_name, network_device_name, subscription_id, version | Upgrades the version of the Network Device. | |
run_ro_command | exec | resource_group_name, network_device_name, subscription_id | Run the RO Command on the Network Device. | |
run_rw_command | exec | resource_group_name, network_device_name, subscription_id | Run the RW Command on the Network Device. | |
resync_passwords | exec | resource_group_name, network_device_name, subscription_id | Resync the latest passwords to the Network Device. Updates the Network Device to use the latest passwords. Does not generate new passwords. Allows network devices missed during a previous password rotation to be brought back into sync. | |
resync_certificates | exec | resource_group_name, network_device_name, subscription_id | Resync the latest certificates to the Network Device. Updates the Network Device to use the latest certificates. Does not generate new certificates. Allows network devices missed during a previous certificate rotation to be brought back into sync. |
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 |
|---|---|---|
network_device_name | string | Name of the Network Device. 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
Gets the Network Device resource details.
SELECT
id,
name,
administrativeState,
annotation,
certificateRotationStatus,
configurationState,
hostName,
identity,
identitySelector,
lastOperation,
location,
managementIpv4Address,
managementIpv6Address,
networkDeviceRole,
networkDeviceSku,
networkFabricId,
networkRackId,
provisioningState,
rwDeviceConfig,
secretRotationStatus,
serialNumber,
systemData,
tags,
type,
version
FROM azure_extras.managed_network_fabric.network_devices
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND network_device_name = '{{ network_device_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
List all the Network Device resources in a given resource group.
SELECT
id,
name,
administrativeState,
annotation,
certificateRotationStatus,
configurationState,
hostName,
identity,
identitySelector,
lastOperation,
location,
managementIpv4Address,
managementIpv6Address,
networkDeviceRole,
networkDeviceSku,
networkFabricId,
networkRackId,
provisioningState,
rwDeviceConfig,
secretRotationStatus,
serialNumber,
systemData,
tags,
type,
version
FROM azure_extras.managed_network_fabric.network_devices
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
List all the Network Device resources in a given subscription.
SELECT
id,
name,
administrativeState,
annotation,
certificateRotationStatus,
configurationState,
hostName,
identity,
identitySelector,
lastOperation,
location,
managementIpv4Address,
managementIpv6Address,
networkDeviceRole,
networkDeviceSku,
networkFabricId,
networkRackId,
provisioningState,
rwDeviceConfig,
secretRotationStatus,
serialNumber,
systemData,
tags,
type,
version
FROM azure_extras.managed_network_fabric.network_devices
WHERE subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create
- Manifest
Create a Network Device resource.
INSERT INTO azure_extras.managed_network_fabric.network_devices (
tags,
location,
properties,
identity,
resource_group_name,
network_device_name,
subscription_id
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ properties }}' /* required */,
'{{ identity }}',
'{{ resource_group_name }}',
'{{ network_device_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
identity,
location,
properties,
systemData,
tags,
type
;
# Description fields are for documentation purposes
- name: network_devices
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the network_devices resource.
- name: network_device_name
value: "{{ network_device_name }}"
description: Required parameter for the network_devices resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the network_devices 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 NetworkDevice properties. Required.
value:
annotation: "{{ annotation }}"
hostName: "{{ hostName }}"
serialNumber: "{{ serialNumber }}"
identitySelector:
identityType: "{{ identityType }}"
userAssignedIdentityResourceId: "{{ userAssignedIdentityResourceId }}"
version: "{{ version }}"
networkDeviceSku: "{{ networkDeviceSku }}"
networkDeviceRole: "{{ networkDeviceRole }}"
networkRackId: "{{ networkRackId }}"
managementIpv4Address: "{{ managementIpv4Address }}"
managementIpv6Address: "{{ managementIpv6Address }}"
rwDeviceConfig: "{{ rwDeviceConfig }}"
lastOperation:
details: "{{ details }}"
configurationState: "{{ configurationState }}"
provisioningState: "{{ provisioningState }}"
administrativeState: "{{ administrativeState }}"
secretRotationStatus:
- lastRotationTime: "{{ lastRotationTime }}"
synchronizationStatus: "{{ synchronizationStatus }}"
secretArchiveReference:
keyVaultUri: "{{ keyVaultUri }}"
keyVaultId: "{{ keyVaultId }}"
secretName: "{{ secretName }}"
secretVersion: "{{ secretVersion }}"
secretType: "{{ secretType }}"
certificateRotationStatus:
- expireTime: "{{ expireTime }}"
lastRotationTime: "{{ lastRotationTime }}"
synchronizationStatus: "{{ synchronizationStatus }}"
certificateArchiveReference:
keyVaultUri: "{{ keyVaultUri }}"
keyVaultId: "{{ keyVaultId }}"
certificateName: "{{ certificateName }}"
certificateVersion: "{{ certificateVersion }}"
certificateType: "{{ certificateType }}"
networkFabricId: "{{ networkFabricId }}"
- name: identity
description: |
The managed service identities assigned to this resource.
value:
principalId: "{{ principalId }}"
tenantId: "{{ tenantId }}"
type: "{{ type }}"
userAssignedIdentities: "{{ userAssignedIdentities }}"
UPDATE examples
- update
Update certain properties of the Network Device resource.
UPDATE azure_extras.managed_network_fabric.network_devices
SET
tags = '{{ tags }}',
properties = '{{ properties }}',
identity = '{{ identity }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND network_device_name = '{{ network_device_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
identity,
location,
properties,
systemData,
tags,
type;
DELETE examples
- delete
Delete the Network Device resource.
DELETE FROM azure_extras.managed_network_fabric.network_devices
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND network_device_name = '{{ network_device_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;
Lifecycle Methods
- reboot
- refresh_configuration
- update_administrative_state
- upgrade
- run_ro_command
- run_rw_command
- resync_passwords
- resync_certificates
Reboot the Network Device.
EXEC azure_extras.managed_network_fabric.network_devices.reboot
@resource_group_name='{{ resource_group_name }}' --required,
@network_device_name='{{ network_device_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"rebootType": "{{ rebootType }}"
}'
;
Refreshes the configuration the Network Device.
EXEC azure_extras.managed_network_fabric.network_devices.refresh_configuration
@resource_group_name='{{ resource_group_name }}' --required,
@network_device_name='{{ network_device_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Updates the Administrative state of the Network Device.
EXEC azure_extras.managed_network_fabric.network_devices.update_administrative_state
@resource_group_name='{{ resource_group_name }}' --required,
@network_device_name='{{ network_device_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"resourceIds": "{{ resourceIds }}",
"state": "{{ state }}"
}'
;
Upgrades the version of the Network Device.
EXEC azure_extras.managed_network_fabric.network_devices.upgrade
@resource_group_name='{{ resource_group_name }}' --required,
@network_device_name='{{ network_device_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"version": "{{ version }}",
"rwDeviceConfigUrl": "{{ rwDeviceConfigUrl }}"
}'
;
Run the RO Command on the Network Device.
EXEC azure_extras.managed_network_fabric.network_devices.run_ro_command
@resource_group_name='{{ resource_group_name }}' --required,
@network_device_name='{{ network_device_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"command": "{{ command }}"
}'
;
Run the RW Command on the Network Device.
EXEC azure_extras.managed_network_fabric.network_devices.run_rw_command
@resource_group_name='{{ resource_group_name }}' --required,
@network_device_name='{{ network_device_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"command": "{{ command }}",
"commandUrl": "{{ commandUrl }}"
}'
;
Resync the latest passwords to the Network Device. Updates the Network Device to use the latest passwords. Does not generate new passwords. Allows network devices missed during a previous password rotation to be brought back into sync.
EXEC azure_extras.managed_network_fabric.network_devices.resync_passwords
@resource_group_name='{{ resource_group_name }}' --required,
@network_device_name='{{ network_device_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Resync the latest certificates to the Network Device. Updates the Network Device to use the latest certificates. Does not generate new certificates. Allows network devices missed during a previous certificate rotation to be brought back into sync.
EXEC azure_extras.managed_network_fabric.network_devices.resync_certificates
@resource_group_name='{{ resource_group_name }}' --required,
@network_device_name='{{ network_device_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;