Skip to content

accept_address_transfer async

accept_address_transfer(
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    address: Optional[String] = None,
    tag_specifications: Optional[TagSpecificationList] = None,
    dry_run: Optional[Boolean] = None,
) -> AcceptAddressTransferResult

Accepts an Elastic IP address transfer. For more information, see Accept a transferred Elastic IP address in the Amazon VPC User Guide.

Parameters:

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

    The Elastic IP address you are accepting for transfer.

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

    tag: - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

  • 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 is UnauthorizedOperation.

Raises:

Source code in docs_src/capo_ec2/_services/async_ec2.py
async def accept_address_transfer(
    self,
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    address: Optional["capo_ec2.types.string.String"] = None,
    tag_specifications: Optional[
        "capo_ec2.types.tag_specification_list.TagSpecificationList"
    ] = None,
    dry_run: Optional["capo_ec2.types.boolean.Boolean"] = None,
) -> "capo_ec2.types.accept_address_transfer_result.AcceptAddressTransferResult":
    """<p>Accepts an Elastic IP address transfer. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-eips.html#using-instance-addressing-eips-transfer-accept">Accept a transferred Elastic IP address</a> in the <i>Amazon VPC User Guide</i>.</p>

    Args:
        address: <p>The Elastic IP address you are accepting for transfer.</p>
        tag_specifications: <p> <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
        dry_run: <p>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 <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</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.accept_address_transfer_request.AcceptAddressTransferRequest]",
    ) -> AsyncOperationResponse[
        "capo_ec2.types.accept_address_transfer_result.AcceptAddressTransferResult"
    ]:
        import capo_ec2._operations.amazon_ec2.accept_address_transfer

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("AcceptAddressTransfer")
    )
    input_: capo_ec2.types.accept_address_transfer_request.AcceptAddressTransferRequest = {}
    if address is not None:
        input_["address"] = address
    if tag_specifications is not None:
        input_["tag_specifications"] = tag_specifications
    if dry_run is not None:
        input_["dry_run"] = dry_run

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