Skip to main content

access_grants_instance_resource_policies

Creates, updates, deletes, gets or lists an access_grants_instance_resource_policies resource.

Overview

Nameaccess_grants_instance_resource_policies
TypeResource
Idaws.s3control.access_grants_instance_resource_policies

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
created_atstringThe date and time when you created the S3 Access Grants instance resource policy.
organizationstringThe Organization of the resource policy of the S3 Access Grants instance.
policystringThe resource policy of the S3 Access Grants instance.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_access_grants_instance_resource_policyselectx-amz-account-id, regionReturns 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_policyreplacex-amz-account-id, regionUpdates 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_policydeletex-amz-account-id, regionDeletes 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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)
x-amz-account-idstringThe Amazon Web Services account ID of the S3 Access Grants instance.

SELECT examples

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

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

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
;