create_transit_gateway_metering_policy_entry
async
¶
create_transit_gateway_metering_policy_entry(
*,
config_overrides: Optional[AsyncEC2ClientConfig] = None,
transit_gateway_metering_policy_id: Optional[TransitGatewayMeteringPolicyId] = None,
policy_rule_number: Optional[Integer] = None,
source_transit_gateway_attachment_id: Optional[TransitGatewayAttachmentId] = None,
source_transit_gateway_attachment_type: Optional[
TransitGatewayAttachmentResourceType
] = None,
source_cidr_block: Optional[String] = None,
source_port_range: Optional[String] = None,
destination_transit_gateway_attachment_id: Optional[
TransitGatewayAttachmentId
] = None,
destination_transit_gateway_attachment_type: Optional[
TransitGatewayAttachmentResourceType
] = None,
destination_cidr_block: Optional[String] = None,
destination_port_range: Optional[String] = None,
protocol: Optional[String] = None,
metered_account: Optional[TransitGatewayMeteringPayerType] = None,
dry_run: Optional[Boolean] = None,
) -> CreateTransitGatewayMeteringPolicyEntryResult
Creates an entry in a transit gateway metering policy to define traffic measurement rules.
Parameters:
-
transit_gateway_metering_policy_id(Optional[TransitGatewayMeteringPolicyId], default:None) –The ID of the transit gateway metering policy to add the entry to.
-
policy_rule_number(Optional[Integer], default:None) –The rule number for the metering policy entry. Rules are processed in order from lowest to highest number.
-
source_transit_gateway_attachment_id(Optional[TransitGatewayAttachmentId], default:None) –The ID of the source transit gateway attachment for traffic matching.
-
source_transit_gateway_attachment_type(Optional[TransitGatewayAttachmentResourceType], default:None) –The type of the source transit gateway attachment for traffic matching. Note that the
tgw-peeringresource type has been deprecated. To configure metering policies for Connect, use the transport attachment type. -
source_cidr_block(Optional[String], default:None) –The source CIDR block for traffic matching.
-
source_port_range(Optional[String], default:None) –The source port range for traffic matching.
-
destination_transit_gateway_attachment_id(Optional[TransitGatewayAttachmentId], default:None) –The ID of the destination transit gateway attachment for traffic matching.
-
destination_transit_gateway_attachment_type(Optional[TransitGatewayAttachmentResourceType], default:None) –The type of the destination transit gateway attachment for traffic matching. Note that the
tgw-peeringresource type has been deprecated. To configure metering policies for Connect, use the transport attachment type. -
destination_cidr_block(Optional[String], default:None) –The destination CIDR block for traffic matching.
-
destination_port_range(Optional[String], default:None) –The destination port range for traffic matching.
-
protocol(Optional[String], default:None) –The protocol for traffic matching (1, 6, 17, etc.).
-
metered_account(Optional[TransitGatewayMeteringPayerType], default:None) –The Amazon Web Services account ID to which the metered traffic should be attributed.
-
dry_run(Optional[Boolean], default:None) –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 isUnauthorizedOperation.
Raises:
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_ec2/_services/async_ec2.py
13533 13534 13535 13536 13537 13538 13539 13540 13541 13542 13543 13544 13545 13546 13547 13548 13549 13550 13551 13552 13553 13554 13555 13556 13557 13558 13559 13560 13561 13562 13563 13564 13565 13566 13567 13568 13569 13570 13571 13572 13573 13574 13575 13576 13577 13578 13579 13580 13581 13582 13583 13584 13585 13586 13587 13588 13589 13590 13591 13592 13593 13594 13595 13596 13597 13598 13599 13600 13601 13602 13603 13604 13605 13606 13607 13608 13609 13610 13611 13612 13613 13614 13615 13616 13617 13618 13619 13620 13621 13622 13623 13624 13625 13626 13627 13628 13629 13630 13631 13632 13633 13634 13635 13636 13637 13638 13639 13640 13641 13642 13643 13644 13645 13646 13647 | |