Skip to main content

access_grants_instances

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

Overview

Nameaccess_grants_instances
TypeResource
Idaws.s3control.access_grants_instances

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
access_grants_instance_arnstringThe Amazon Resource Name (ARN) of the S3 Access Grants instance.
access_grants_instance_idstringThe ID of the S3 Access Grants instance. The ID is default. You can have one S3 Access Grants instance per Region per account.
created_atstringThe date and time when you created the S3 Access Grants instance.
identity_center_application_arnstringIf you associated your S3 Access Grants instance with an Amazon Web Services IAM Identity Center instance, this field returns the Amazon Resource Name (ARN) of the IAM Identity Center instance application; a subresource of the original Identity Center instance. S3 Access Grants creates this Identity Center application for the specific S3 Access Grants instance.
identity_center_arnstringIf you associated your S3 Access Grants instance with an Amazon Web Services IAM Identity Center instance, this field returns the Amazon Resource Name (ARN) of the IAM Identity Center instance application; a subresource of the original Identity Center instance. S3 Access Grants creates this Identity Center application for the specific S3 Access Grants instance.
identity_center_instance_arnstringThe Amazon Resource Name (ARN) of the Amazon Web Services IAM Identity Center instance that you are associating with your S3 Access Grants instance. An IAM Identity Center instance is your corporate identity directory that you added to the IAM Identity Center. You can use the ListInstances API operation to retrieve a list of your Identity Center instances and their ARNs.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_access_grants_instanceselectx-amz-account-id, regionRetrieves the S3 Access Grants instance for a Region in your account. Permissions You must have the s3:GetAccessGrantsInstance permission to use this operation. GetAccessGrantsInstance is not supported for cross-account access. You can only call the API from the account that owns the S3 Access Grants instance.
create_access_grants_instanceinsertx-amz-account-id, regionCreates an S3 Access Grants instance, which serves as a logical grouping for access grants. You can create one S3 Access Grants instance per Region per account. Permissions You must have the s3:CreateAccessGrantsInstance permission to use this operation. Additional Permissions To associate an IAM Identity Center instance with your S3 Access Grants instance, you must also have the sso:DescribeInstance, sso:CreateApplication, sso:PutApplicationGrant, and sso:PutApplicationAuthenticationMethod permissions.
delete_access_grants_instancedeletex-amz-account-id, regionDeletes your S3 Access Grants instance. You must first delete the access grants and locations before S3 Access Grants can delete the instance. See DeleteAccessGrant and DeleteAccessGrantsLocation. If you have associated an IAM Identity Center instance with your S3 Access Grants instance, you must first dissassociate the Identity Center instance from the S3 Access Grants instance before you can delete the S3 Access Grants instance. See AssociateAccessGrantsIdentityCenter and DissociateAccessGrantsIdentityCenter. Permissions You must have the s3:DeleteAccessGrantsInstance permission to use this operation.
list_access_grants_instancesexecx-amz-account-id, regionnextToken, maxResultsReturns a list of S3 Access Grants instances. An S3 Access Grants instance serves as a logical grouping for your individual access grants. You can only have one S3 Access Grants instance per Region per account. Permissions You must have the s3:ListAccessGrantsInstances 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.
maxResultsintegerThe maximum number of access grants that you would like returned in the List Access Grants response. If the results include the pagination token NextToken, make another call using the NextToken to determine if there are more results.
nextTokenstringA pagination token to request the next page of results. Pass this value into a subsequent List Access Grants Instances request in order to retrieve the next page of results.

SELECT examples

Retrieves the S3 Access Grants instance for a Region in your account. Permissions You must have the s3:GetAccessGrantsInstance permission to use this operation. GetAccessGrantsInstance is not supported for cross-account access. You can only call the API from the account that owns the S3 Access Grants instance.

SELECT
access_grants_instance_arn,
access_grants_instance_id,
created_at,
identity_center_application_arn,
identity_center_arn,
identity_center_instance_arn
FROM aws.s3control.access_grants_instances
WHERE `x-amz-account-id` = '{{ x-amz-account-id }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates an S3 Access Grants instance, which serves as a logical grouping for access grants. You can create one S3 Access Grants instance per Region per account. Permissions You must have the s3:CreateAccessGrantsInstance permission to use this operation. Additional Permissions To associate an IAM Identity Center instance with your S3 Access Grants instance, you must also have the sso:DescribeInstance, sso:CreateApplication, sso:PutApplicationGrant, and sso:PutApplicationAuthenticationMethod permissions.

INSERT INTO aws.s3control.access_grants_instances (
IdentityCenterArn,
Tags,
`x-amz-account-id`,
region
)
SELECT
'{{ IdentityCenterArn }}',
'{{ Tags }}',
'{{ x-amz-account-id }}',
'{{ region }}'
RETURNING
access_grants_instance_arn,
access_grants_instance_id,
created_at,
identity_center_application_arn,
identity_center_arn,
identity_center_instance_arn
;

DELETE examples

Deletes your S3 Access Grants instance. You must first delete the access grants and locations before S3 Access Grants can delete the instance. See DeleteAccessGrant and DeleteAccessGrantsLocation. If you have associated an IAM Identity Center instance with your S3 Access Grants instance, you must first dissassociate the Identity Center instance from the S3 Access Grants instance before you can delete the S3 Access Grants instance. See AssociateAccessGrantsIdentityCenter and DissociateAccessGrantsIdentityCenter. Permissions You must have the s3:DeleteAccessGrantsInstance permission to use this operation.

DELETE FROM aws.s3control.access_grants_instances
WHERE `x-amz-account-id` = '{{ x-amz-account-id }}' --required
AND region = '{{ region }}' --required
;

Lifecycle Methods

Returns a list of S3 Access Grants instances. An S3 Access Grants instance serves as a logical grouping for your individual access grants. You can only have one S3 Access Grants instance per Region per account. Permissions You must have the s3:ListAccessGrantsInstances permission to use this operation.

EXEC aws.s3control.access_grants_instances.list_access_grants_instances
@x-amz-account-id='{{ x-amz-account-id }}' --required,
@region='{{ region }}' --required,
@nextToken='{{ nextToken }}',
@maxResults='{{ maxResults }}'
;