Amazon Elastic Compute Cloud

2019/11/25 - Amazon Elastic Compute Cloud - 2 new api methods

Changes  This release adds two new APIs: 1. ModifyDefaultCreditSpecification, which allows you to set default credit specification at the account level per AWS Region, per burstable performance instance family, so that all new burstable performance instances in the account launch using the new default credit specification. 2. GetDefaultCreditSpecification, which allows you to get current default credit specification per AWS Region, per burstable performance instance family. This release also adds new client exceptions for StartInstances and StopInstances.

ModifyDefaultCreditSpecification (new) Link ¶

Modifies the default credit option for CPU usage of burstable performance instances. The default credit option is set at the account level per AWS Region, and is specified per instance family. All new burstable performance instances in the account launch using the default credit option.

ModifyDefaultCreditSpecification is an asynchronous operation, which works at an AWS Region level and modifies the credit option for each Availability Zone. All zones in a Region are updated within five minutes. But if instances are launched during this operation, they might not get the new credit option until the zone is updated. To verify whether the update has occurred, you can call GetDefaultCreditSpecification and check DefaultCreditSpecification for updates.

For more information, see Burstable Performance Instances in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

client.modify_default_credit_specification(
    DryRun=True|False,
    InstanceFamily='t2'|'t3'|'t3a',
    CpuCredits='string'
)
type DryRun

boolean

param DryRun

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 .

type InstanceFamily

string

param InstanceFamily

[REQUIRED]

The instance family.

type CpuCredits

string

param CpuCredits

[REQUIRED]

The credit option for CPU usage of the instance family.

Valid Values: standard | unlimited

rtype

dict

returns

Response Syntax

{
    'InstanceFamilyCreditSpecification': {
        'InstanceFamily': 't2'|'t3'|'t3a',
        'CpuCredits': 'string'
    }
}

Response Structure

  • (dict) --

    • InstanceFamilyCreditSpecification (dict) --

      The default credit option for CPU usage of the instance family.

      • InstanceFamily (string) --

        The instance family.

      • CpuCredits (string) --

        The default credit option for CPU usage of the instance family. Valid values are standard and unlimited .

GetDefaultCreditSpecification (new) Link ¶

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

For more information, see Burstable Performance Instances in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

client.get_default_credit_specification(
    DryRun=True|False,
    InstanceFamily='t2'|'t3'|'t3a'
)
type DryRun

boolean

param DryRun

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 .

type InstanceFamily

string

param InstanceFamily

[REQUIRED]

The instance family.

rtype

dict

returns

Response Syntax

{
    'InstanceFamilyCreditSpecification': {
        'InstanceFamily': 't2'|'t3'|'t3a',
        'CpuCredits': 'string'
    }
}

Response Structure

  • (dict) --

    • InstanceFamilyCreditSpecification (dict) --

      The default credit option for CPU usage of the instance family.

      • InstanceFamily (string) --

        The instance family.

      • CpuCredits (string) --

        The default credit option for CPU usage of the instance family. Valid values are standard and unlimited .