turbot/alicloud

steampipe plugin install alicloudsteampipe plugin install alicloud

Table: alicloud_kms_key

A kms key can help user to protect data security in the transmission process.

Examples

Basic info

select
key_id,
arn,
key_state,
description,
creation_date,
region
from
alicloud_kms_key;

List keys scheduled for deletion

select
key_id,
key_state,
delete_date
from
alicloud_kms_key
where
key_state = 'PendingDeletion';

List keys that have automatic key rotation suspended

select
key_id,
automatic_rotation
from
alicloud_kms_key
where
automatic_rotation = 'Suspended';

Get the key alias info for each key

select
alias ->> 'KeyId' as key_id,
alias ->> 'AliasArn' as alias_arn,
alias ->> 'AliasName' as alias_name
from
alicloud_kms_key,
jsonb_array_elements(key_aliases) as alias;

Count of keys per region

select
region,
count(*)
from
alicloud_kms_key
group by
region;

.inspect alicloud_kms_key

Alicloud KMS Key

NameTypeDescription
account_idtextThe Alicloud Account ID in which the resource is located.
akasjsonbArray of globally unique identifier strings (also known as) for the resource.
arntextThe Alibaba Cloud Resource Name (ARN) of the CMK.
automatic_rotationtextIndicates whether automatic key rotation is enabled.
creation_datetimestamp without time zoneThe date and time the CMK was created.
creatortextThe creator of the CMK.
delete_datetimestamp without time zoneThe date and time the CMK is scheduled for deletion.
descriptiontextThe description of the CMK.
key_aliasesjsonbA list of aliases bound to a CMK.
key_idtextThe globally unique ID of the CMK.
key_spectextThe type of the CMK.
key_statetextThe status of the CMK.
key_usagetextThe purpose of the CMK.
last_rotation_datetimestamp without time zoneThe date and time the last rotation was performed.
material_expire_timetimestamp without time zoneThe time and date the key material for the CMK expires.
origintextThe source of the key material for the CMK.
primary_key_versiontextThe ID of the current primary key version of the symmetric CMK.
protection_leveltextThe protection level of the CMK.
regiontextThe Alicloud region in which the resource is located.
tagsjsonbA map of tags for the resource.
tags_srcjsonbA list of tags assigned to the key.
titletextTitle of the resource.