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 | aws.ram.permissions |
Fields
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. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Name, ResourceType, PolicyTemplate, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.ram.permissions (
Name,
ResourceType,
PolicyTemplate,
region
)
SELECT
'{{ Name }}',
'{{ ResourceType }}',
'{{ PolicyTemplate }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.ram.permissions (
Name,
ResourceType,
PolicyTemplate,
Tags,
region
)
SELECT
'{{ Name }}',
'{{ ResourceType }}',
'{{ PolicyTemplate }}',
'{{ 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: ResourceType
value: '{{ ResourceType }}'
- name: PolicyTemplate
value: {}
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
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