Skip to main content

ebs_encryptions

Creates, updates, deletes, gets or lists an ebs_encryptions resource.

Overview​

Nameebs_encryptions
TypeResource
Idaws.ec2.ebs_encryptions

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
ebs_encryption_by_defaultbooleanIndicates whether encryption by default is enabled.
sse_typestringReserved for future use.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_ebs_encryption_by_defaultselectregionDryRunDescribes whether EBS encryption by default is enabled for your account in the current Region. For more information, see Amazon EBS encryption in the Amazon EBS User Guide.
disable_ebs_encryption_by_defaultexecregionDryRunDisables EBS encryption by default for your account in the current Region. After you disable encryption by default, you can still create encrypted volumes by enabling encryption when you create each volume. Disabling encryption by default does not change the encryption status of your existing volumes. For more information, see Amazon EBS encryption in the Amazon EBS User Guide.
enable_ebs_encryption_by_defaultexecregionDryRunEnables EBS encryption by default for your account in the current Region. After you enable encryption by default, the EBS volumes that you create are always encrypted, either using the default KMS key or the KMS key that you specified when you created each volume. For more information, see Amazon EBS encryption in the Amazon EBS User Guide. Enabling encryption by default has no effect on the encryption status of your existing volumes. After you enable encryption by default, you can no longer launch instances using instance types that do not support encryption. For more information, see Supported instance types.

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
regionstringAWS region (default: us-east-1)
DryRunbooleanChecks 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.

SELECT examples​

Describes whether EBS encryption by default is enabled for your account in the current Region. For more information, see Amazon EBS encryption in the Amazon EBS User Guide.

SELECT
ebs_encryption_by_default,
sse_type
FROM aws.ec2.ebs_encryptions
WHERE region = '{{ region }}' -- required
AND DryRun = '{{ DryRun }}'
;

Lifecycle Methods​

Disables EBS encryption by default for your account in the current Region. After you disable encryption by default, you can still create encrypted volumes by enabling encryption when you create each volume. Disabling encryption by default does not change the encryption status of your existing volumes. For more information, see Amazon EBS encryption in the Amazon EBS User Guide.

EXEC aws.ec2.ebs_encryptions.disable_ebs_encryption_by_default
@region='{{ region }}' --required,
@DryRun={{ DryRun }}
;