updateCommand method
Update information about a command or mark a command for deprecation.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter commandId :
The unique identifier of the command to be updated.
Parameter deprecated :
A boolean that you can use to specify whether to deprecate a command.
Parameter description :
A short text description of the command.
Parameter displayName :
The new user-friendly name to use in the console for the command.
Implementation
Future<UpdateCommandResponse> updateCommand({
required String commandId,
bool? deprecated,
String? description,
String? displayName,
}) async {
final $payload = <String, dynamic>{
if (deprecated != null) 'deprecated': deprecated,
if (description != null) 'description': description,
if (displayName != null) 'displayName': displayName,
};
final response = await _protocol.send(
payload: $payload,
method: 'PATCH',
requestUri: '/commands/${Uri.encodeComponent(commandId)}',
exceptionFnMap: _exceptionFns,
);
return UpdateCommandResponse.fromJson(response);
}