turbot/alicloud

steampipe plugin install alicloudsteampipe plugin install alicloud

Table: alicloud_ram_policy

Permissions are specified by a statement within a policy that allows or denies access to a specific Alibaba Cloud resource.

A policy defines a set of permissions that are described based on the policy structure and syntax. A policy can accurately describe the authorized resource sets, authorized operation sets, and authorization conditions.

Examples

Basic info

select
policy_name,
policy_type,
description,
default_version,
policy_document
from
alicloud_ram_policy;

List system policies

select
policy_name,
policy_type,
description,
default_version,
policy_document
from
alicloud_ram_policy
where
policy_type = 'System';

List custom policies

select
policy_name,
policy_type,
description,
default_version,
policy_document
from
alicloud_ram_policy
where
policy_type = 'Custom';

List policies with statements granting full access

select
policy_name,
policy_type,
action,
s ->> 'Effect' as effect
from
alicloud_ram_policy,
jsonb_array_elements(policy_document_std -> 'Statement') as s,
jsonb_array_elements_text(s -> 'Action') as action
where
action in ('*', '*:*')
and s ->> 'Effect' = 'Allow';

.inspect alicloud_ram_policy

Alibaba Cloud RAM Policy

NameTypeDescription
account_idtextThe Alicloud Account ID in which the resource is located.
akasjsonbArray of globally unique identifier strings (also known as) for the resource.
attachment_countbigintThe number of references to the policy.
create_datetimestamp without time zonePolicy creation date
default_versiontextDeafult version of the policy
descriptiontextThe policy description
policy_documentjsonbContains the details about the policy.
policy_document_stdjsonbContains the policy document in a canonical form for easier searching.
policy_nametextThe name of the policy.
policy_typetextThe type of the policy. Valid values: System and Custom.
regiontextThe Alicloud region in which the resource is located.
titletextTitle of the resource.
update_datetimestamp without time zoneLast time when policy got updated