billing_groups
Creates, updates, deletes or gets a billing_group resource or lists billing_groups in a region
Overview
| Name | billing_groups |
| Type | Resource |
| Description | Resource Type definition for AWS::IoT::BillingGroup |
| Id | awscc.iot.billing_groups |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
id | string | |
arn | string | |
billing_group_name | string | |
tags | array | An array of key-value pairs to apply to this resource. |
billing_group_properties | object | |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
billing_group_name | string | |
region | string | AWS region. |
For more information, see AWS::IoT::BillingGroup.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | billing_groups | INSERT | region |
delete_resource | billing_groups | DELETE | Identifier, region |
update_resource | billing_groups | UPDATE | Identifier, PatchDocument, region |
list_resources | billing_groups_list_only | SELECT | region |
get_resource | billing_groups | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual billing_group.
SELECT
region,
id,
arn,
billing_group_name,
tags,
billing_group_properties
FROM awscc.iot.billing_groups
WHERE
region = 'us-east-1' AND
Identifier = '{{ billing_group_name }}';
Lists all billing_groups in a region.
SELECT
region,
billing_group_name
FROM awscc.iot.billing_groups_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new billing_group resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.iot.billing_groups (
BillingGroupName,
Tags,
BillingGroupProperties,
region
)
SELECT
'{{ billing_group_name }}',
'{{ tags }}',
'{{ billing_group_properties }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.iot.billing_groups (
BillingGroupName,
Tags,
BillingGroupProperties,
region
)
SELECT
'{{ billing_group_name }}',
'{{ tags }}',
'{{ billing_group_properties }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: billing_group
props:
- name: billing_group_name
value: '{{ billing_group_name }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
- name: billing_group_properties
value:
billing_group_description: '{{ billing_group_description }}'
UPDATE example
Use the following StackQL query and manifest file to update a billing_group resource, using stack-deploy.
/*+ update */
UPDATE awscc.iot.billing_groups
SET PatchDocument = string('{{ {
"Tags": tags,
"BillingGroupProperties": billing_group_properties
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ billing_group_name }}';
DELETE example
/*+ delete */
DELETE FROM awscc.iot.billing_groups
WHERE
Identifier = '{{ billing_group_name }}' AND
region = 'us-east-1';
Permissions
To operate on the billing_groups resource, the following permissions are required:
- Create
- Delete
- List
- Read
- Update
iot:DescribeBillingGroup,
iot:ListTagsForResource,
iot:CreateBillingGroup,
iot:TagResource
iot:DescribeBillingGroup,
iot:DeleteBillingGroup
iot:ListBillingGroups,
iot:ListTagsForResource
iot:DescribeBillingGroup,
iot:ListTagsForResource
iot:DescribeBillingGroup,
iot:UpdateBillingGroup,
iot:ListTagsForResource,
iot:TagResource,
iot:UntagResource