access_grants_instance_resource_policies
Creates, updates, deletes, gets or lists an access_grants_instance_resource_policies resource.
Overview
| Name | access_grants_instance_resource_policies |
| Type | Resource |
| Id | aws.s3control.access_grants_instance_resource_policies |
Fields
The following fields are returned by SELECT queries:
- get_access_grants_instance_resource_policy
| Name | Datatype | Description |
|---|---|---|
created_at | string | The date and time when you created the S3 Access Grants instance resource policy. |
organization | string | The Organization of the resource policy of the S3 Access Grants instance. |
policy | string | The resource policy of the S3 Access Grants instance. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_access_grants_instance_resource_policy | select | x-amz-account-id, region | Returns the resource policy of the S3 Access Grants instance. Permissions You must have the s3:GetAccessGrantsInstanceResourcePolicy permission to use this operation. | |
put_access_grants_instance_resource_policy | replace | x-amz-account-id, region | Updates the resource policy of the S3 Access Grants instance. Permissions You must have the s3:PutAccessGrantsInstanceResourcePolicy permission to use this operation. | |
delete_access_grants_instance_resource_policy | delete | x-amz-account-id, region | Deletes the resource policy of the S3 Access Grants instance. The resource policy is used to manage cross-account access to your S3 Access Grants instance. By deleting the resource policy, you delete any cross-account permissions to your S3 Access Grants instance. Permissions You must have the s3:DeleteAccessGrantsInstanceResourcePolicy permission to use this operation. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
x-amz-account-id | string | The Amazon Web Services account ID of the S3 Access Grants instance. |
SELECT examples
- get_access_grants_instance_resource_policy
Returns the resource policy of the S3 Access Grants instance. Permissions You must have the s3:GetAccessGrantsInstanceResourcePolicy permission to use this operation.
SELECT
created_at,
organization,
policy
FROM aws.s3control.access_grants_instance_resource_policies
WHERE `x-amz-account-id` = '{{ x-amz-account-id }}' -- required
AND region = '{{ region }}' -- required
;
REPLACE examples
- put_access_grants_instance_resource_policy
Updates the resource policy of the S3 Access Grants instance. Permissions You must have the s3:PutAccessGrantsInstanceResourcePolicy permission to use this operation.
REPLACE aws.s3control.access_grants_instance_resource_policies
SET
Policy = '{{ Policy }}',
Organization = '{{ Organization }}'
WHERE
`x-amz-account-id` = '{{ x-amz-account-id }}' --required
AND region = '{{ region }}' --required
RETURNING
created_at,
organization,
policy;
DELETE examples
- delete_access_grants_instance_resource_policy
Deletes the resource policy of the S3 Access Grants instance. The resource policy is used to manage cross-account access to your S3 Access Grants instance. By deleting the resource policy, you delete any cross-account permissions to your S3 Access Grants instance. Permissions You must have the s3:DeleteAccessGrantsInstanceResourcePolicy permission to use this operation.
DELETE FROM aws.s3control.access_grants_instance_resource_policies
WHERE `x-amz-account-id` = '{{ x-amz-account-id }}' --required
AND region = '{{ region }}' --required
;