ServiceDiscovery / Client / deregister_instance

deregister_instance

ServiceDiscovery.Client.deregister_instance(**kwargs)

Deletes the Amazon Route 53 DNS records and health check, if any, that Cloud Map created for the specified instance.

See also: AWS API Documentation

Request Syntax

response = client.deregister_instance(
    ServiceId='string',
    InstanceId='string'
)
Parameters:
  • ServiceId (string) –

    [REQUIRED]

    The ID or Amazon Resource Name (ARN) of the service that the instance is associated with. If the namespace associated with the service is shared with your account, specify the service ARN. For more information about shared namespaces, see Cross-account Cloud Map namespace sharing in the Cloud Map Developer Guide.

  • InstanceId (string) –

    [REQUIRED]

    The value that you specified for Id in the RegisterInstance request.

Return type:

dict

Returns:

Response Syntax

{
    'OperationId': 'string'
}

Response Structure

  • (dict) –

    • OperationId (string) –

      A value that you can use to determine whether the request completed successfully. To get the status of the operation, see GetOperation.

Exceptions

Examples

Example: Deregister a service instance

response = client.deregister_instance(
    InstanceId='myservice-53',
    ServiceId='srv-p5zdwlg5uvvzjita',
)

print(response)

Expected Output:

{
    'OperationId': '4yejorelbukcjzpnr6tlmrghsjwpngf4-k98rnaiq',
    'ResponseMetadata': {
        '...': '...',
    },
}