Class: Aws::ServiceDiscovery::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::ServiceDiscovery::Client
- Includes:
- ClientStubs
- Defined in:
- lib/aws-sdk-servicediscovery/client.rb
Overview
An API client for ServiceDiscovery. To construct a client, you need to configure a ‘:region` and `:credentials`.
client = Aws::ServiceDiscovery::Client.new(
region: region_name,
credentials: credentials,
# ...
)
For details on configuring region and credentials see the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
See #initialize for a full list of supported configuration options.
Class Attribute Summary collapse
- .identifier ⇒ Object readonly private
API Operations collapse
-
#create_http_namespace(params = {}) ⇒ Types::CreateHttpNamespaceResponse
Creates an HTTP namespace.
-
#create_private_dns_namespace(params = {}) ⇒ Types::CreatePrivateDnsNamespaceResponse
Creates a private namespace based on DNS, which is visible only inside a specified Amazon VPC.
-
#create_public_dns_namespace(params = {}) ⇒ Types::CreatePublicDnsNamespaceResponse
Creates a public namespace based on DNS, which is visible on the internet.
-
#create_service(params = {}) ⇒ Types::CreateServiceResponse
Creates a service.
-
#delete_namespace(params = {}) ⇒ Types::DeleteNamespaceResponse
Deletes a namespace from the current account.
-
#delete_service(params = {}) ⇒ Struct
Deletes a specified service.
-
#deregister_instance(params = {}) ⇒ Types::DeregisterInstanceResponse
Deletes the Amazon Route 53 DNS records and health check, if any, that Cloud Map created for the specified instance.
-
#discover_instances(params = {}) ⇒ Types::DiscoverInstancesResponse
Discovers registered instances for a specified namespace and service.
-
#discover_instances_revision(params = {}) ⇒ Types::DiscoverInstancesRevisionResponse
Discovers the increasing revision associated with an instance.
-
#get_instance(params = {}) ⇒ Types::GetInstanceResponse
Gets information about a specified instance.
-
#get_instances_health_status(params = {}) ⇒ Types::GetInstancesHealthStatusResponse
Gets the current health status (‘Healthy`, `Unhealthy`, or `Unknown`) of one or more instances that are associated with a specified service.
-
#get_namespace(params = {}) ⇒ Types::GetNamespaceResponse
Gets information about a namespace.
-
#get_operation(params = {}) ⇒ Types::GetOperationResponse
Gets information about any operation that returns an operation ID in the response, such as a ‘CreateHttpNamespace` request.
-
#get_service(params = {}) ⇒ Types::GetServiceResponse
Gets the settings for a specified service.
-
#list_instances(params = {}) ⇒ Types::ListInstancesResponse
Lists summary information about the instances that you registered by using a specified service.
-
#list_namespaces(params = {}) ⇒ Types::ListNamespacesResponse
Lists summary information about the namespaces that were created by the current Amazon Web Services account.
-
#list_operations(params = {}) ⇒ Types::ListOperationsResponse
Lists operations that match the criteria that you specify.
-
#list_services(params = {}) ⇒ Types::ListServicesResponse
Lists summary information for all the services that are associated with one or more namespaces.
-
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
Lists tags for the specified resource.
-
#register_instance(params = {}) ⇒ Types::RegisterInstanceResponse
Creates or updates one or more records and, optionally, creates a health check based on the settings in a specified service.
-
#tag_resource(params = {}) ⇒ Struct
Adds one or more tags to the specified resource.
-
#untag_resource(params = {}) ⇒ Struct
Removes one or more tags from the specified resource.
-
#update_http_namespace(params = {}) ⇒ Types::UpdateHttpNamespaceResponse
Updates an HTTP namespace.
-
#update_instance_custom_health_status(params = {}) ⇒ Struct
Submits a request to change the health status of a custom health check to healthy or unhealthy.
-
#update_private_dns_namespace(params = {}) ⇒ Types::UpdatePrivateDnsNamespaceResponse
Updates a private DNS namespace.
-
#update_public_dns_namespace(params = {}) ⇒ Types::UpdatePublicDnsNamespaceResponse
Updates a public DNS namespace.
-
#update_service(params = {}) ⇒ Types::UpdateServiceResponse
Submits a request to perform the following operations:.
Class Method Summary collapse
- .errors_module ⇒ Object private
Instance Method Summary collapse
- #build_request(operation_name, params = {}) ⇒ Object private
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
- #waiter_names ⇒ Object deprecated private Deprecated.
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
441 442 443 |
# File 'lib/aws-sdk-servicediscovery/client.rb', line 441 def initialize(*args) super end |
Class Attribute Details
.identifier ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
2837 2838 2839 |
# File 'lib/aws-sdk-servicediscovery/client.rb', line 2837 def identifier @identifier end |
Class Method Details
.errors_module ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
2840 2841 2842 |
# File 'lib/aws-sdk-servicediscovery/client.rb', line 2840 def errors_module Errors end |
Instance Method Details
#build_request(operation_name, params = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 |
# File 'lib/aws-sdk-servicediscovery/client.rb', line 2810 def build_request(operation_name, params = {}) handlers = @handlers.for(operation_name) tracer = config.telemetry_provider.tracer_provider.tracer( Aws::Telemetry.module_to_tracer_name('Aws::ServiceDiscovery') ) context = Seahorse::Client::RequestContext.new( operation_name: operation_name, operation: config.api.operation(operation_name), client: self, params: params, config: config, tracer: tracer ) context[:gem_name] = 'aws-sdk-servicediscovery' context[:gem_version] = '1.70.0' Seahorse::Client::Request.new(handlers, context) end |
#create_http_namespace(params = {}) ⇒ Types::CreateHttpNamespaceResponse
Creates an HTTP namespace. Service instances registered using an HTTP namespace can be discovered using a ‘DiscoverInstances` request but can’t be discovered using DNS.
For the current quota on the number of namespaces that you can create using the same Amazon Web Services account, see [Cloud Map quotas] in the *Cloud Map Developer Guide*.
[1]: docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html
521 522 523 524 |
# File 'lib/aws-sdk-servicediscovery/client.rb', line 521 def create_http_namespace(params = {}, = {}) req = build_request(:create_http_namespace, params) req.send_request() end |
#create_private_dns_namespace(params = {}) ⇒ Types::CreatePrivateDnsNamespaceResponse
Creates a private namespace based on DNS, which is 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 service `backend`, the resulting DNS name for the service is `backend.example.com`. Service instances that are registered using a private DNS namespace can be discovered using either a `DiscoverInstances` request or using DNS. For the current quota on the number of namespaces that you can create using the same Amazon Web Services account, see [Cloud Map quotas] in the *Cloud Map Developer Guide*.
[1]: docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html
620 621 622 623 |
# File 'lib/aws-sdk-servicediscovery/client.rb', line 620 def create_private_dns_namespace(params = {}, = {}) req = build_request(:create_private_dns_namespace, params) req.send_request() end |
#create_public_dns_namespace(params = {}) ⇒ Types::CreatePublicDnsNamespaceResponse
Creates a public namespace based on DNS, which is visible on the internet. The namespace defines your service naming scheme. For example, if you name your namespace ‘example.com` and name your service `backend`, the resulting DNS name for the service is `backend.example.com`. You can discover instances that were registered with a public DNS namespace by using either a `DiscoverInstances` request or using DNS. For the current quota on the number of namespaces that you can create using the same Amazon Web Services account, see [Cloud Map quotas] in the *Cloud Map Developer Guide*.
The ‘CreatePublicDnsNamespace` API operation is not supported in the Amazon Web Services GovCloud (US) Regions.
[1]: docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html
719 720 721 722 |
# File 'lib/aws-sdk-servicediscovery/client.rb', line 719 def create_public_dns_namespace(params = {}, = {}) req = build_request(:create_public_dns_namespace, params) req.send_request() end |
#create_service(params = {}) ⇒ Types::CreateServiceResponse
Creates a service. This action defines the configuration for the following entities:
-
For public and private DNS namespaces, one of the following combinations of DNS records in Amazon Route 53:
-
‘A`
-
‘AAAA`
-
‘A` and `AAAA`
-
‘SRV`
-
‘CNAME`
-
-
Optionally, a health check
After you create the service, you can submit a [RegisterInstance] request, and Cloud Map uses the values in the configuration to create the specified entities.
For the current quota on the number of instances that you can register using the same namespace and using the same service, see [Cloud Map quotas] in the *Cloud Map Developer Guide*.
[1]: docs.aws.amazon.com/cloud-map/latest/api/API_RegisterInstance.html [2]: docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html
954 955 956 957 |
# File 'lib/aws-sdk-servicediscovery/client.rb', line 954 def create_service(params = {}, = {}) req = build_request(:create_service, params) req.send_request() end |
#delete_namespace(params = {}) ⇒ Types::DeleteNamespaceResponse
Deletes a namespace from the current account. If the namespace still contains one or more services, the request fails.
997 998 999 1000 |
# File 'lib/aws-sdk-servicediscovery/client.rb', line 997 def delete_namespace(params = {}, = {}) req = build_request(:delete_namespace, params) req.send_request() end |
#delete_service(params = {}) ⇒ Struct
Deletes a specified service. If the service still contains one or more registered instances, the request fails.
1033 1034 1035 1036 |
# File 'lib/aws-sdk-servicediscovery/client.rb', line 1033 def delete_service(params = {}, = {}) req = build_request(:delete_service, params) req.send_request() end |
#deregister_instance(params = {}) ⇒ Types::DeregisterInstanceResponse
Deletes the Amazon Route 53 DNS records and health check, if any, that Cloud Map created for the specified instance.
1086 1087 1088 1089 |
# File 'lib/aws-sdk-servicediscovery/client.rb', line 1086 def deregister_instance(params = {}, = {}) req = build_request(:deregister_instance, params) req.send_request() end |
#discover_instances(params = {}) ⇒ Types::DiscoverInstancesResponse
Discovers registered instances for a specified namespace and service. You can use ‘DiscoverInstances` to discover instances for any type of namespace. `DiscoverInstances` returns a randomized list of instances allowing customers to distribute traffic evenly across instances. For public and private DNS namespaces, you can also use DNS queries to discover instances.
1213 1214 1215 1216 |
# File 'lib/aws-sdk-servicediscovery/client.rb', line 1213 def discover_instances(params = {}, = {}) req = build_request(:discover_instances, params) req.send_request() end |
#discover_instances_revision(params = {}) ⇒ Types::DiscoverInstancesRevisionResponse
Discovers the increasing revision associated with an instance.
1262 1263 1264 1265 |
# File 'lib/aws-sdk-servicediscovery/client.rb', line 1262 def discover_instances_revision(params = {}, = {}) req = build_request(:discover_instances_revision, params) req.send_request() end |
#get_instance(params = {}) ⇒ Types::GetInstanceResponse
Gets information about a specified instance.
1321 1322 1323 1324 |
# File 'lib/aws-sdk-servicediscovery/client.rb', line 1321 def get_instance(params = {}, = {}) req = build_request(:get_instance, params) req.send_request() end |
#get_instances_health_status(params = {}) ⇒ Types::GetInstancesHealthStatusResponse
Gets the current health status (‘Healthy`, `Unhealthy`, or `Unknown`) of one or more instances that are associated with a specified service.
<note markdown=“1”> There’s a brief delay between when you register an instance and when the health status for the instance is available.
</note>
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1410 1411 1412 1413 |
# File 'lib/aws-sdk-servicediscovery/client.rb', line 1410 def get_instances_health_status(params = {}, = {}) req = build_request(:get_instances_health_status, params) req.send_request() end |
#get_namespace(params = {}) ⇒ Types::GetNamespaceResponse
Gets information about a namespace.
1477 1478 1479 1480 |
# File 'lib/aws-sdk-servicediscovery/client.rb', line 1477 def get_namespace(params = {}, = {}) req = build_request(:get_namespace, params) req.send_request() end |
#get_operation(params = {}) ⇒ Types::GetOperationResponse
Gets information about any operation that returns an operation ID in the response, such as a ‘CreateHttpNamespace` request.
<note markdown=“1”> To get a list of operations that match specified criteria, see [ListOperations].
</note>
[1]: docs.aws.amazon.com/cloud-map/latest/api/API_ListOperations.html
1546 1547 1548 1549 |
# File 'lib/aws-sdk-servicediscovery/client.rb', line 1546 def get_operation(params = {}, = {}) req = build_request(:get_operation, params) req.send_request() end |
#get_service(params = {}) ⇒ Types::GetServiceResponse
Gets the settings for a specified service.
1618 1619 1620 1621 |
# File 'lib/aws-sdk-servicediscovery/client.rb', line 1618 def get_service(params = {}, = {}) req = build_request(:get_service, params) req.send_request() end |
#list_instances(params = {}) ⇒ Types::ListInstancesResponse
Lists summary information about the instances that you registered by using a specified service.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1691 1692 1693 1694 |
# File 'lib/aws-sdk-servicediscovery/client.rb', line 1691 def list_instances(params = {}, = {}) req = build_request(:list_instances, params) req.send_request() end |
#list_namespaces(params = {}) ⇒ Types::ListNamespacesResponse
Lists summary information about the namespaces that were created by the current Amazon Web Services account.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1825 1826 1827 1828 |
# File 'lib/aws-sdk-servicediscovery/client.rb', line 1825 def list_namespaces(params = {}, = {}) req = build_request(:list_namespaces, params) req.send_request() end |
#list_operations(params = {}) ⇒ Types::ListOperationsResponse
Lists operations that match the criteria that you specify.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1928 1929 1930 1931 |
# File 'lib/aws-sdk-servicediscovery/client.rb', line 1928 def list_operations(params = {}, = {}) req = build_request(:list_operations, params) req.send_request() end |
#list_services(params = {}) ⇒ Types::ListServicesResponse
Lists summary information for all the services that are associated with one or more namespaces.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
2038 2039 2040 2041 |
# File 'lib/aws-sdk-servicediscovery/client.rb', line 2038 def list_services(params = {}, = {}) req = build_request(:list_services, params) req.send_request() end |
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
Lists tags for the specified resource.
2092 2093 2094 2095 |
# File 'lib/aws-sdk-servicediscovery/client.rb', line 2092 def (params = {}, = {}) req = build_request(:list_tags_for_resource, params) req.send_request() end |
#register_instance(params = {}) ⇒ Types::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:
-
For each DNS record that you define in the service that’s specified by ‘ServiceId`, a record is created or updated in the hosted zone that’s associated with the corresponding namespace.
-
If the service includes ‘HealthCheckConfig`, a health check is created based on the settings in the health check configuration.
-
The health check, if any, is associated with each of the new or updated records.
One ‘RegisterInstance` request must complete before you can submit another request and specify the same service ID and instance ID.
For more information, see [CreateService].
When Cloud Map receives a DNS query for the specified DNS name, it returns the applicable value:
-
**If the health check is healthy**: returns all the records
-
**If the health check is unhealthy**: returns the applicable value for the last healthy instance
-
**If you didn’t specify a health check configuration**: returns all the records
For the current quota on the number of instances that you can register using the same namespace and using the same service, see [Cloud Map quotas] in the *Cloud Map Developer Guide*.
[1]: docs.aws.amazon.com/cloud-map/latest/api/API_CreateService.html [2]: docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html
2347 2348 2349 2350 |
# File 'lib/aws-sdk-servicediscovery/client.rb', line 2347 def register_instance(params = {}, = {}) req = build_request(:register_instance, params) req.send_request() end |
#tag_resource(params = {}) ⇒ Struct
Adds one or more tags to the specified resource.
2404 2405 2406 2407 |
# File 'lib/aws-sdk-servicediscovery/client.rb', line 2404 def tag_resource(params = {}, = {}) req = build_request(:tag_resource, params) req.send_request() end |
#untag_resource(params = {}) ⇒ Struct
Removes one or more tags from the specified resource.
2448 2449 2450 2451 |
# File 'lib/aws-sdk-servicediscovery/client.rb', line 2448 def untag_resource(params = {}, = {}) req = build_request(:untag_resource, params) req.send_request() end |
#update_http_namespace(params = {}) ⇒ Types::UpdateHttpNamespaceResponse
Updates an HTTP namespace.
2509 2510 2511 2512 |
# File 'lib/aws-sdk-servicediscovery/client.rb', line 2509 def update_http_namespace(params = {}, = {}) req = build_request(:update_http_namespace, params) req.send_request() end |
#update_instance_custom_health_status(params = {}) ⇒ Struct
Submits a request to change the health status of a custom health check to healthy or unhealthy.
You can use ‘UpdateInstanceCustomHealthStatus` to change the status only for custom health checks, which you define using `HealthCheckCustomConfig` when you create a service. You can’t use it to change the status for Route 53 health checks, which you define using ‘HealthCheckConfig`.
For more information, see [HealthCheckCustomConfig].
[1]: docs.aws.amazon.com/cloud-map/latest/api/API_HealthCheckCustomConfig.html
2565 2566 2567 2568 |
# File 'lib/aws-sdk-servicediscovery/client.rb', line 2565 def update_instance_custom_health_status(params = {}, = {}) req = build_request(:update_instance_custom_health_status, params) req.send_request() end |
#update_private_dns_namespace(params = {}) ⇒ Types::UpdatePrivateDnsNamespaceResponse
Updates a private DNS namespace.
2651 2652 2653 2654 |
# File 'lib/aws-sdk-servicediscovery/client.rb', line 2651 def update_private_dns_namespace(params = {}, = {}) req = build_request(:update_private_dns_namespace, params) req.send_request() end |
#update_public_dns_namespace(params = {}) ⇒ Types::UpdatePublicDnsNamespaceResponse
Updates a public DNS namespace.
2702 2703 2704 2705 |
# File 'lib/aws-sdk-servicediscovery/client.rb', line 2702 def update_public_dns_namespace(params = {}, = {}) req = build_request(:update_public_dns_namespace, params) req.send_request() end |
#update_service(params = {}) ⇒ Types::UpdateServiceResponse
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
<note markdown=“1”> You can’t add, update, or delete a ‘HealthCheckCustomConfig` configuration.
</note>
For public and private DNS namespaces, note the following:
-
If you omit any existing ‘DnsRecords` or `HealthCheckConfig` configurations from an `UpdateService` request, the configurations are deleted from the service.
-
If you omit an existing ‘HealthCheckCustomConfig` configuration from an `UpdateService` request, the configuration isn’t deleted from the service.
When you update settings for a service, Cloud Map also updates the corresponding settings in all the records and health checks that were created by using the specified service.
2801 2802 2803 2804 |
# File 'lib/aws-sdk-servicediscovery/client.rb', line 2801 def update_service(params = {}, = {}) req = build_request(:update_service, params) req.send_request() end |
#waiter_names ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
2830 2831 2832 |
# File 'lib/aws-sdk-servicediscovery/client.rb', line 2830 def waiter_names [] end |