billing_views
Creates, updates, deletes or gets a billing_view resource or lists billing_views in a region
Overview
| Name | billing_views |
| Type | Resource |
| Description | A billing view is a container of cost & usage metadata. |
| Id | awscc.billing.billing_views |
Fields
| Name | Datatype | Description |
|---|---|---|
arn | string | |
billing_view_type | string | |
data_filter_expression | object | |
created_at | number | The time when the billing view was created. |
description | string | |
name | string | |
owner_account_id | string | |
tags | array | An array of key-value pairs associated to the billing view being created. |
source_views | array | An array of strings that define the billing view's source. |
updated_at | number | The time when the billing view was last updated. |
region | string | AWS region. |
For more information, see AWS::Billing::BillingView.
Methods
| Name | Accessible by | Required Params |
|---|---|---|
create_resource | INSERT | Name, SourceViews, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT examples
Gets all properties from an individual billing_view.
SELECT
region,
arn,
billing_view_type,
data_filter_expression,
created_at,
description,
name,
owner_account_id,
tags,
source_views,
updated_at
FROM awscc.billing.billing_views
WHERE region = 'us-east-1' AND data__Identifier = '<Arn>';
INSERT example
Use the following StackQL query and manifest file to create a new billing_view resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.billing.billing_views (
Name,
SourceViews,
region
)
SELECT
'{{ Name }}',
'{{ SourceViews }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.billing.billing_views (
DataFilterExpression,
Description,
Name,
Tags,
SourceViews,
region
)
SELECT
'{{ DataFilterExpression }}',
'{{ Description }}',
'{{ Name }}',
'{{ Tags }}',
'{{ SourceViews }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: billing_view
props:
- name: DataFilterExpression
value:
Dimensions:
Key: '{{ Key }}'
Values:
- '{{ Values[0] }}'
Tags:
Key: '{{ Key }}'
Values:
- '{{ Values[0] }}'
- name: Description
value: '{{ Description }}'
- name: Name
value: '{{ Name }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
- name: SourceViews
value:
- '{{ SourceViews[0] }}'
DELETE example
/*+ delete */
DELETE FROM awscc.billing.billing_views
WHERE data__Identifier = '<Arn>'
AND region = 'us-east-1';
Permissions
To operate on the billing_views resource, the following permissions are required:
Create
billing:CreateBillingView,
billing:TagResource,
billing:ListTagsForResource,
billing:GetBillingView,
billing:ListSourceViewsForBillingView
Read
billing:GetBillingView,
billing:ListTagsForResource,
billing:ListSourceViewsForBillingView
Update
billing:UpdateBillingView,
billing:GetBillingView,
billing:ListTagsForResource,
billing:TagResource,
billing:UntagResource,
billing:ListSourceViewsForBillingView
Delete
billing:GetBillingView,
billing:DeleteBillingView
List
billing:ListBillingViews