ServiceDiscoveryClient#
Index > ServiceDiscovery > ServiceDiscoveryClient
Auto-generated documentation for ServiceDiscovery type annotations stubs module mypy-boto3-servicediscovery.
ServiceDiscoveryClient#
Type annotations and code completion for boto3.client("servicediscovery")
.
boto3 documentation
# ServiceDiscoveryClient usage example
from boto3.session import Session
from mypy_boto3_servicediscovery.client import ServiceDiscoveryClient
def get_servicediscovery_client() -> ServiceDiscoveryClient:
return Session().client("servicediscovery")
Exceptions#
boto3
client exceptions are generated in runtime.
This class provides code completion for boto3.client("servicediscovery").exceptions
structure.
# Exceptions.exceptions usage example
client = boto3.client("servicediscovery")
try:
do_something(client)
except (
client.exceptions.ClientError,
client.exceptions.CustomHealthNotFound,
client.exceptions.DuplicateRequest,
client.exceptions.InstanceNotFound,
client.exceptions.InvalidInput,
client.exceptions.NamespaceAlreadyExists,
client.exceptions.NamespaceNotFound,
client.exceptions.OperationNotFound,
client.exceptions.RequestLimitExceeded,
client.exceptions.ResourceInUse,
client.exceptions.ResourceLimitExceeded,
client.exceptions.ResourceNotFoundException,
client.exceptions.ServiceAlreadyExists,
client.exceptions.ServiceNotFound,
client.exceptions.TooManyTagsException,
) as e:
print(e)
# Exceptions.exceptions type checking example
from mypy_boto3_servicediscovery.client import Exceptions
def handle_error(exc: Exceptions.ClientError) -> None:
...
Methods#
can_paginate#
Check if an operation can be paginated.
Type annotations and code completion for boto3.client("servicediscovery").can_paginate
method.
boto3 documentation
# can_paginate method definition
def can_paginate(
self,
operation_name: str,
) -> bool:
...
close#
Closes underlying endpoint connections.
Type annotations and code completion for boto3.client("servicediscovery").close
method.
boto3 documentation
# close method definition
def close(
self,
) -> None:
...
create_http_namespace#
Creates an HTTP namespace.
Type annotations and code completion for boto3.client("servicediscovery").create_http_namespace
method.
boto3 documentation
# create_http_namespace method definition
def create_http_namespace(
self,
*,
Name: str,
CreatorRequestId: str = ...,
Description: str = ...,
Tags: Sequence[TagTypeDef] = ..., # (1)
) -> CreateHttpNamespaceResponseTypeDef: # (2)
...
# create_http_namespace method usage example with argument unpacking
kwargs: CreateHttpNamespaceRequestRequestTypeDef = { # (1)
"Name": ...,
}
parent.create_http_namespace(**kwargs)
create_private_dns_namespace#
Creates a private namespace based on DNS, which is visible only inside a specified Amazon VPC.
Type annotations and code completion for boto3.client("servicediscovery").create_private_dns_namespace
method.
boto3 documentation
# create_private_dns_namespace method definition
def create_private_dns_namespace(
self,
*,
Name: str,
Vpc: str,
CreatorRequestId: str = ...,
Description: str = ...,
Tags: Sequence[TagTypeDef] = ..., # (1)
Properties: PrivateDnsNamespacePropertiesTypeDef = ..., # (2)
) -> CreatePrivateDnsNamespaceResponseTypeDef: # (3)
...
- See TagTypeDef
- See PrivateDnsNamespacePropertiesTypeDef
- See CreatePrivateDnsNamespaceResponseTypeDef
# create_private_dns_namespace method usage example with argument unpacking
kwargs: CreatePrivateDnsNamespaceRequestRequestTypeDef = { # (1)
"Name": ...,
"Vpc": ...,
}
parent.create_private_dns_namespace(**kwargs)
create_public_dns_namespace#
Creates a public namespace based on DNS, which is visible on the internet.
Type annotations and code completion for boto3.client("servicediscovery").create_public_dns_namespace
method.
boto3 documentation
# create_public_dns_namespace method definition
def create_public_dns_namespace(
self,
*,
Name: str,
CreatorRequestId: str = ...,
Description: str = ...,
Tags: Sequence[TagTypeDef] = ..., # (1)
Properties: PublicDnsNamespacePropertiesTypeDef = ..., # (2)
) -> CreatePublicDnsNamespaceResponseTypeDef: # (3)
...
# create_public_dns_namespace method usage example with argument unpacking
kwargs: CreatePublicDnsNamespaceRequestRequestTypeDef = { # (1)
"Name": ...,
}
parent.create_public_dns_namespace(**kwargs)
create_service#
Creates a service.
Type annotations and code completion for boto3.client("servicediscovery").create_service
method.
boto3 documentation
# create_service method definition
def create_service(
self,
*,
Name: str,
NamespaceId: str = ...,
CreatorRequestId: str = ...,
Description: str = ...,
DnsConfig: DnsConfigTypeDef = ..., # (1)
HealthCheckConfig: HealthCheckConfigTypeDef = ..., # (2)
HealthCheckCustomConfig: HealthCheckCustomConfigTypeDef = ..., # (3)
Tags: Sequence[TagTypeDef] = ..., # (4)
Type: ServiceTypeOptionType = ..., # (5)
) -> CreateServiceResponseTypeDef: # (6)
...
- See DnsConfigTypeDef
- See HealthCheckConfigTypeDef
- See HealthCheckCustomConfigTypeDef
- See TagTypeDef
- See ServiceTypeOptionType
- See CreateServiceResponseTypeDef
# create_service method usage example with argument unpacking
kwargs: CreateServiceRequestRequestTypeDef = { # (1)
"Name": ...,
}
parent.create_service(**kwargs)
delete_namespace#
Deletes a namespace from the current account.
Type annotations and code completion for boto3.client("servicediscovery").delete_namespace
method.
boto3 documentation
# delete_namespace method definition
def delete_namespace(
self,
*,
Id: str,
) -> DeleteNamespaceResponseTypeDef: # (1)
...
# delete_namespace method usage example with argument unpacking
kwargs: DeleteNamespaceRequestRequestTypeDef = { # (1)
"Id": ...,
}
parent.delete_namespace(**kwargs)
delete_service#
Deletes a specified service.
Type annotations and code completion for boto3.client("servicediscovery").delete_service
method.
boto3 documentation
# delete_service method definition
def delete_service(
self,
*,
Id: str,
) -> Dict[str, Any]:
...
# delete_service method usage example with argument unpacking
kwargs: DeleteServiceRequestRequestTypeDef = { # (1)
"Id": ...,
}
parent.delete_service(**kwargs)
deregister_instance#
Deletes the Amazon Route 53 DNS records and health check, if any, that Cloud Map created for the specified instance.
Type annotations and code completion for boto3.client("servicediscovery").deregister_instance
method.
boto3 documentation
# deregister_instance method definition
def deregister_instance(
self,
*,
ServiceId: str,
InstanceId: str,
) -> DeregisterInstanceResponseTypeDef: # (1)
...
# deregister_instance method usage example with argument unpacking
kwargs: DeregisterInstanceRequestRequestTypeDef = { # (1)
"ServiceId": ...,
"InstanceId": ...,
}
parent.deregister_instance(**kwargs)
discover_instances#
Discovers registered instances for a specified namespace and service.
Type annotations and code completion for boto3.client("servicediscovery").discover_instances
method.
boto3 documentation
# discover_instances method definition
def discover_instances(
self,
*,
NamespaceName: str,
ServiceName: str,
MaxResults: int = ...,
QueryParameters: Mapping[str, str] = ...,
OptionalParameters: Mapping[str, str] = ...,
HealthStatus: HealthStatusFilterType = ..., # (1)
) -> DiscoverInstancesResponseTypeDef: # (2)
...
# discover_instances method usage example with argument unpacking
kwargs: DiscoverInstancesRequestRequestTypeDef = { # (1)
"NamespaceName": ...,
"ServiceName": ...,
}
parent.discover_instances(**kwargs)
discover_instances_revision#
Discovers the increasing revision associated with an instance.
Type annotations and code completion for boto3.client("servicediscovery").discover_instances_revision
method.
boto3 documentation
# discover_instances_revision method definition
def discover_instances_revision(
self,
*,
NamespaceName: str,
ServiceName: str,
) -> DiscoverInstancesRevisionResponseTypeDef: # (1)
...
# discover_instances_revision method usage example with argument unpacking
kwargs: DiscoverInstancesRevisionRequestRequestTypeDef = { # (1)
"NamespaceName": ...,
"ServiceName": ...,
}
parent.discover_instances_revision(**kwargs)
generate_presigned_url#
Generate a presigned url given a client, its method, and arguments.
Type annotations and code completion for boto3.client("servicediscovery").generate_presigned_url
method.
boto3 documentation
# generate_presigned_url method definition
def generate_presigned_url(
self,
ClientMethod: str,
Params: Mapping[str, Any] = ...,
ExpiresIn: int = 3600,
HttpMethod: str = ...,
) -> str:
...
get_instance#
Gets information about a specified instance.
Type annotations and code completion for boto3.client("servicediscovery").get_instance
method.
boto3 documentation
# get_instance method definition
def get_instance(
self,
*,
ServiceId: str,
InstanceId: str,
) -> GetInstanceResponseTypeDef: # (1)
...
# get_instance method usage example with argument unpacking
kwargs: GetInstanceRequestRequestTypeDef = { # (1)
"ServiceId": ...,
"InstanceId": ...,
}
parent.get_instance(**kwargs)
get_instances_health_status#
Gets the current health status ( Healthy
, Unhealthy
, or Unknown
) of one
or more instances that are associated with a specified service.
Type annotations and code completion for boto3.client("servicediscovery").get_instances_health_status
method.
boto3 documentation
# get_instances_health_status method definition
def get_instances_health_status(
self,
*,
ServiceId: str,
Instances: Sequence[str] = ...,
MaxResults: int = ...,
NextToken: str = ...,
) -> GetInstancesHealthStatusResponseTypeDef: # (1)
...
# get_instances_health_status method usage example with argument unpacking
kwargs: GetInstancesHealthStatusRequestRequestTypeDef = { # (1)
"ServiceId": ...,
}
parent.get_instances_health_status(**kwargs)
get_namespace#
Gets information about a namespace.
Type annotations and code completion for boto3.client("servicediscovery").get_namespace
method.
boto3 documentation
# get_namespace method definition
def get_namespace(
self,
*,
Id: str,
) -> GetNamespaceResponseTypeDef: # (1)
...
# get_namespace method usage example with argument unpacking
kwargs: GetNamespaceRequestRequestTypeDef = { # (1)
"Id": ...,
}
parent.get_namespace(**kwargs)
get_operation#
Gets information about any operation that returns an operation ID in the
response, such as a CreateHttpNamespace
request.
Type annotations and code completion for boto3.client("servicediscovery").get_operation
method.
boto3 documentation
# get_operation method definition
def get_operation(
self,
*,
OperationId: str,
) -> GetOperationResponseTypeDef: # (1)
...
# get_operation method usage example with argument unpacking
kwargs: GetOperationRequestRequestTypeDef = { # (1)
"OperationId": ...,
}
parent.get_operation(**kwargs)
get_service#
Gets the settings for a specified service.
Type annotations and code completion for boto3.client("servicediscovery").get_service
method.
boto3 documentation
# get_service method definition
def get_service(
self,
*,
Id: str,
) -> GetServiceResponseTypeDef: # (1)
...
# get_service method usage example with argument unpacking
kwargs: GetServiceRequestRequestTypeDef = { # (1)
"Id": ...,
}
parent.get_service(**kwargs)
list_instances#
Lists summary information about the instances that you registered by using a specified service.
Type annotations and code completion for boto3.client("servicediscovery").list_instances
method.
boto3 documentation
# list_instances method definition
def list_instances(
self,
*,
ServiceId: str,
NextToken: str = ...,
MaxResults: int = ...,
) -> ListInstancesResponseTypeDef: # (1)
...
# list_instances method usage example with argument unpacking
kwargs: ListInstancesRequestRequestTypeDef = { # (1)
"ServiceId": ...,
}
parent.list_instances(**kwargs)
list_namespaces#
Lists summary information about the namespaces that were created by the current Amazon Web Services account.
Type annotations and code completion for boto3.client("servicediscovery").list_namespaces
method.
boto3 documentation
# list_namespaces method definition
def list_namespaces(
self,
*,
NextToken: str = ...,
MaxResults: int = ...,
Filters: Sequence[NamespaceFilterTypeDef] = ..., # (1)
) -> ListNamespacesResponseTypeDef: # (2)
...
# list_namespaces method usage example with argument unpacking
kwargs: ListNamespacesRequestRequestTypeDef = { # (1)
"NextToken": ...,
}
parent.list_namespaces(**kwargs)
list_operations#
Lists operations that match the criteria that you specify.
Type annotations and code completion for boto3.client("servicediscovery").list_operations
method.
boto3 documentation
# list_operations method definition
def list_operations(
self,
*,
NextToken: str = ...,
MaxResults: int = ...,
Filters: Sequence[OperationFilterTypeDef] = ..., # (1)
) -> ListOperationsResponseTypeDef: # (2)
...
# list_operations method usage example with argument unpacking
kwargs: ListOperationsRequestRequestTypeDef = { # (1)
"NextToken": ...,
}
parent.list_operations(**kwargs)
list_services#
Lists summary information for all the services that are associated with one or more namespaces.
Type annotations and code completion for boto3.client("servicediscovery").list_services
method.
boto3 documentation
# list_services method definition
def list_services(
self,
*,
NextToken: str = ...,
MaxResults: int = ...,
Filters: Sequence[ServiceFilterTypeDef] = ..., # (1)
) -> ListServicesResponseTypeDef: # (2)
...
# list_services method usage example with argument unpacking
kwargs: ListServicesRequestRequestTypeDef = { # (1)
"NextToken": ...,
}
parent.list_services(**kwargs)
list_tags_for_resource#
Lists tags for the specified resource.
Type annotations and code completion for boto3.client("servicediscovery").list_tags_for_resource
method.
boto3 documentation
# list_tags_for_resource method definition
def list_tags_for_resource(
self,
*,
ResourceARN: str,
) -> ListTagsForResourceResponseTypeDef: # (1)
...
# list_tags_for_resource method usage example with argument unpacking
kwargs: ListTagsForResourceRequestRequestTypeDef = { # (1)
"ResourceARN": ...,
}
parent.list_tags_for_resource(**kwargs)
register_instance#
Creates or updates one or more records and, optionally, creates a health check based on the settings in a specified service.
Type annotations and code completion for boto3.client("servicediscovery").register_instance
method.
boto3 documentation
# register_instance method definition
def register_instance(
self,
*,
ServiceId: str,
InstanceId: str,
Attributes: Mapping[str, str],
CreatorRequestId: str = ...,
) -> RegisterInstanceResponseTypeDef: # (1)
...
# register_instance method usage example with argument unpacking
kwargs: RegisterInstanceRequestRequestTypeDef = { # (1)
"ServiceId": ...,
"InstanceId": ...,
"Attributes": ...,
}
parent.register_instance(**kwargs)
tag_resource#
Adds one or more tags to the specified resource.
Type annotations and code completion for boto3.client("servicediscovery").tag_resource
method.
boto3 documentation
# tag_resource method definition
def tag_resource(
self,
*,
ResourceARN: str,
Tags: Sequence[TagTypeDef], # (1)
) -> Dict[str, Any]:
...
- See TagTypeDef
# tag_resource method usage example with argument unpacking
kwargs: TagResourceRequestRequestTypeDef = { # (1)
"ResourceARN": ...,
"Tags": ...,
}
parent.tag_resource(**kwargs)
untag_resource#
Removes one or more tags from the specified resource.
Type annotations and code completion for boto3.client("servicediscovery").untag_resource
method.
boto3 documentation
# untag_resource method definition
def untag_resource(
self,
*,
ResourceARN: str,
TagKeys: Sequence[str],
) -> Dict[str, Any]:
...
# untag_resource method usage example with argument unpacking
kwargs: UntagResourceRequestRequestTypeDef = { # (1)
"ResourceARN": ...,
"TagKeys": ...,
}
parent.untag_resource(**kwargs)
update_http_namespace#
Updates an HTTP namespace.
Type annotations and code completion for boto3.client("servicediscovery").update_http_namespace
method.
boto3 documentation
# update_http_namespace method definition
def update_http_namespace(
self,
*,
Id: str,
Namespace: HttpNamespaceChangeTypeDef, # (1)
UpdaterRequestId: str = ...,
) -> UpdateHttpNamespaceResponseTypeDef: # (2)
...
# update_http_namespace method usage example with argument unpacking
kwargs: UpdateHttpNamespaceRequestRequestTypeDef = { # (1)
"Id": ...,
"Namespace": ...,
}
parent.update_http_namespace(**kwargs)
update_instance_custom_health_status#
Submits a request to change the health status of a custom health check to healthy or unhealthy.
Type annotations and code completion for boto3.client("servicediscovery").update_instance_custom_health_status
method.
boto3 documentation
# update_instance_custom_health_status method definition
def update_instance_custom_health_status(
self,
*,
ServiceId: str,
InstanceId: str,
Status: CustomHealthStatusType, # (1)
) -> EmptyResponseMetadataTypeDef: # (2)
...
# update_instance_custom_health_status method usage example with argument unpacking
kwargs: UpdateInstanceCustomHealthStatusRequestRequestTypeDef = { # (1)
"ServiceId": ...,
"InstanceId": ...,
"Status": ...,
}
parent.update_instance_custom_health_status(**kwargs)
update_private_dns_namespace#
Updates a private DNS namespace.
Type annotations and code completion for boto3.client("servicediscovery").update_private_dns_namespace
method.
boto3 documentation
# update_private_dns_namespace method definition
def update_private_dns_namespace(
self,
*,
Id: str,
Namespace: PrivateDnsNamespaceChangeTypeDef, # (1)
UpdaterRequestId: str = ...,
) -> UpdatePrivateDnsNamespaceResponseTypeDef: # (2)
...
# update_private_dns_namespace method usage example with argument unpacking
kwargs: UpdatePrivateDnsNamespaceRequestRequestTypeDef = { # (1)
"Id": ...,
"Namespace": ...,
}
parent.update_private_dns_namespace(**kwargs)
update_public_dns_namespace#
Updates a public DNS namespace.
Type annotations and code completion for boto3.client("servicediscovery").update_public_dns_namespace
method.
boto3 documentation
# update_public_dns_namespace method definition
def update_public_dns_namespace(
self,
*,
Id: str,
Namespace: PublicDnsNamespaceChangeTypeDef, # (1)
UpdaterRequestId: str = ...,
) -> UpdatePublicDnsNamespaceResponseTypeDef: # (2)
...
# update_public_dns_namespace method usage example with argument unpacking
kwargs: UpdatePublicDnsNamespaceRequestRequestTypeDef = { # (1)
"Id": ...,
"Namespace": ...,
}
parent.update_public_dns_namespace(**kwargs)
update_service#
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 .
Type annotations and code completion for boto3.client("servicediscovery").update_service
method.
boto3 documentation
# update_service method definition
def update_service(
self,
*,
Id: str,
Service: ServiceChangeTypeDef, # (1)
) -> UpdateServiceResponseTypeDef: # (2)
...
# update_service method usage example with argument unpacking
kwargs: UpdateServiceRequestRequestTypeDef = { # (1)
"Id": ...,
"Service": ...,
}
parent.update_service(**kwargs)
get_paginator#
Type annotations and code completion for boto3.client("servicediscovery").get_paginator
method with overloads.
client.get_paginator("list_instances")
-> ListInstancesPaginatorclient.get_paginator("list_namespaces")
-> ListNamespacesPaginatorclient.get_paginator("list_operations")
-> ListOperationsPaginatorclient.get_paginator("list_services")
-> ListServicesPaginator