default_credit_specifications
Creates, updates, deletes, gets or lists a default_credit_specifications resource.
Overview
| Name | default_credit_specifications |
| Type | Resource |
| Id | aws.ec2.default_credit_specifications |
Fields
The following fields are returned by SELECT queries:
- get_default_credit_specification
| Name | Datatype | Description |
|---|---|---|
cpu_credits | string | The default credit option for CPU usage of the instance family. Valid values are standard and unlimited. |
instance_family | string | The instance family. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_default_credit_specification | select | InstanceFamily, region | DryRun | 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. |
modify_default_credit_specification | update | InstanceFamily, CpuCredits, region | DryRun | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
CpuCredits | string | The credit option for CPU usage of the instance family. Valid Values: standard | unlimited |
InstanceFamily | string | The instance family. |
region | string | AWS region (default: us-east-1) |
DryRun | boolean | Checks 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
- get_default_credit_specification
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
- modify_default_credit_specification
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;