Skip to content

get_ipam_address_history async

get_ipam_address_history(
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    dry_run: Optional[Boolean] = None,
    cidr: Optional[String] = None,
    ipam_scope_id: Optional[IpamScopeId] = None,
    vpc_id: Optional[String] = None,
    start_time: Optional[MillisecondDateTime] = None,
    end_time: Optional[MillisecondDateTime] = None,
    max_results: Optional[IpamAddressHistoryMaxResults] = None,
    next_token: Optional[NextToken] = None,
) -> GetIpamAddressHistoryResult

Retrieve historical information about a CIDR within an IPAM scope. For more information, see View the history of IP addresses 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.

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

    The CIDR you want the history of. The CIDR can be an IPv4 or IPv6 IP address range. If you enter a /16 IPv4 CIDR, you will get records that match it exactly. You will not get records for any subnets within the /16 CIDR.

  • ipam_scope_id (Optional[IpamScopeId], default: None ) –

    The ID of the IPAM scope that the CIDR is in.

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

    The ID of the VPC you want your history records filtered by.

  • start_time (Optional[MillisecondDateTime], default: None ) –

    The start of the time period for which you are looking for history. If you omit this option, it will default to the value of EndTime.

  • end_time (Optional[MillisecondDateTime], default: None ) –

    The end of the time period for which you are looking for history. If you omit this option, it will default to the current time.

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

    The maximum number of historical results you would like returned per page. Defaults to 100.

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

    The token for the next page of results.

Raises:

Source code in docs_src/capo_ec2/_services/async_ec2.py
async def get_ipam_address_history(
    self,
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    dry_run: Optional["capo_ec2.types.boolean.Boolean"] = None,
    cidr: Optional["capo_ec2.types.string.String"] = None,
    ipam_scope_id: Optional["capo_ec2.types.ipam_scope_id.IpamScopeId"] = None,
    vpc_id: Optional["capo_ec2.types.string.String"] = None,
    start_time: Optional[
        "capo_ec2.types.millisecond_date_time.MillisecondDateTime"
    ] = None,
    end_time: Optional[
        "capo_ec2.types.millisecond_date_time.MillisecondDateTime"
    ] = None,
    max_results: Optional[
        "capo_ec2.types.ipam_address_history_max_results.IpamAddressHistoryMaxResults"
    ] = None,
    next_token: Optional["capo_ec2.types.next_token.NextToken"] = None,
) -> "capo_ec2.types.get_ipam_address_history_result.GetIpamAddressHistoryResult":
    """<p>Retrieve historical information about a CIDR within an IPAM scope. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/view-history-cidr-ipam.html">View the history of IP addresses</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>
        cidr: <p>The CIDR you want the history of. The CIDR can be an IPv4 or IPv6 IP address range. If you enter a /16 IPv4 CIDR, you will get records that match it exactly. You will not get records for any subnets within the /16 CIDR.</p>
        ipam_scope_id: <p>The ID of the IPAM scope that the CIDR is in.</p>
        vpc_id: <p>The ID of the VPC you want your history records filtered by.</p>
        start_time: <p>The start of the time period for which you are looking for history. If you omit this option, it will default to the value of EndTime.</p>
        end_time: <p>The end of the time period for which you are looking for history. If you omit this option, it will default to the current time.</p>
        max_results: <p>The maximum number of historical results you would like returned per page. Defaults to 100.</p>
        next_token: <p>The token for the next page of results.</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.get_ipam_address_history_request.GetIpamAddressHistoryRequest]",
    ) -> AsyncOperationResponse[
        "capo_ec2.types.get_ipam_address_history_result.GetIpamAddressHistoryResult"
    ]:
        import capo_ec2._operations.amazon_ec2.get_ipam_address_history

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetIpamAddressHistory")
    )
    input_: capo_ec2.types.get_ipam_address_history_request.GetIpamAddressHistoryRequest = {}
    if dry_run is not None:
        input_["dry_run"] = dry_run
    if cidr is not None:
        input_["cidr"] = cidr
    if ipam_scope_id is not None:
        input_["ipam_scope_id"] = ipam_scope_id
    if vpc_id is not None:
        input_["vpc_id"] = vpc_id
    if start_time is not None:
        input_["start_time"] = start_time
    if end_time is not None:
        input_["end_time"] = end_time
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

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