getPublicAccessBlock method
Retrieves the
PublicAccessBlock configuration for an Amazon
Web Services account. This operation returns the effective account-level
configuration, which may inherit from organization-level policies. For
more information, see
Using Amazon S3 block public access.
Related actions include:
May throw NoSuchPublicAccessBlockConfiguration.
Parameter accountId :
The account ID for the Amazon Web Services account whose
PublicAccessBlock configuration you want to retrieve.
Implementation
Future<GetPublicAccessBlockOutput> getPublicAccessBlock({
required String accountId,
}) async {
final headers = <String, String>{
'x-amz-account-id': accountId.toString(),
};
final $result = await _protocol.sendRaw(
method: 'GET',
requestUri: '/v20180820/configuration/publicAccessBlock',
headers: headers,
exceptionFnMap: _exceptionFns,
);
final $elem = await _s.xmlFromResponse($result);
return GetPublicAccessBlockOutput(
publicAccessBlockConfiguration:
PublicAccessBlockConfiguration.fromXml($elem),
);
}