putResourcePolicy method
Adds a resource policy for a Bedrock resource.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ThrottlingException.
May throw ValidationException.
Parameter resourceArn :
The ARN of the Bedrock resource to which this resource policy applies.
Parameter resourcePolicy :
The JSON string representing the Bedrock resource policy.
Implementation
Future<PutResourcePolicyResponse> putResourcePolicy({
required String resourceArn,
required String resourcePolicy,
}) async {
final $payload = <String, dynamic>{
'resourceArn': resourceArn,
'resourcePolicy': resourcePolicy,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/resource-policy',
exceptionFnMap: _exceptionFns,
);
return PutResourcePolicyResponse.fromJson(response);
}