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:

OK. The request has succeeded.

NameDatatypeDescription
idstringResource Id.
namestringResource name.
eTagstringETag of the resource.
locationstringLocation of the resource.
propertiesobjectDimension properties. (title: Dimension properties)
skustringSKU of the resource.
tagsobjectResource tags.
typestringResource type.

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_typeexecexternalCloudProviderType, externalCloudProviderId$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
externalCloudProviderIdstringThis can be '{externalSubscriptionId}' for linked account or '{externalBillingAccountId}' for consolidated account used with dimension/query operations.
externalCloudProviderTypestringThe external cloud provider type associated with dimension/query operations. This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account.
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.
$expandstringMay be used to expand the properties/data within a dimension category. By default, data is not included when listing dimensions.
$filterstringMay be used to filter dimensions by properties/category, properties/usageStart, properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', 'ge'.
$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.
$topinteger (int32)May be used to limit the number of results to the most recent N dimension data.

SELECT examples

Lists the dimensions by the defined scope.

SELECT
id,
name,
eTag,
location,
properties,
sku,
tags,
type
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 
@externalCloudProviderType='{{ externalCloudProviderType }}' --required,
@externalCloudProviderId='{{ externalCloudProviderId }}' --required,
@$filter='{{ $filter }}',
@$expand='{{ $expand }}',
@$skiptoken='{{ $skiptoken }}',
@$top='{{ $top }}'
;