updateService method
Edit a service description or use a spec to add and delete service
instances.
Use the description parameter to modify the description.
Edit the spec parameter to add or delete instances.
For more information about components, see Proton components in the Proton User Guide.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter name :
The name of the service to edit.
Parameter description :
The edited service description.
Parameter spec :
Lists the service instances to add and the existing service instances to
remain. Omit the existing service instances to delete from the list.
Don't include edits to the existing service instances or pipeline.
For more information, see Edit
a service in the Proton User Guide.
Implementation
Future<UpdateServiceOutput> updateService({
required String name,
String? description,
String? spec,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'AwsProton20200720.UpdateService'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'name': name,
if (description != null) 'description': description,
if (spec != null) 'spec': spec,
},
);
return UpdateServiceOutput.fromJson(jsonResponse.body);
}