permissions
Creates, updates, deletes or gets a permission resource or lists permissions in a region
Overview
| Name | permissions |
| Type | Resource |
| Description | Resource type definition for AWS::RAM::Permission |
| Id | awscc.ram.permissions |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
arn | string | |
name | string | The name of the permission. |
version | string | Version of the permission. |
is_resource_type_default | boolean | Set to true to use this as the default permission. |
permission_type | string | |
resource_type | string | The resource type this permission can be used with. |
policy_template | object | Policy template for the permission. |
tags | array | |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
arn | string | |
region | string | AWS region. |
For more information, see AWS::RAM::Permission.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | permissions | INSERT | Name, ResourceType, PolicyTemplate, region |
delete_resource | permissions | DELETE | Identifier, region |
update_resource | permissions | UPDATE | Identifier, PatchDocument, region |
list_resources | permissions_list_only | SELECT | region |
get_resource | permissions | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual permission.
SELECT
region,
arn,
name,
version,
is_resource_type_default,
permission_type,
resource_type,
policy_template,
tags
FROM awscc.ram.permissions
WHERE
region = 'us-east-1' AND
Identifier = '{{ arn }}';
Lists all permissions in a region.
SELECT
region,
arn
FROM awscc.ram.permissions_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new permission resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.ram.permissions (
Name,
ResourceType,
PolicyTemplate,
region
)
SELECT
'{{ name }}',
'{{ resource_type }}',
'{{ policy_template }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.ram.permissions (
Name,
ResourceType,
PolicyTemplate,
Tags,
region
)
SELECT
'{{ name }}',
'{{ resource_type }}',
'{{ policy_template }}',
'{{ tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: permission
props:
- name: name
value: '{{ name }}'
- name: resource_type
value: '{{ resource_type }}'
- name: policy_template
value: {}
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a permission resource, using stack-deploy.
/*+ update */
UPDATE awscc.ram.permissions
SET PatchDocument = string('{{ {
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}';
DELETE example
/*+ delete */
DELETE FROM awscc.ram.permissions
WHERE
Identifier = '{{ arn }}' AND
region = 'us-east-1';
Permissions
To operate on the permissions resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
ram:CreatePermission,
ram:TagResource
ram:GetPermission
ram:CreatePermissionVersion,
ram:DeletePermissionVersion,
ram:SetDefaultPermissionVersion,
ram:GetPermission,
ram:ReplacePermissionAssociations,
ram:ListReplacePermissionAssociationsWork,
ram:ListPermissionVersions,
ram:UntagResource,
ram:TagResource
ram:DeletePermissionVersion,
ram:DeletePermission
ram:ListPermissions,
ram:ListPermissionVersions