Skip to main content

departments

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

Overview

Namedepartments
TypeResource
Idazure.billing.departments

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.
costCenterstringThe cost center associated with the department.
displayNamestringThe name of the department.
statusstringThe status of the department.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
tagsobjectDictionary of metadata associated with the resource. It may not be populated for all resource types. Maximum key/value length supported of 256 characters. Keys/value should not empty value nor null. Keys can not contain < > % & \ ? /.
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
getselectbilling_account_name, department_nameGets a department by ID. The operation is supported only for billing accounts with agreement type Enterprise Agreement.
list_by_billing_accountselectbilling_account_namefilter, orderBy, top, skip, searchLists the departments that a user has access to. The operation is supported only for billing accounts with agreement type Enterprise Agreement.

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
billing_account_namestringThe ID that uniquely identifies a billing account. Required.
department_namestringThe name of the department. Required.
filterstringThe filter query option allows clients to filter a collection of resources that are addressed by a request URL. Default value is None.
orderBystringThe orderby query option allows clients to request resources in a particular order. Default value is None.
skipintegerThe skip query option requests the number of items in the queried collection that are to be skipped and not included in the result. Default value is None.
topintegerThe top query option requests the number of items in the queried collection to be included in the result. The maximum supported value for top is 50. Default value is None.

SELECT examples

Gets a department by ID. The operation is supported only for billing accounts with agreement type Enterprise Agreement.

SELECT
id,
name,
costCenter,
displayName,
status,
systemData,
tags,
type
FROM azure.billing.departments
WHERE billing_account_name = '{{ billing_account_name }}' -- required
AND department_name = '{{ department_name }}' -- required
;