Skip to content

describe_reserved_instances_modifications async

describe_reserved_instances_modifications(
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    reserved_instances_modification_ids: Optional[
        ReservedInstancesModificationIdStringList
    ] = None,
    next_token: Optional[String] = None,
    filters: Optional[FilterList] = None,
) -> DescribeReservedInstancesModificationsResult

Describes the modifications made to your Reserved Instances. If no parameter is specified, information about all your Reserved Instances modification requests is returned. If a modification ID is specified, only information about the specific modification is returned.

For more information, see Modify Reserved Instances in the Amazon EC2 User Guide.

The order of the elements in the response, including those within nested structures, might vary. Applications should not assume the elements appear in a particular order.

Parameters:

  • reserved_instances_modification_ids (Optional[ReservedInstancesModificationIdStringList], default: None ) –

    IDs for the submitted modification request.

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

    The token to retrieve the next page of results.

  • filters (Optional[FilterList], default: None ) –

    One or more filters.

    • client-token - The idempotency token for the modification request.

    • create-date - The time when the modification request was created.

    • effective-date - The time when the modification becomes effective.

    • modification-result.reserved-instances-id - The ID for the Reserved Instances created as part of the modification request. This ID is only available when the status of the modification is fulfilled.

    • modification-result.target-configuration.availability-zone - The Availability Zone for the new Reserved Instances.

    • modification-result.target-configuration.availability-zone-id - The ID of the Availability Zone for the new Reserved Instances.

    • modification-result.target-configuration.instance-count - The number of new Reserved Instances.

    • modification-result.target-configuration.instance-type - The instance type of the new Reserved Instances.

    • reserved-instances-id - The ID of the Reserved Instances modified.

    • reserved-instances-modification-id - The ID of the modification request.

    • status - The status of the Reserved Instances modification request (processing | fulfilled | failed).

    • status-message - The reason for the status.

    • update-date - The time when the modification request was last updated.

Raises:

Source code in docs_src/capo_ec2/_services/async_ec2.py
async def describe_reserved_instances_modifications(
    self,
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    reserved_instances_modification_ids: Optional[
        "capo_ec2.types.reserved_instances_modification_id_string_list.ReservedInstancesModificationIdStringList"
    ] = None,
    next_token: Optional["capo_ec2.types.string.String"] = None,
    filters: Optional["capo_ec2.types.filter_list.FilterList"] = None,
) -> "capo_ec2.types.describe_reserved_instances_modifications_result.DescribeReservedInstancesModificationsResult":
    """<p>Describes the modifications made to your Reserved Instances. If no parameter is specified, information about all your Reserved Instances modification requests is returned. If a modification ID is specified, only information about the specific modification is returned.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-modifying.html">Modify Reserved Instances</a> in the <i>Amazon EC2 User Guide</i>.</p> <note> <p>The order of the elements in the response, including those within nested structures, might vary. Applications should not assume the elements appear in a particular order.</p> </note>

    Args:
        reserved_instances_modification_ids: <p>IDs for the submitted modification request.</p>
        next_token: <p>The token to retrieve the next page of results.</p>
        filters: <p>One or more filters.</p> <ul> <li> <p> <code>client-token</code> - The idempotency token for the modification request.</p> </li> <li> <p> <code>create-date</code> - The time when the modification request was created.</p> </li> <li> <p> <code>effective-date</code> - The time when the modification becomes effective.</p> </li> <li> <p> <code>modification-result.reserved-instances-id</code> - The ID for the Reserved Instances created as part of the modification request. This ID is only available when the status of the modification is <code>fulfilled</code>.</p> </li> <li> <p> <code>modification-result.target-configuration.availability-zone</code> - The Availability Zone for the new Reserved Instances.</p> </li> <li> <p> <code>modification-result.target-configuration.availability-zone-id</code> - The ID of the Availability Zone for the new Reserved Instances.</p> </li> <li> <p> <code>modification-result.target-configuration.instance-count </code> - The number of new Reserved Instances.</p> </li> <li> <p> <code>modification-result.target-configuration.instance-type</code> - The instance type of the new Reserved Instances.</p> </li> <li> <p> <code>reserved-instances-id</code> - The ID of the Reserved Instances modified.</p> </li> <li> <p> <code>reserved-instances-modification-id</code> - The ID of the modification request.</p> </li> <li> <p> <code>status</code> - The status of the Reserved Instances modification request (<code>processing</code> | <code>fulfilled</code> | <code>failed</code>).</p> </li> <li> <p> <code>status-message</code> - The reason for the status.</p> </li> <li> <p> <code>update-date</code> - The time when the modification request was last updated.</p> </li> </ul>

    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_reserved_instances_modifications_request.DescribeReservedInstancesModificationsRequest]",
    ) -> AsyncOperationResponse[
        "capo_ec2.types.describe_reserved_instances_modifications_result.DescribeReservedInstancesModificationsResult"
    ]:
        import capo_ec2._operations.amazon_ec2.describe_reserved_instances_modifications

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeReservedInstancesModifications")
    )
    input_: capo_ec2.types.describe_reserved_instances_modifications_request.DescribeReservedInstancesModificationsRequest = {}
    if reserved_instances_modification_ids is not None:
        input_["reserved_instances_modification_ids"] = (
            reserved_instances_modification_ids
        )
    if next_token is not None:
        input_["next_token"] = next_token
    if filters is not None:
        input_["filters"] = filters

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