getResourcePolicy method
Gets a resource policy that is identified by its resource ARN.
May throw ResourceNotFoundException. May throw InvalidInputException.
Parameter resourceArn
:
The ARN of the resource that is associated with the resource policy.
Implementation
Future<GetResourcePolicyOutput> getResourcePolicy({
required String resourceArn,
}) async {
ArgumentError.checkNotNull(resourceArn, 'resourceArn');
_s.validateStringLength(
'resourceArn',
resourceArn,
1,
1152921504606846976,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'CodeBuild_20161006.GetResourcePolicy'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'resourceArn': resourceArn,
},
);
return GetResourcePolicyOutput.fromJson(jsonResponse.body);
}