views
Creates, updates, deletes, gets or lists a views
resource.
Overview
Name | views |
Type | Resource |
Id | azure.cost_management.views |
Fields
The following fields are returned by SELECT
queries:
- get_by_scope
- list_by_scope
- get
- list
OK. The request has succeeded.
Name | Datatype | Description |
---|---|---|
id | string | Resource Id. |
name | string | Resource name. |
eTag | string | eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not. |
properties | object | The properties of the view. (title: View properties) |
type | string | Resource type. |
OK. The request has succeeded.
Name | Datatype | Description |
---|---|---|
id | string | Resource Id. |
name | string | Resource name. |
eTag | string | eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not. |
properties | object | The properties of the view. (title: View properties) |
type | string | Resource type. |
OK. The request has succeeded.
Name | Datatype | Description |
---|---|---|
id | string | Resource Id. |
name | string | Resource name. |
eTag | string | eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not. |
properties | object | The properties of the view. (title: View properties) |
type | string | Resource type. |
OK. The request has succeeded.
Name | Datatype | Description |
---|---|---|
id | string | Resource Id. |
name | string | Resource name. |
eTag | string | eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not. |
properties | object | The properties of the view. (title: View properties) |
type | string | Resource type. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get_by_scope | select | scope , viewName | Gets the view for the defined scope by view name. | |
list_by_scope | select | scope | Lists all views at the given scope. | |
get | select | viewName | Gets the view by view name. | |
list | select | Lists all views by tenant and object. | ||
create_or_update | insert | viewName | The operation to create or update a view. Update operation requires latest eTag to be set in the request. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag. | |
delete_by_scope | delete | scope , viewName | The operation to delete a view. | |
delete | delete | viewName | The operation to delete a view. |
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 |
---|---|---|
scope | string | The scope associated with view 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.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for BillingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for External Billing Account scope and 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External Subscription scope. |
viewName | string | View name |
SELECT
examples
- get_by_scope
- list_by_scope
- get
- list
Gets the view for the defined scope by view name.
SELECT
id,
name,
eTag,
properties,
type
FROM azure.cost_management.views
WHERE scope = '{{ scope }}' -- required
AND viewName = '{{ viewName }}' -- required
;
Lists all views at the given scope.
SELECT
id,
name,
eTag,
properties,
type
FROM azure.cost_management.views
WHERE scope = '{{ scope }}' -- required
;
Gets the view by view name.
SELECT
id,
name,
eTag,
properties,
type
FROM azure.cost_management.views
WHERE viewName = '{{ viewName }}' -- required
;
Lists all views by tenant and object.
SELECT
id,
name,
eTag,
properties,
type
FROM azure.cost_management.views
;
INSERT
examples
- create_or_update
- Manifest
The operation to create or update a view. Update operation requires latest eTag to be set in the request. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag.
INSERT INTO azure.cost_management.views (
data__eTag,
data__properties,
viewName
)
SELECT
'{{ eTag }}',
'{{ properties }}',
'{{ viewName }}'
RETURNING
id,
name,
eTag,
properties,
type
;
# Description fields are for documentation purposes
- name: views
props:
- name: viewName
value: string
description: Required parameter for the views resource.
- name: eTag
value: string
description: |
eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.
- name: properties
value: object
description: |
The properties of the view.
DELETE
examples
- delete_by_scope
- delete
The operation to delete a view.
DELETE FROM azure.cost_management.views
WHERE scope = '{{ scope }}' --required
AND viewName = '{{ viewName }}' --required
;
The operation to delete a view.
DELETE FROM azure.cost_management.views
WHERE viewName = '{{ viewName }}' --required
;