Skip to main content

permissions

Creates, updates, deletes or gets a permission resource or lists permissions in a region

Overview

Namepermissions
TypeResource
DescriptionResource type definition for AWS::RAM::Permission
Idaws.ram.permissions

Fields

NameDatatypeDescription
arnstring
namestringThe name of the permission.
versionstringVersion of the permission.
is_resource_type_defaultbooleanSet to true to use this as the default permission.
permission_typestring
resource_typestringThe resource type this permission can be used with.
policy_templateobjectPolicy template for the permission.
tagsarray
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTName, ResourceType, PolicyTemplate, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all permissions in a region.

SELECT
region,
arn,
name,
version,
is_resource_type_default,
permission_type,
resource_type,
policy_template,
tags
FROM aws.ram.permissions
WHERE region = 'us-east-1';

Gets all properties from an individual permission.

SELECT
region,
arn,
name,
version,
is_resource_type_default,
permission_type,
resource_type,
policy_template,
tags
FROM aws.ram.permissions
WHERE region = 'us-east-1' AND data__Identifier = '<Arn>';

INSERT example

Use the following StackQL query and manifest file to create a new permission resource, using stack-deploy.

/*+ create */
INSERT INTO aws.ram.permissions (
Name,
ResourceType,
PolicyTemplate,
region
)
SELECT
'{{ Name }}',
'{{ ResourceType }}',
'{{ PolicyTemplate }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.ram.permissions
WHERE data__Identifier = '<Arn>'
AND region = 'us-east-1';

Permissions

To operate on the permissions resource, the following permissions are required:

Create

ram:CreatePermission,
ram:TagResource

Read

ram:GetPermission

Update

ram:CreatePermissionVersion,
ram:DeletePermissionVersion,
ram:SetDefaultPermissionVersion,
ram:GetPermission,
ram:ReplacePermissionAssociations,
ram:ListReplacePermissionAssociationsWork,
ram:ListPermissionVersions,
ram:UntagResource,
ram:TagResource

Delete

ram:DeletePermissionVersion,
ram:DeletePermission

List

ram:ListPermissions,
ram:ListPermissionVersions