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
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.
client = boto3.client("servicediscovery")
try:
do_something(client)
except (
client.ClientError,
client.CustomHealthNotFound,
client.DuplicateRequest,
client.InstanceNotFound,
client.InvalidInput,
client.NamespaceAlreadyExists,
client.NamespaceNotFound,
client.OperationNotFound,
client.RequestLimitExceeded,
client.ResourceInUse,
client.ResourceLimitExceeded,
client.ResourceNotFoundException,
client.ServiceAlreadyExists,
client.ServiceNotFound,
client.TooManyTagsException,
) as e:
print(e)
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
close
Closes underlying endpoint connections.
Type annotations and code completion for boto3.client("servicediscovery").close
method.
boto3 documentation
create_http_namespace
Creates an HTTP namespace.
Type annotations and code completion for boto3.client("servicediscovery").create_http_namespace
method.
boto3 documentation
def create_http_namespace(
self,
*,
Name: str,
CreatorRequestId: str = ...,
Description: str = ...,
Tags: Sequence[TagTypeDef] = ..., # (1)
) -> CreateHttpNamespaceResponseTypeDef: # (2)
...
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
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
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
def create_public_dns_namespace(
self,
*,
Name: str,
CreatorRequestId: str = ...,
Description: str = ...,
Tags: Sequence[TagTypeDef] = ..., # (1)
Properties: PublicDnsNamespacePropertiesTypeDef = ..., # (2)
) -> CreatePublicDnsNamespaceResponseTypeDef: # (3)
...
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
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
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
def delete_namespace(
self,
*,
Id: str,
) -> DeleteNamespaceResponseTypeDef: # (1)
...
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
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
def deregister_instance(
self,
*,
ServiceId: str,
InstanceId: str,
) -> DeregisterInstanceResponseTypeDef: # (1)
...
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
def discover_instances(
self,
*,
NamespaceName: str,
ServiceName: str,
MaxResults: int = ...,
QueryParameters: Mapping[str, str] = ...,
OptionalParameters: Mapping[str, str] = ...,
HealthStatus: HealthStatusFilterType = ..., # (1)
) -> DiscoverInstancesResponseTypeDef: # (2)
...
kwargs: DiscoverInstancesRequestRequestTypeDef = { # (1)
"NamespaceName": ...,
"ServiceName": ...,
}
parent.discover_instances(**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
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
def get_instance(
self,
*,
ServiceId: str,
InstanceId: str,
) -> GetInstanceResponseTypeDef: # (1)
...
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
def get_instances_health_status(
self,
*,
ServiceId: str,
Instances: Sequence[str] = ...,
MaxResults: int = ...,
NextToken: str = ...,
) -> GetInstancesHealthStatusResponseTypeDef: # (1)
...
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
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 CreateService
request.
Type annotations and code completion for boto3.client("servicediscovery").get_operation
method.
boto3 documentation
def get_operation(
self,
*,
OperationId: str,
) -> GetOperationResponseTypeDef: # (1)
...
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
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
def list_instances(
self,
*,
ServiceId: str,
NextToken: str = ...,
MaxResults: int = ...,
) -> ListInstancesResponseTypeDef: # (1)
...
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
def list_namespaces(
self,
*,
NextToken: str = ...,
MaxResults: int = ...,
Filters: Sequence[NamespaceFilterTypeDef] = ..., # (1)
) -> ListNamespacesResponseTypeDef: # (2)
...
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
def list_operations(
self,
*,
NextToken: str = ...,
MaxResults: int = ...,
Filters: Sequence[OperationFilterTypeDef] = ..., # (1)
) -> ListOperationsResponseTypeDef: # (2)
...
kwargs: ListOperationsRequestRequestTypeDef = { # (1)
"NextToken": ...,
}
parent.list_operations(**kwargs)
list_services
Lists summary information for all the services that are associated with one or more specified namespaces.
Type annotations and code completion for boto3.client("servicediscovery").list_services
method.
boto3 documentation
def list_services(
self,
*,
NextToken: str = ...,
MaxResults: int = ...,
Filters: Sequence[ServiceFilterTypeDef] = ..., # (1)
) -> ListServicesResponseTypeDef: # (2)
...
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
def list_tags_for_resource(
self,
*,
ResourceARN: str,
) -> ListTagsForResourceResponseTypeDef: # (1)
...
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
def register_instance(
self,
*,
ServiceId: str,
InstanceId: str,
Attributes: Mapping[str, str],
CreatorRequestId: str = ...,
) -> RegisterInstanceResponseTypeDef: # (1)
...
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
def tag_resource(
self,
*,
ResourceARN: str,
Tags: Sequence[TagTypeDef], # (1)
) -> Dict[str, Any]:
...
- See TagTypeDef
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
def untag_resource(
self,
*,
ResourceARN: str,
TagKeys: Sequence[str],
) -> Dict[str, Any]:
...
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
def update_http_namespace(
self,
*,
Id: str,
Namespace: HttpNamespaceChangeTypeDef, # (1)
UpdaterRequestId: str = ...,
) -> UpdateHttpNamespaceResponseTypeDef: # (2)
...
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
def update_instance_custom_health_status(
self,
*,
ServiceId: str,
InstanceId: str,
Status: CustomHealthStatusType, # (1)
) -> EmptyResponseMetadataTypeDef: # (2)
...
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
def update_private_dns_namespace(
self,
*,
Id: str,
Namespace: PrivateDnsNamespaceChangeTypeDef, # (1)
UpdaterRequestId: str = ...,
) -> UpdatePrivateDnsNamespaceResponseTypeDef: # (2)
...
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
def update_public_dns_namespace(
self,
*,
Id: str,
Namespace: PublicDnsNamespaceChangeTypeDef, # (1)
UpdaterRequestId: str = ...,
) -> UpdatePublicDnsNamespaceResponseTypeDef: # (2)
...
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
def update_service(
self,
*,
Id: str,
Service: ServiceChangeTypeDef, # (1)
) -> UpdateServiceResponseTypeDef: # (2)
...
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