updateFramework method
Updates the specified framework.
May throw AlreadyExistsException.
May throw ConflictException.
May throw InvalidParameterValueException.
May throw LimitExceededException.
May throw MissingParameterValueException.
May throw ResourceNotFoundException.
May throw ServiceUnavailableException.
Parameter frameworkName :
The unique name of a framework. This name is between 1 and 256 characters,
starting with a letter, and consisting of letters (a-z, A-Z), numbers
(0-9), and underscores (_).
Parameter frameworkControls :
The controls that make up the framework. Each control in the list has a
name, input parameters, and scope.
Parameter frameworkDescription :
An optional description of the framework with a maximum 1,024 characters.
Parameter idempotencyToken :
A customer-chosen string that you can use to distinguish between otherwise
identical calls to UpdateFrameworkInput. Retrying a
successful request with the same idempotency token results in a success
message with no action taken.
Implementation
Future<UpdateFrameworkOutput> updateFramework({
required String frameworkName,
List<FrameworkControl>? frameworkControls,
String? frameworkDescription,
String? idempotencyToken,
}) async {
final $payload = <String, dynamic>{
if (frameworkControls != null) 'FrameworkControls': frameworkControls,
if (frameworkDescription != null)
'FrameworkDescription': frameworkDescription,
'IdempotencyToken': idempotencyToken ?? _s.generateIdempotencyToken(),
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri: '/audit/frameworks/${Uri.encodeComponent(frameworkName)}',
exceptionFnMap: _exceptionFns,
);
return UpdateFrameworkOutput.fromJson(response);
}