updateService method
Future<UpdateServiceResponse>
updateService({
- required String id,
- required ServiceChange service,
Submits a request to perform the following operations:
-
Update the TTL setting for existing
DnsRecordsconfigurations -
Add, update, or delete
HealthCheckConfigfor a specified service
-
If you omit any existing
DnsRecordsorHealthCheckConfigconfigurations from anUpdateServicerequest, the configurations are deleted from the service. -
If you omit an existing
HealthCheckCustomConfigconfiguration from anUpdateServicerequest, the configuration isn't deleted from the service.
May throw DuplicateRequest.
May throw InvalidInput.
May throw ServiceNotFound.
Parameter id :
The ID or Amazon Resource Name (ARN) of the service that you want to
update. If the namespace associated with the service is shared with your
Amazon Web Services account, specify the service ARN. For more information
about shared namespaces, see Cross-account
Cloud Map namespace sharing in the Cloud Map Developer Guide
Parameter service :
A complex type that contains the new settings for the service. You can
specify a maximum of 30 attributes (key-value pairs).
Implementation
Future<UpdateServiceResponse> updateService({
required String id,
required ServiceChange service,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'Route53AutoNaming_v20170314.UpdateService'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'Id': id,
'Service': service,
},
);
return UpdateServiceResponse.fromJson(jsonResponse.body);
}