Skip to main content

network_devices

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

Overview

Namenetwork_devices
TypeResource
Idazure_extras.managed_network_fabric.network_devices

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.
administrativeStatestringAdministrative state of the resource. Known values are: "Enabled", "Disabled", "MAT", "RMA", "UnderMaintenance", and "EnabledDegraded". (Enabled, Disabled, MAT, RMA, UnderMaintenance, EnabledDegraded)
annotationstringSwitch configuration description.
certificateRotationStatusarrayCertificate rotation status for the device's certificates.
configurationStatestringConfiguration 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)
hostNamestringThe host name of the device.
identityobjectThe managed service identities assigned to this resource.
identitySelectorobjectThe selection of the managed identity to use with this storage account. The identity type must be either system assigned or user assigned.
lastOperationobjectDetails of the last operation performed on the resource.
locationstringThe geo-location where the resource lives. Required.
managementIpv4AddressstringManagement IPv4 Address.
managementIpv6AddressstringManagement IPv6 Address.
networkDeviceRolestringNetworkDeviceRole is the device role: Example: CE | ToR. Known values are: "CE", "ToR", "NPB", "TS", and "Management". (CE, ToR, NPB, TS, Management)
networkDeviceSkustringNetwork Device SKU name.
networkFabricIdstringAssociated Network Fabric Resource ID.
networkRackIdstringReference to network rack resource id.
provisioningStatestringProvisioning state of the resource. Known values are: "Accepted", "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". (Accepted, Succeeded, Updating, Deleting, Failed, Canceled)
rwDeviceConfigstringUser configured read-write configuration applied on the network devices.
secretRotationStatusarraySecret rotation status for the device's secrets.
serialNumberstringSerial number of the device. Format of serial Number - Make;Model;HardwareRevisionId;SerialNumber. Required.
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".
versionstringCurrent version of the device as defined in SKU.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, network_device_name, subscription_idGets the Network Device resource details.
list_by_resource_groupselectresource_group_name, subscription_idList all the Network Device resources in a given resource group.
list_by_subscriptionselectsubscription_idList all the Network Device resources in a given subscription.
createinsertresource_group_name, network_device_name, subscription_id, location, propertiesCreate a Network Device resource.
updateupdateresource_group_name, network_device_name, subscription_idUpdate certain properties of the Network Device resource.
deletedeleteresource_group_name, network_device_name, subscription_idDelete the Network Device resource.
rebootexecresource_group_name, network_device_name, subscription_idReboot the Network Device.
refresh_configurationexecresource_group_name, network_device_name, subscription_idRefreshes the configuration the Network Device.
update_administrative_stateexecresource_group_name, network_device_name, subscription_idUpdates the Administrative state of the Network Device.
upgradeexecresource_group_name, network_device_name, subscription_id, versionUpgrades the version of the Network Device.
run_ro_commandexecresource_group_name, network_device_name, subscription_idRun the RO Command on the Network Device.
run_rw_commandexecresource_group_name, network_device_name, subscription_idRun the RW Command on the Network Device.
resync_passwordsexecresource_group_name, network_device_name, subscription_idResync 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_certificatesexecresource_group_name, network_device_name, subscription_idResync 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.

NameDatatypeDescription
network_device_namestringName of the Network Device. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring

SELECT examples

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
;

INSERT examples

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
;

UPDATE examples

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 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 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 }}"
}'
;