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 | aws.iot.billing_groups |
Fields
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. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | 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 billing_groups
in a region.
SELECT
region,
id,
arn,
billing_group_name,
tags,
billing_group_properties
FROM aws.iot.billing_groups
WHERE region = 'us-east-1';
Gets all properties from an individual billing_group
.
SELECT
region,
id,
arn,
billing_group_name,
tags,
billing_group_properties
FROM aws.iot.billing_groups
WHERE region = 'us-east-1' AND data__Identifier = '<BillingGroupName>';
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 aws.iot.billing_groups (
BillingGroupName,
Tags,
BillingGroupProperties,
region
)
SELECT
'{{ BillingGroupName }}',
'{{ Tags }}',
'{{ BillingGroupProperties }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.iot.billing_groups (
BillingGroupName,
Tags,
BillingGroupProperties,
region
)
SELECT
'{{ BillingGroupName }}',
'{{ Tags }}',
'{{ BillingGroupProperties }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: billing_group
props:
- name: BillingGroupName
value: '{{ BillingGroupName }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
- name: BillingGroupProperties
value:
BillingGroupDescription: '{{ BillingGroupDescription }}'
DELETE
example
/*+ delete */
DELETE FROM aws.iot.billing_groups
WHERE data__Identifier = '<BillingGroupName>'
AND region = 'us-east-1';
Permissions
To operate on the billing_groups
resource, the following permissions are required:
Create
iot:DescribeBillingGroup,
iot:ListTagsForResource,
iot:CreateBillingGroup,
iot:TagResource
Delete
iot:DescribeBillingGroup,
iot:DeleteBillingGroup
List
iot:ListBillingGroups,
iot:ListTagsForResource
Read
iot:DescribeBillingGroup,
iot:ListTagsForResource
Update
iot:DescribeBillingGroup,
iot:UpdateBillingGroup,
iot:ListTagsForResource,
iot:TagResource,
iot:UntagResource