Skip to main content

dimensions

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

Overview

Namedimensions
TypeResource
Idazure.cost_management.dimensions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringResource Id.
namestringResource name.
categorystringDimension category.
dataarrayDimension data.
descriptionstringDimension description.
eTagstringETag of the resource.
filterEnabledbooleanFilter enabled.
groupingEnabledbooleanGrouping enabled.
locationstringLocation of the resource.
nextLinkstringThe link (url) to the next page of results.
skustringSKU of the resource.
tagsobjectResource tags.
totalintegerTotal number of data for the dimension.
typestringResource type.
usageEndstring (date-time)Usage end.
usageStartstring (date-time)Usage start.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectscope$filter, $expand, $skiptoken, $topLists the dimensions by the defined scope.
by_external_cloud_provider_typeexecexternal_cloud_provider_type, external_cloud_provider_id$filter, $expand, $skiptoken, $topLists the dimensions by the external cloud provider type.

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
external_cloud_provider_idstringThis can be '{externalSubscriptionId}' for linked account or '{externalBillingAccountId}' for consolidated account used with dimension/query operations. Required.
external_cloud_provider_typestringThe external cloud provider type associated with dimension/query operations. This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account. Known values are: "externalSubscriptions" and "externalBillingAccounts". Required.
scopestringThe scope associated with dimension operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope, and 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners. Required.
$expandstringMay be used to expand the properties/data within a dimension category. By default, data is not included when listing dimensions. Default value is None.
$filterstringMay be used to filter dimensions by properties/category, properties/usageStart, properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', 'ge'. Default value is None.
$skiptokenstringSkiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. Default value is None.
$topintegerMay be used to limit the number of results to the most recent N dimension data. Default value is None.

SELECT examples

Lists the dimensions by the defined scope.

SELECT
id,
name,
category,
data,
description,
eTag,
filterEnabled,
groupingEnabled,
location,
nextLink,
sku,
tags,
total,
type,
usageEnd,
usageStart
FROM azure.cost_management.dimensions
WHERE scope = '{{ scope }}' -- required
AND $filter = '{{ $filter }}'
AND $expand = '{{ $expand }}'
AND $skiptoken = '{{ $skiptoken }}'
AND $top = '{{ $top }}'
;

Lifecycle Methods

Lists the dimensions by the external cloud provider type.

EXEC azure.cost_management.dimensions.by_external_cloud_provider_type 
@external_cloud_provider_type='{{ external_cloud_provider_type }}' --required,
@external_cloud_provider_id='{{ external_cloud_provider_id }}' --required,
@$filter='{{ $filter }}',
@$expand='{{ $expand }}',
@$skiptoken='{{ $skiptoken }}',
@$top='{{ $top }}'
;