access_grants_locations
Creates, updates, deletes or gets an access_grants_location resource or lists access_grants_locations in a region
Overview
| Name | access_grants_locations |
| Type | Resource |
| Description | The AWS::S3::AccessGrantsLocation resource is an Amazon S3 resource type hosted in an access grants instance which can be the target of S3 access grants. |
| Id | awscc.s3.access_grants_locations |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
access_grants_location_arn | string | The Amazon Resource Name (ARN) of the specified Access Grants location. |
access_grants_location_id | string | The unique identifier for the specified Access Grants location. |
iam_role_arn | string | The Amazon Resource Name (ARN) of the access grant location's associated IAM role. |
location_scope | string | Descriptor for where the location actually points |
tags | array | |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
access_grants_location_id | string | The unique identifier for the specified Access Grants location. |
region | string | AWS region. |
For more information, see AWS::S3::AccessGrantsLocation.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | access_grants_locations | INSERT | , region |
delete_resource | access_grants_locations | DELETE | Identifier, region |
update_resource | access_grants_locations | UPDATE | Identifier, PatchDocument, region |
list_resources | access_grants_locations_list_only | SELECT | region |
get_resource | access_grants_locations | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual access_grants_location.
SELECT
region,
access_grants_location_arn,
access_grants_location_id,
iam_role_arn,
location_scope,
tags
FROM awscc.s3.access_grants_locations
WHERE
region = '{{ region }}' AND
Identifier = '{{ access_grants_location_id }}';
Lists all access_grants_locations in a region.
SELECT
region,
access_grants_location_id
FROM awscc.s3.access_grants_locations_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new access_grants_location resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.s3.access_grants_locations (
,
region
)
SELECT
'{{ }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.s3.access_grants_locations (
IamRoleArn,
LocationScope,
Tags,
region
)
SELECT
'{{ iam_role_arn }}',
'{{ location_scope }}',
'{{ tags }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: access_grants_location
props:
- name: iam_role_arn
value: '{{ iam_role_arn }}'
- name: location_scope
value: '{{ location_scope }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a access_grants_location resource, using stack-deploy.
/*+ update */
UPDATE awscc.s3.access_grants_locations
SET PatchDocument = string('{{ {
"IamRoleArn": iam_role_arn,
"LocationScope": location_scope
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ access_grants_location_id }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.s3.access_grants_locations
WHERE
Identifier = '{{ access_grants_location_id }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
Additional Parameters
Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:
| Parameter | Description |
|---|---|
ClientToken | A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request. If you do not specify a client token, one is generated for inclusion in the request. |
RoleArn | The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.If you do not specify a role, a temporary session is created using your AWS user credentials. |
TypeVersionId | For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used. |
Permissions
To operate on the access_grants_locations resource, the following permissions are required:
- Create
- Read
- Delete
- List
- Update
s3:CreateAccessGrantsLocation,
iam:PassRole,
s3:TagResource
s3:GetAccessGrantsLocation,
s3:ListTagsForResource
s3:DeleteAccessGrantsLocation
s3:ListAccessGrantsLocations
s3:UpdateAccessGrantsLocation,
s3:TagResource,
s3:UntagResource,
iam:PassRole