Skip to main content

billing_views

Creates, updates, deletes or gets a billing_view resource or lists billing_views in a region

Overview

Namebilling_views
TypeResource
DescriptionA billing view is a container of cost & usage metadata.
Idawscc.billing.billing_views

Fields

NameDatatypeDescription
arnstring
billing_view_typestring
data_filter_expressionobject
created_atnumberThe time when the billing view was created.
descriptionstring
namestring
owner_account_idstring
tagsarrayAn array of key-value pairs associated to the billing view being created.
source_viewsarrayAn array of strings that define the billing view's source.
updated_atnumberThe time when the billing view was last updated.
regionstringAWS region.

For more information, see AWS::Billing::BillingView.

Methods

NameResourceAccessible byRequired Params
create_resourcebilling_viewsINSERTName, SourceViews, region
delete_resourcebilling_viewsDELETEIdentifier, region
update_resourcebilling_viewsUPDATEIdentifier, PatchDocument, region
list_resourcesbilling_views_list_onlySELECTregion
get_resourcebilling_viewsSELECTIdentifier, 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
Identifier = '{{ arn }}';

INSERT example

Use the following StackQL query and manifest file to create a new billing_view resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.billing.billing_views (
Name,
SourceViews,
region
)
SELECT
'{{ name }}',
'{{ source_views }}',
'{{ region }}';

UPDATE example

Use the following StackQL query and manifest file to update a billing_view resource, using stack-deploy.

/*+ update */
UPDATE awscc.billing.billing_views
SET PatchDocument = string('{{ {
"DataFilterExpression": data_filter_expression,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}';

DELETE example

/*+ delete */
DELETE FROM awscc.billing.billing_views
WHERE
Identifier = '{{ arn }}' AND
region = 'us-east-1';

Permissions

To operate on the billing_views resource, the following permissions are required:

billing:CreateBillingView,
billing:TagResource,
billing:ListTagsForResource,
billing:GetBillingView,
billing:ListSourceViewsForBillingView