putOutcome method
Creates or updates an outcome.
May throw ValidationException. May throw InternalServerException. May throw ThrottlingException. May throw AccessDeniedException.
Parameter name
:
The name of the outcome.
Parameter description
:
The outcome description.
Parameter tags
:
A collection of key and value pairs.
Implementation
Future<void> putOutcome({
required String name,
String? description,
List<Tag>? tags,
}) async {
ArgumentError.checkNotNull(name, 'name');
_s.validateStringLength(
'name',
name,
1,
64,
isRequired: true,
);
_s.validateStringLength(
'description',
description,
1,
128,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSHawksNestServiceFacade.PutOutcome'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'name': name,
if (description != null) 'description': description,
if (tags != null) 'tags': tags,
},
);
}