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:

OK. The request has succeeded.

NameDatatypeDescription
propertiesobjectOptional grouping of enrollment accounts to segment costs into logical groupings and set budgets.
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 < > % & \ ? /

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectbillingAccountName, departmentNameGets a department by ID. The operation is supported only for billing accounts with agreement type Enterprise Agreement.
list_by_billing_accountselectbillingAccountNamefilter, 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
billingAccountNamestringThe ID that uniquely identifies a billing account.
departmentNamestringThe name of the department.
filterstringThe filter query option allows clients to filter a collection of resources that are addressed by a request URL.
orderBystringThe orderby query option allows clients to request resources in a particular order.
skipinteger (int64)The skip query option requests the number of items in the queried collection that are to be skipped and not included in the result.
topinteger (int64)The 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.

SELECT examples

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

SELECT
properties,
tags
FROM azure.billing.departments
WHERE billingAccountName = '{{ billingAccountName }}' -- required
AND departmentName = '{{ departmentName }}' -- required
;