Skip to main content

default_credit_specifications

Creates, updates, deletes, gets or lists a default_credit_specifications resource.

Overview

Namedefault_credit_specifications
TypeResource
Idaws.ec2.default_credit_specifications

Fields

The following fields are returned by SELECT queries:

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

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_default_credit_specificationselectInstanceFamily, regionDryRunDescribes the default credit option for CPU usage of a burstable performance instance family. For more information, see Burstable performance instances in the Amazon EC2 User Guide.
modify_default_credit_specificationupdateInstanceFamily, CpuCredits, regionDryRunModifies the default credit option for CPU usage of burstable performance instances. The default credit option is set at the account level per Amazon Web Services 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 Amazon Web Services 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 EC2 User Guide.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
CpuCreditsstringThe credit option for CPU usage of the instance family. Valid Values: standard | unlimited
InstanceFamilystringThe instance family.
regionstringAWS region (default: us-east-1)
DryRunbooleanChecks whether you have the required permissions for the operation, 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.

SELECT examples

Describes the default credit option for CPU usage of a burstable performance instance family. For more information, see Burstable performance instances in the Amazon EC2 User Guide.

SELECT
cpu_credits,
instance_family
FROM aws.ec2.default_credit_specifications
WHERE InstanceFamily = '{{ InstanceFamily }}' -- required
AND region = '{{ region }}' -- required
AND DryRun = '{{ DryRun }}'
;

UPDATE examples

Modifies the default credit option for CPU usage of burstable performance instances. The default credit option is set at the account level per Amazon Web Services 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 Amazon Web Services 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 EC2 User Guide.

UPDATE aws.ec2.default_credit_specifications
SET
-- No updatable properties
WHERE
InstanceFamily = '{{ InstanceFamily }}' --required
AND CpuCredits = '{{ CpuCredits }}' --required
AND region = '{{ region }}' --required
AND DryRun = {{ DryRun}}
RETURNING
cpu_credits,
instance_family;