putAccessPointScope method
Creates or replaces the access point scope for a directory bucket. You can
use the access point scope to restrict access to specific prefixes, API
operations, or a combination of both.
To use this operation, you must have the permission to perform the
s3express:PutAccessPointScope action.
For information about REST API errors, see REST error responses.
Parameter accountId :
The Amazon Web Services account ID that owns the access point with scope
that you want to create or replace.
Parameter name :
The name of the access point with the scope that you want to create or
replace.
Parameter scope :
Object prefixes, API operations, or a combination of both.
Implementation
Future<void> putAccessPointScope({
required String accountId,
required String name,
required Scope scope,
}) async {
final headers = <String, String>{
'x-amz-account-id': accountId.toString(),
};
await _protocol.send(
method: 'PUT',
requestUri: '/v20180820/accesspoint/scope',
headers: headers,
payload: PutAccessPointScopeRequest(
accountId: accountId, name: name, scope: scope)
.toXml('PutAccessPointScopeRequest'),
endpoint: _resolveEndpoint(
requiresAccountId: true,
useS3ExpressControlEndpoint: true,
accountId: accountId,
accessPointName: name,
),
exceptionFnMap: _exceptionFns,
);
}