ServiceDiscovery class
AWS Cloud Map lets you configure public DNS, private DNS, or HTTP namespaces that your microservice applications run in. When an instance of the service becomes available, you can call the AWS Cloud Map API to register the instance with AWS Cloud Map. For public or private DNS namespaces, AWS Cloud Map automatically creates DNS records and an optional health check. Clients that submit public or private DNS queries, or HTTP requests, for the service receive an answer that contains up to eight healthy records.
Constructors
- ServiceDiscovery({required String region, AwsClientCredentials? credentials, AwsClientCredentialsProvider? credentialsProvider, Client? client, String? endpointUrl})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
close(
) → void - Closes the internal HTTP client if none was provided at creation. If a client was passed as a constructor argument, this becomes a noop.
-
createHttpNamespace(
{required String name, String? creatorRequestId, String? description, List< Tag> ? tags}) → Future<CreateHttpNamespaceResponse> -
Creates an HTTP namespace. Service instances that you register using an
HTTP namespace can be discovered using a
DiscoverInstances
request but can't be discovered using DNS. -
createPrivateDnsNamespace(
{required String name, required String vpc, String? creatorRequestId, String? description, List< Tag> ? tags}) → Future<CreatePrivateDnsNamespaceResponse> -
Creates a private namespace based on DNS, which will be visible only
inside a specified Amazon VPC. The namespace defines your service naming
scheme. For example, if you name your namespace
example.com
and name your servicebackend
, the resulting DNS name for the service will bebackend.example.com
. For the current quota on the number of namespaces that you can create using the same AWS account, see AWS Cloud Map Limits in the AWS Cloud Map Developer Guide. -
createPublicDnsNamespace(
{required String name, String? creatorRequestId, String? description, List< Tag> ? tags}) → Future<CreatePublicDnsNamespaceResponse> -
Creates a public namespace based on DNS, which will be visible on the
internet. The namespace defines your service naming scheme. For example,
if you name your namespace
example.com
and name your servicebackend
, the resulting DNS name for the service will bebackend.example.com
. For the current quota on the number of namespaces that you can create using the same AWS account, see AWS Cloud Map Limits in the AWS Cloud Map Developer Guide. -
createService(
{required String name, String? creatorRequestId, String? description, DnsConfig? dnsConfig, HealthCheckConfig? healthCheckConfig, HealthCheckCustomConfig? healthCheckCustomConfig, String? namespaceId, List< Tag> ? tags}) → Future<CreateServiceResponse> - Creates a service, which defines the configuration for the following entities:
-
deleteNamespace(
{required String id}) → Future< DeleteNamespaceResponse> - Deletes a namespace from the current account. If the namespace still contains one or more services, the request fails.
-
deleteService(
{required String id}) → Future< void> - Deletes a specified service. If the service still contains one or more registered instances, the request fails.
-
deregisterInstance(
{required String instanceId, required String serviceId}) → Future< DeregisterInstanceResponse> - Deletes the Amazon Route 53 DNS records and health check, if any, that AWS Cloud Map created for the specified instance.
-
discoverInstances(
{required String namespaceName, required String serviceName, HealthStatusFilter? healthStatus, int? maxResults, Map< String, String> ? optionalParameters, Map<String, String> ? queryParameters}) → Future<DiscoverInstancesResponse> -
Discovers registered instances for a specified namespace and service. You
can use
DiscoverInstances
to discover instances for any type of namespace. For public and private DNS namespaces, you can also use DNS queries to discover instances. -
getInstance(
{required String instanceId, required String serviceId}) → Future< GetInstanceResponse> - Gets information about a specified instance.
-
getInstancesHealthStatus(
{required String serviceId, List< String> ? instances, int? maxResults, String? nextToken}) → Future<GetInstancesHealthStatusResponse> -
Gets the current health status (
Healthy
,Unhealthy
, orUnknown
) of one or more instances that are associated with a specified service. -
getNamespace(
{required String id}) → Future< GetNamespaceResponse> - Gets information about a namespace.
-
getOperation(
{required String operationId}) → Future< GetOperationResponse> -
Gets information about any operation that returns an operation ID in the
response, such as a
CreateService
request. -
getService(
{required String id}) → Future< GetServiceResponse> - Gets the settings for a specified service.
-
listInstances(
{required String serviceId, int? maxResults, String? nextToken}) → Future< ListInstancesResponse> - Lists summary information about the instances that you registered by using a specified service.
-
listNamespaces(
{List< NamespaceFilter> ? filters, int? maxResults, String? nextToken}) → Future<ListNamespacesResponse> - Lists summary information about the namespaces that were created by the current AWS account.
-
listOperations(
{List< OperationFilter> ? filters, int? maxResults, String? nextToken}) → Future<ListOperationsResponse> - Lists operations that match the criteria that you specify.
-
listServices(
{List< ServiceFilter> ? filters, int? maxResults, String? nextToken}) → Future<ListServicesResponse> - Lists summary information for all the services that are associated with one or more specified namespaces.
-
listTagsForResource(
{required String resourceARN}) → Future< ListTagsForResourceResponse> - Lists tags for the specified resource.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerInstance(
{required Map< String, String> attributes, required String instanceId, required String serviceId, String? creatorRequestId}) → Future<RegisterInstanceResponse> -
Creates or updates one or more records and, optionally, creates a health
check based on the settings in a specified service. When you submit a
RegisterInstance
request, the following occurs: -
tagResource(
{required String resourceARN, required List< Tag> tags}) → Future<void> - Adds one or more tags to the specified resource.
-
toString(
) → String -
A string representation of this object.
inherited
-
untagResource(
{required String resourceARN, required List< String> tagKeys}) → Future<void> - Removes one or more tags from the specified resource.
-
updateInstanceCustomHealthStatus(
{required String instanceId, required String serviceId, required CustomHealthStatus status}) → Future< void> - Submits a request to change the health status of a custom health check to healthy or unhealthy.
-
updateService(
{required String id, required ServiceChange service}) → Future< UpdateServiceResponse> - Submits a request to perform the following operations:
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited