Skip to content

create_ipam_prefix_list_resolver async

create_ipam_prefix_list_resolver(
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    dry_run: Optional[Boolean] = None,
    ipam_id: Optional[IpamId] = None,
    description: Optional[String] = None,
    address_family: Optional[AddressFamily] = None,
    rules: Optional[IpamPrefixListResolverRuleRequestSet] = None,
    tag_specifications: Optional[TagSpecificationList] = None,
    client_token: Optional[String] = None,
) -> CreateIpamPrefixListResolverResult

Creates an IPAM prefix list resolver.

An IPAM prefix list resolver is a component that manages the synchronization between IPAM's CIDR selection rules and customer-managed prefix lists. It automates connectivity configurations by selecting CIDRs from IPAM's database based on your business logic and synchronizing them with prefix lists used in resources such as VPC route tables and security groups.

For more information about IPAM prefix list resolver, see Automate prefix list updates with IPAM in the Amazon VPC IPAM User Guide.

Parameters:

  • dry_run (Optional[Boolean], default: None ) –

    A check for 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.

  • ipam_id (Optional[IpamId], default: None ) –

    The ID of the IPAM that will serve as the source of the IP address database for CIDR selection. The IPAM must be in the Advanced tier to use this feature.

  • description (Optional[String], default: None ) –

    A description for the IPAM prefix list resolver to help you identify its purpose and configuration.

  • address_family (Optional[AddressFamily], default: None ) –

    The address family for the IPAM prefix list resolver. Valid values are ipv4 and ipv6. You must create separate resolvers for IPv4 and IPv6 CIDRs as they cannot be mixed in the same resolver.

  • rules (Optional[IpamPrefixListResolverRuleRequestSet], default: None ) –

    The CIDR selection rules for the resolver.

    CIDR selection rules define the business logic for selecting CIDRs from IPAM. If a CIDR matches any of the rules, it will be included. If a rule has multiple conditions, the CIDR has to match every condition of that rule. You can create a prefix list resolver without any CIDR selection rules, but it will generate empty versions (containing no CIDRs) until you add rules.

  • tag_specifications (Optional[TagSpecificationList], default: None ) –

    The tags to apply to the IPAM prefix list resolver during creation. Tags help you organize and manage your Amazon Web Services resources.

  • client_token (Optional[String], default: None ) –

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring idempotency.

Raises:

Source code in docs_src/capo_ec2/_services/async_ec2.py
async def create_ipam_prefix_list_resolver(
    self,
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    dry_run: Optional["capo_ec2.types.boolean.Boolean"] = None,
    ipam_id: Optional["capo_ec2.types.ipam_id.IpamId"] = None,
    description: Optional["capo_ec2.types.string.String"] = None,
    address_family: Optional["capo_ec2.types.address_family.AddressFamily"] = None,
    rules: Optional[
        "capo_ec2.types.ipam_prefix_list_resolver_rule_request_set.IpamPrefixListResolverRuleRequestSet"
    ] = None,
    tag_specifications: Optional[
        "capo_ec2.types.tag_specification_list.TagSpecificationList"
    ] = None,
    client_token: Optional["capo_ec2.types.string.String"] = None,
) -> "capo_ec2.types.create_ipam_prefix_list_resolver_result.CreateIpamPrefixListResolverResult":
    """<p>Creates an IPAM prefix list resolver.</p> <p>An IPAM prefix list resolver is a component that manages the synchronization between IPAM's CIDR selection rules and customer-managed prefix lists. It automates connectivity configurations by selecting CIDRs from IPAM's database based on your business logic and synchronizing them with prefix lists used in resources such as VPC route tables and security groups.</p> <p>For more information about IPAM prefix list resolver, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/automate-prefix-list-updates.html">Automate prefix list updates with IPAM</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>

    Args:
        dry_run: <p>A check for 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 <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
        ipam_id: <p>The ID of the IPAM that will serve as the source of the IP address database for CIDR selection. The IPAM must be in the Advanced tier to use this feature.</p>
        description: <p>A description for the IPAM prefix list resolver to help you identify its purpose and configuration.</p>
        address_family: <p>The address family for the IPAM prefix list resolver. Valid values are <code>ipv4</code> and <code>ipv6</code>. You must create separate resolvers for IPv4 and IPv6 CIDRs as they cannot be mixed in the same resolver.</p>
        rules: <p>The CIDR selection rules for the resolver.</p> <p>CIDR selection rules define the business logic for selecting CIDRs from IPAM. If a CIDR matches any of the rules, it will be included. If a rule has multiple conditions, the CIDR has to match every condition of that rule. You can create a prefix list resolver without any CIDR selection rules, but it will generate empty versions (containing no CIDRs) until you add rules.</p>
        tag_specifications: <p>The tags to apply to the IPAM prefix list resolver during creation. Tags help you organize and manage your Amazon Web Services resources.</p>
        client_token: <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/ec2/latest/devguide/ec2-api-idempotency.html">Ensuring idempotency</a>.</p>

    Raises:
        capo_ec2.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_ec2.types.create_ipam_prefix_list_resolver_request.CreateIpamPrefixListResolverRequest]",
    ) -> AsyncOperationResponse[
        "capo_ec2.types.create_ipam_prefix_list_resolver_result.CreateIpamPrefixListResolverResult"
    ]:
        import capo_ec2._operations.amazon_ec2.create_ipam_prefix_list_resolver

        (
            output,
            http_response,
        ) = await capo_ec2._operations.amazon_ec2.create_ipam_prefix_list_resolver.async_create_ipam_prefix_list_resolver(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateIpamPrefixListResolver")
    )
    input_: capo_ec2.types.create_ipam_prefix_list_resolver_request.CreateIpamPrefixListResolverRequest = {}
    if dry_run is not None:
        input_["dry_run"] = dry_run
    if ipam_id is not None:
        input_["ipam_id"] = ipam_id
    if description is not None:
        input_["description"] = description
    if address_family is not None:
        input_["address_family"] = address_family
    if rules is not None:
        input_["rules"] = rules
    if tag_specifications is not None:
        input_["tag_specifications"] = tag_specifications
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output