transit_gateway_metering_policies
Creates, updates, deletes, gets or lists a transit_gateway_metering_policies resource.
Overview
| Name | transit_gateway_metering_policies |
| Type | Resource |
| Id | aws.ec2.transit_gateway_metering_policies |
Fields
The following fields are returned by SELECT queries:
- describe_transit_gateway_metering_policies
| Name | Datatype | Description |
|---|---|---|
middlebox_attachment_ids | string | The IDs of the middlebox attachments associated with the metering policy. |
state | string | The state of the transit gateway metering policy. |
tags | string | The tags assigned to the transit gateway metering policy. |
transit_gateway_id | string | The ID of the transit gateway associated with the metering policy. |
transit_gateway_metering_policy_id | string | The ID of the transit gateway metering policy. |
update_effective_at | string | The date and time when the metering policy update becomes effective. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_transit_gateway_metering_policies | select | region | TransitGatewayMeteringPolicyIds, Filter, MaxResults, NextToken, DryRun | Describes one or more transit gateway metering policies. |
create_transit_gateway_metering_policy | insert | TransitGatewayId, region | MiddleboxAttachmentId, TagSpecifications, DryRun | Creates a metering policy for a transit gateway to track and measure network traffic. |
modify_transit_gateway_metering_policy | update | TransitGatewayMeteringPolicyId, region | AddMiddleboxAttachmentId, RemoveMiddleboxAttachmentId, DryRun | Modifies a transit gateway metering policy. |
delete_transit_gateway_metering_policy | delete | TransitGatewayMeteringPolicyId, region | DryRun | Deletes a transit gateway metering policy. |
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 |
|---|---|---|
TransitGatewayId | string | The ID of the transit gateway for which to create the metering policy. |
TransitGatewayMeteringPolicyId | string | The ID of the transit gateway metering policy to delete. |
region | string | AWS region (default: us-east-1) |
AddMiddleboxAttachmentId | array | The IDs of middlebox attachments to add to the metering policy. |
DryRun | boolean | Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation. |
Filter | array | One or more filters to apply when describing transit gateway metering policies. |
MaxResults | integer | The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value. |
MiddleboxAttachmentId | array | The IDs of the middlebox attachments to include in the metering policy. |
NextToken | string | The token for the next page of results. |
RemoveMiddleboxAttachmentId | array | The IDs of middlebox attachments to remove from the metering policy. |
TagSpecifications | array | The tags to assign to the metering policy. |
TransitGatewayMeteringPolicyIds | array | The IDs of the transit gateway metering policies to describe. |
SELECT examples
- describe_transit_gateway_metering_policies
Describes one or more transit gateway metering policies.
SELECT
middlebox_attachment_ids,
state,
tags,
transit_gateway_id,
transit_gateway_metering_policy_id,
update_effective_at
FROM aws.ec2.transit_gateway_metering_policies
WHERE region = '{{ region }}' -- required
AND TransitGatewayMeteringPolicyIds = '{{ TransitGatewayMeteringPolicyIds }}'
AND Filter = '{{ Filter }}'
AND MaxResults = '{{ MaxResults }}'
AND NextToken = '{{ NextToken }}'
AND DryRun = '{{ DryRun }}'
;
INSERT examples
- create_transit_gateway_metering_policy
- Manifest
Creates a metering policy for a transit gateway to track and measure network traffic.
INSERT INTO aws.ec2.transit_gateway_metering_policies (
TransitGatewayId,
region,
MiddleboxAttachmentId,
TagSpecifications,
DryRun
)
SELECT
'{{ TransitGatewayId }}',
'{{ region }}',
'{{ MiddleboxAttachmentId }}',
'{{ TagSpecifications }}',
'{{ DryRun }}'
RETURNING
middlebox_attachment_ids,
state,
tags,
transit_gateway_id,
transit_gateway_metering_policy_id,
update_effective_at
;
# Description fields are for documentation purposes
- name: transit_gateway_metering_policies
props:
- name: TransitGatewayId
value: "{{ TransitGatewayId }}"
description: Required parameter for the transit_gateway_metering_policies resource.
- name: region
value: "{{ region }}"
description: Required parameter for the transit_gateway_metering_policies resource.
- name: MiddleboxAttachmentId
value: "{{ MiddleboxAttachmentId }}"
description: The IDs of the middlebox attachments to include in the metering policy.
description: The IDs of the middlebox attachments to include in the metering policy.
- name: TagSpecifications
value: "{{ TagSpecifications }}"
description: The tags to assign to the metering policy.
description: The tags to assign to the metering policy.
- name: DryRun
value: {{ DryRun }}
description: Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.
description: Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.
UPDATE examples
- modify_transit_gateway_metering_policy
Modifies a transit gateway metering policy.
UPDATE aws.ec2.transit_gateway_metering_policies
SET
-- No updatable properties
WHERE
TransitGatewayMeteringPolicyId = '{{ TransitGatewayMeteringPolicyId }}' --required
AND region = '{{ region }}' --required
AND AddMiddleboxAttachmentId = '{{ AddMiddleboxAttachmentId}}'
AND RemoveMiddleboxAttachmentId = '{{ RemoveMiddleboxAttachmentId}}'
AND DryRun = {{ DryRun}}
RETURNING
middlebox_attachment_ids,
state,
tags,
transit_gateway_id,
transit_gateway_metering_policy_id,
update_effective_at;
DELETE examples
- delete_transit_gateway_metering_policy
Deletes a transit gateway metering policy.
DELETE FROM aws.ec2.transit_gateway_metering_policies
WHERE TransitGatewayMeteringPolicyId = '{{ TransitGatewayMeteringPolicyId }}' --required
AND region = '{{ region }}' --required
AND DryRun = '{{ DryRun }}'
;