Skip to content

modify_ipam_prefix_list_resolver_target

modify_ipam_prefix_list_resolver_target(
    *,
    config_overrides: Optional[EC2ClientConfig] = None,
    dry_run: Optional[Boolean] = None,
    ipam_prefix_list_resolver_target_id: Optional[
        IpamPrefixListResolverTargetId
    ] = None,
    desired_version: Optional[BoxedLong] = None,
    track_latest_version: Optional[BoxedBoolean] = None,
    client_token: Optional[String] = None,
) -> ModifyIpamPrefixListResolverTargetResult

Modifies an IPAM prefix list resolver target. You can update version tracking settings and the desired version of the target prefix list.

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_prefix_list_resolver_target_id (Optional[IpamPrefixListResolverTargetId], default: None ) –

    The ID of the IPAM prefix list resolver target to modify.

  • desired_version (Optional[BoxedLong], default: None ) –

    The desired version of the prefix list to target. This allows you to pin the target to a specific version.

  • track_latest_version (Optional[BoxedBoolean], default: None ) –

    Indicates whether the resolver target should automatically track the latest version of the prefix list. When enabled, the target will always synchronize with the most current version.

    Choose this for automatic updates when you want your prefix lists to stay current with infrastructure changes without manual intervention.

  • 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/ec2.py
def modify_ipam_prefix_list_resolver_target(
    self,
    *,
    config_overrides: Optional[EC2ClientConfig] = None,
    dry_run: Optional["capo_ec2.types.boolean.Boolean"] = None,
    ipam_prefix_list_resolver_target_id: Optional[
        "capo_ec2.types.ipam_prefix_list_resolver_target_id.IpamPrefixListResolverTargetId"
    ] = None,
    desired_version: Optional["capo_ec2.types.boxed_long.BoxedLong"] = None,
    track_latest_version: Optional[
        "capo_ec2.types.boxed_boolean.BoxedBoolean"
    ] = None,
    client_token: Optional["capo_ec2.types.string.String"] = None,
) -> "capo_ec2.types.modify_ipam_prefix_list_resolver_target_result.ModifyIpamPrefixListResolverTargetResult":
    """<p>Modifies an IPAM prefix list resolver target. You can update version tracking settings and the desired version of the target prefix list.</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_prefix_list_resolver_target_id: <p>The ID of the IPAM prefix list resolver target to modify.</p>
        desired_version: <p>The desired version of the prefix list to target. This allows you to pin the target to a specific version.</p>
        track_latest_version: <p>Indicates whether the resolver target should automatically track the latest version of the prefix list. When enabled, the target will always synchronize with the most current version.</p> <p>Choose this for automatic updates when you want your prefix lists to stay current with infrastructure changes without manual intervention.</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.
    """

    def _handler(
        req: "OperationRequest[capo_ec2.types.modify_ipam_prefix_list_resolver_target_request.ModifyIpamPrefixListResolverTargetRequest]",
    ) -> OperationResponse[
        "capo_ec2.types.modify_ipam_prefix_list_resolver_target_result.ModifyIpamPrefixListResolverTargetResult"
    ]:
        import capo_ec2._operations.amazon_ec2.modify_ipam_prefix_list_resolver_target

        output, http_response = (
            capo_ec2._operations.amazon_ec2.modify_ipam_prefix_list_resolver_target.modify_ipam_prefix_list_resolver_target(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ModifyIpamPrefixListResolverTarget")
    )
    input_: capo_ec2.types.modify_ipam_prefix_list_resolver_target_request.ModifyIpamPrefixListResolverTargetRequest = {}
    if dry_run is not None:
        input_["dry_run"] = dry_run
    if ipam_prefix_list_resolver_target_id is not None:
        input_["ipam_prefix_list_resolver_target_id"] = (
            ipam_prefix_list_resolver_target_id
        )
    if desired_version is not None:
        input_["desired_version"] = desired_version
    if track_latest_version is not None:
        input_["track_latest_version"] = track_latest_version
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output