EC2.Client.
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'
},
]
)
DryRunOperation
. Otherwise, it is UnauthorizedOperation
.[REQUIRED]
Information about the credit option for CPU usage.
Describes the credit option for CPU usage of a burstable performance instance.
The ID of the instance.
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.
dict
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.