Skip to content

describe_address_transfers async

describe_address_transfers(
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    allocation_ids: Optional[AllocationIdList] = None,
    next_token: Optional[String] = None,
    max_results: Optional[DescribeAddressTransfersMaxResults] = None,
    dry_run: Optional[Boolean] = None,
) -> DescribeAddressTransfersResult

Describes an Elastic IP address transfer. For more information, see Transfer Elastic IP addresses in the Amazon VPC User Guide.

When you transfer an Elastic IP address, there is a two-step handshake between the source and transfer Amazon Web Services accounts. When the source account starts the transfer, the transfer account has seven days to accept the Elastic IP address transfer. During those seven days, the source account can view the pending transfer by using this action. After seven days, the transfer expires and ownership of the Elastic IP address returns to the source account. Accepted transfers are visible to the source account for 14 days after the transfers have been accepted.

Parameters:

  • allocation_ids (Optional[AllocationIdList], default: None ) –

    The allocation IDs of Elastic IP addresses.

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

    Specify the pagination token from a previous request to retrieve the next page of results.

  • max_results (Optional[DescribeAddressTransfersMaxResults], default: None ) –

    The maximum number of address transfers to return in one page of results.

  • 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 describe_address_transfers(
    self,
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    allocation_ids: Optional[
        "capo_ec2.types.allocation_id_list.AllocationIdList"
    ] = None,
    next_token: Optional["capo_ec2.types.string.String"] = None,
    max_results: Optional[
        "capo_ec2.types.describe_address_transfers_max_results.DescribeAddressTransfersMaxResults"
    ] = None,
    dry_run: Optional["capo_ec2.types.boolean.Boolean"] = None,
) -> "capo_ec2.types.describe_address_transfers_result.DescribeAddressTransfersResult":
    """<p>Describes an Elastic IP address transfer. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-eips.html#transfer-EIPs-intro">Transfer Elastic IP addresses</a> in the <i>Amazon VPC User Guide</i>.</p> <p>When you transfer an Elastic IP address, there is a two-step handshake between the source and transfer Amazon Web Services accounts. When the source account starts the transfer, the transfer account has seven days to accept the Elastic IP address transfer. During those seven days, the source account can view the pending transfer by using this action. After seven days, the transfer expires and ownership of the Elastic IP address returns to the source account. Accepted transfers are visible to the source account for 14 days after the transfers have been accepted.</p>

    Args:
        allocation_ids: <p>The allocation IDs of Elastic IP addresses.</p>
        next_token: <p>Specify the pagination token from a previous request to retrieve the next page of results.</p>
        max_results: <p>The maximum number of address transfers to return in one page of results.</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.describe_address_transfers_request.DescribeAddressTransfersRequest]",
    ) -> AsyncOperationResponse[
        "capo_ec2.types.describe_address_transfers_result.DescribeAddressTransfersResult"
    ]:
        import capo_ec2._operations.amazon_ec2.describe_address_transfers

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeAddressTransfers")
    )
    input_: capo_ec2.types.describe_address_transfers_request.DescribeAddressTransfersRequest = {}
    if allocation_ids is not None:
        input_["allocation_ids"] = allocation_ids
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results
    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