dimensions
Creates, updates, deletes, gets or lists a dimensions resource.
Overview
| Name | dimensions |
| Type | Resource |
| Id | azure.cost_management.dimensions |
Fields
The following fields are returned by SELECT queries:
- list
| Name | Datatype | Description |
|---|---|---|
id | string | Resource Id. |
name | string | Resource name. |
category | string | Dimension category. |
data | array | Dimension data. |
description | string | Dimension description. |
eTag | string | ETag of the resource. |
filterEnabled | boolean | Filter enabled. |
groupingEnabled | boolean | Grouping enabled. |
location | string | Location of the resource. |
nextLink | string | The link (url) to the next page of results. |
sku | string | SKU of the resource. |
tags | object | Resource tags. |
total | integer | Total number of data for the dimension. |
type | string | Resource type. |
usageEnd | string (date-time) | Usage end. |
usageStart | string (date-time) | Usage start. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | scope | $filter, $expand, $skiptoken, $top | Lists the dimensions by the defined scope. |
by_external_cloud_provider_type | exec | external_cloud_provider_type, external_cloud_provider_id | $filter, $expand, $skiptoken, $top | Lists 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.
| Name | Datatype | Description |
|---|---|---|
external_cloud_provider_id | string | This can be '{externalSubscriptionId}' for linked account or '{externalBillingAccountId}' for consolidated account used with dimension/query operations. Required. |
external_cloud_provider_type | string | The 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. |
scope | string | The 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. |
$expand | string | May be used to expand the properties/data within a dimension category. By default, data is not included when listing dimensions. Default value is None. |
$filter | string | May be used to filter dimensions by properties/category, properties/usageStart, properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', 'ge'. Default value is None. |
$skiptoken | string | Skiptoken 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. |
$top | integer | May be used to limit the number of results to the most recent N dimension data. Default value is None. |
SELECT examples
- list
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
- by_external_cloud_provider_type
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 }}'
;