modify_instance_credit_specification

modify_instance_credit_specification(**kwargs)

Modifies the credit option for CPU usage on a running or stopped burstable performance instance. The credit options are standard and unlimited .

For more information, see Burstable performance instances in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = client.modify_instance_credit_specification(
    DryRun=True|False,
    ClientToken='string',
    InstanceCreditSpecifications=[
        {
            'InstanceId': 'string',
            'CpuCredits': 'string'
        },
    ]
)
Parameters
  • DryRun (boolean) -- 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 .
  • ClientToken (string) -- A unique, case-sensitive token that you provide to ensure idempotency of your modification request. For more information, see Ensuring Idempotency.
  • InstanceCreditSpecifications (list) --

    [REQUIRED]

    Information about the credit option for CPU usage.

    • (dict) --

      Describes the credit option for CPU usage of a burstable performance instance.

      • InstanceId (string) -- [REQUIRED]

        The ID of the instance.

      • CpuCredits (string) --

        The credit option for CPU usage of the instance.

        Valid values: standard | unlimited

        T3 instances with host tenancy do not support the unlimited CPU credit option.

Return type

dict

Returns

Response Syntax

{
    'SuccessfulInstanceCreditSpecifications': [
        {
            'InstanceId': 'string'
        },
    ],
    'UnsuccessfulInstanceCreditSpecifications': [
        {
            'InstanceId': 'string',
            'Error': {
                'Code': 'InvalidInstanceID.Malformed'|'InvalidInstanceID.NotFound'|'IncorrectInstanceState'|'InstanceCreditSpecification.NotSupported',
                'Message': 'string'
            }
        },
    ]
}

Response Structure

  • (dict) --

    • SuccessfulInstanceCreditSpecifications (list) --

      Information about the instances whose credit option for CPU usage was successfully modified.

      • (dict) --

        Describes the burstable performance instance whose credit option for CPU usage was successfully modified.

        • InstanceId (string) --

          The ID of the instance.

    • UnsuccessfulInstanceCreditSpecifications (list) --

      Information about the instances whose credit option for CPU usage was not modified.

      • (dict) --

        Describes the burstable performance instance whose credit option for CPU usage was not modified.

        • InstanceId (string) --

          The ID of the instance.

        • Error (dict) --

          The applicable error for the burstable performance instance whose credit option for CPU usage was not modified.

          • Code (string) --

            The error code.

          • Message (string) --

            The applicable error message.