Skip to main content

resource_policies

Creates, updates, deletes or gets a resource_policy resource or lists resource_policies in a region

Overview

Nameresource_policies
TypeResource
DescriptionResource Type definition for AWS::APS::ResourcePolicy
Idawscc.aps.resource_policies

Fields

NameDatatypeDescription
workspace_arnstringThe Arn of an APS Workspace that the PolicyDocument will be attached to.
policy_documentstringThe JSON to use as the Resource-based Policy.
regionstringAWS region.

For more information, see AWS::APS::ResourcePolicy.

Methods

NameAccessible byRequired Params
create_resourceINSERTWorkspaceArn, PolicyDocument, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all properties from an individual resource_policy.

SELECT
region,
workspace_arn,
policy_document
FROM awscc.aps.resource_policies
WHERE region = 'us-east-1' AND data__Identifier = '<WorkspaceArn>';

INSERT example

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

/*+ create */
INSERT INTO awscc.aps.resource_policies (
WorkspaceArn,
PolicyDocument,
region
)
SELECT
'{{ WorkspaceArn }}',
'{{ PolicyDocument }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM awscc.aps.resource_policies
WHERE data__Identifier = '<WorkspaceArn>'
AND region = 'us-east-1';

Permissions

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

Create

aps:PutResourcePolicy,
aps:DescribeResourcePolicy

Read

aps:DescribeResourcePolicy

Update

aps:PutResourcePolicy,
aps:DescribeResourcePolicy

Delete

aps:DeleteResourcePolicy,
aps:DescribeResourcePolicy

List

aps:DescribeResourcePolicy,
aps:ListWorkspaces