discoverInstancesRevision method

Future<DiscoverInstancesRevisionResponse> discoverInstancesRevision({
  1. required String namespaceName,
  2. required String serviceName,
  3. String? ownerAccount,
})

Discovers the increasing revision associated with an instance.

May throw InvalidInput. May throw NamespaceNotFound. May throw RequestLimitExceeded. May throw ServiceNotFound.

Parameter namespaceName : The HttpName name of the namespace. The HttpName is found in the HttpProperties member of the Properties member of the namespace.

Parameter serviceName : The name of the service that you specified when you registered the instance.

Parameter ownerAccount : The ID of the Amazon Web Services account that owns the namespace associated with the instance, as specified in the namespace ResourceOwner field. For instances associated with namespaces that are shared with your account, you must specify an OwnerAccount. For more information about shared namespaces, see Cross-account Cloud Map namespace sharing in the Cloud Map Developer Guide.

Implementation

Future<DiscoverInstancesRevisionResponse> discoverInstancesRevision({
  required String namespaceName,
  required String serviceName,
  String? ownerAccount,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'Route53AutoNaming_v20170314.DiscoverInstancesRevision'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'NamespaceName': namespaceName,
      'ServiceName': serviceName,
      if (ownerAccount != null) 'OwnerAccount': ownerAccount,
    },
  );

  return DiscoverInstancesRevisionResponse.fromJson(jsonResponse.body);
}