updateServiceAttributes method

Future<void> updateServiceAttributes({
  1. required Map<String, String> attributes,
  2. required String serviceId,
})

Submits a request to update a specified service to add service-level attributes.

May throw InvalidInput. May throw ServiceAttributesLimitExceededException. May throw ServiceNotFound.

Parameter attributes : A string map that contains attribute key-value pairs.

Parameter serviceId : The ID or Amazon Resource Name (ARN) of the service that you want to update. For services created in a namespace shared with your Amazon Web Services account, specify the service ARN.

Implementation

Future<void> updateServiceAttributes({
  required Map<String, String> attributes,
  required String serviceId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'Route53AutoNaming_v20170314.UpdateServiceAttributes'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'Attributes': attributes,
      'ServiceId': serviceId,
    },
  );
}