createAccessGrantsInstance method
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:CreateAccessGrantsInstancepermission 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, andsso:PutApplicationAuthenticationMethodpermissions.
Parameter accountId :
The Amazon Web Services account ID of the S3 Access Grants instance.
Parameter identityCenterArn :
If you would like to associate your S3 Access Grants instance with an
Amazon Web Services IAM Identity Center instance, use this field to pass
the 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.
Parameter tags :
The Amazon Web Services resource tags that you are adding to the S3 Access
Grants instance. Each tag is a label consisting of a user-defined key and
value. Tags can help you manage, identify, organize, search for, and
filter resources.
Implementation
Future<CreateAccessGrantsInstanceResult> createAccessGrantsInstance({
required String accountId,
String? identityCenterArn,
List<Tag>? tags,
}) async {
final headers = <String, String>{
'x-amz-account-id': accountId.toString(),
};
final $result = await _protocol.send(
method: 'POST',
requestUri: '/v20180820/accessgrantsinstance',
headers: headers,
payload: CreateAccessGrantsInstanceRequest(
accountId: accountId,
identityCenterArn: identityCenterArn,
tags: tags)
.toXml('CreateAccessGrantsInstanceRequest'),
exceptionFnMap: _exceptionFns,
);
return CreateAccessGrantsInstanceResult.fromXml($result.body);
}