getServiceAttributes method

Future<GetServiceAttributesResponse> getServiceAttributes({
  1. required String serviceId,
})

Returns the attributes associated with a specified service.

May throw InvalidInput. May throw ServiceNotFound.

Parameter serviceId : The ID or Amazon Resource Name (ARN) of the service that you want to get attributes for. For services created in a namespace 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.

Implementation

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

  return GetServiceAttributesResponse.fromJson(jsonResponse.body);
}