Skip to main content

orders

Creates, updates, deletes, gets or lists an orders resource.

Overview​

Nameorders
TypeResource
Idazure.data_box_edge.orders

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.
contactInformationobjectThe contact details. Required.
currentStatusobjectRepresents a single status change.
deliveryTrackingInfoarrayTracking information for the package delivered to the customer whether it has an original or a replacement device.
kindstringIt specify the order api version.
orderHistoryarrayList of status changes in the order.
orderIdstringIt specify the order resource id.
returnTrackingInfoarrayTracking information for the package returned from the customer whether it has an original or a replacement device.
serialNumberstringSerial number of the device.
shipmentTypestringShipmentType of the order. Known values are: "NotApplicable", "ShippedToCustomer", and "SelfPickup". (NotApplicable, ShippedToCustomer, SelfPickup)
shippingAddressobjectThe shipping address.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectdevice_name, resource_group_name, subscription_idGets a specific order by name. Gets a specific order by name.
create_or_updateinsertdevice_name, resource_group_name, subscription_idCreates or updates an order. Creates or updates an order.
create_or_updatereplacedevice_name, resource_group_name, subscription_idCreates or updates an order. Creates or updates an order.
deletedeletedevice_name, resource_group_name, subscription_idDeletes the order related to the device. Deletes the order related to the device.
list_by_data_box_edge_deviceexecdevice_name, resource_group_name, subscription_idLists all the orders related to a Data Box Edge/Data Box Gateway device. Lists all the orders related to a Data Box Edge/Data Box Gateway device.
list_dc_access_codeexecdevice_name, resource_group_name, subscription_idGets the DCAccess Code. Gets the DCAccess Code.

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
device_namestringThe device name. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring

SELECT examples​

Gets a specific order by name. Gets a specific order by name.

SELECT
id,
name,
contactInformation,
currentStatus,
deliveryTrackingInfo,
kind,
orderHistory,
orderId,
returnTrackingInfo,
serialNumber,
shipmentType,
shippingAddress,
systemData,
type
FROM azure.data_box_edge.orders
WHERE device_name = '{{ device_name }}' -- required
AND resource_group_name = '{{ resource_group_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples​

Creates or updates an order. Creates or updates an order.

INSERT INTO azure.data_box_edge.orders (
properties,
device_name,
resource_group_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ device_name }}',
'{{ resource_group_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
kind,
properties,
systemData,
type
;

REPLACE examples​

Creates or updates an order. Creates or updates an order.

REPLACE azure.data_box_edge.orders
SET
properties = '{{ properties }}'
WHERE
device_name = '{{ device_name }}' --required
AND resource_group_name = '{{ resource_group_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
kind,
properties,
systemData,
type;

DELETE examples​

Deletes the order related to the device. Deletes the order related to the device.

DELETE FROM azure.data_box_edge.orders
WHERE device_name = '{{ device_name }}' --required
AND resource_group_name = '{{ resource_group_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods​

Lists all the orders related to a Data Box Edge/Data Box Gateway device. Lists all the orders related to a Data Box Edge/Data Box Gateway device.

EXEC azure.data_box_edge.orders.list_by_data_box_edge_device
@device_name='{{ device_name }}' --required,
@resource_group_name='{{ resource_group_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;