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
DnsRecords
configurations -
Add, update, or delete
HealthCheckConfig
for a specified service
-
If you omit any existing
DnsRecords
orHealthCheckConfig
configurations from anUpdateService
request, the configurations are deleted from the service. -
If you omit an existing
HealthCheckCustomConfig
configuration from anUpdateService
request, the configuration is not deleted from the service.
May throw DuplicateRequest. May throw InvalidInput. May throw ServiceNotFound.
Parameter id
:
The ID of the service that you want to update.
Parameter service
:
A complex type that contains the new settings for the service.
Implementation
Future<UpdateServiceResponse> updateService({
required String id,
required ServiceChange service,
}) async {
ArgumentError.checkNotNull(id, 'id');
_s.validateStringLength(
'id',
id,
0,
64,
isRequired: true,
);
ArgumentError.checkNotNull(service, 'service');
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);
}