deregister_instance

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 of the service that the instance is associated with.

  • 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

  • ServiceDiscovery.Client.exceptions.DuplicateRequest
  • ServiceDiscovery.Client.exceptions.InvalidInput
  • ServiceDiscovery.Client.exceptions.InstanceNotFound
  • ServiceDiscovery.Client.exceptions.ResourceInUse
  • ServiceDiscovery.Client.exceptions.ServiceNotFound
  • ServiceDiscovery.Client.exceptions.RequestLimitExceeded

Examples

Example: Deregister a service instance

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

print(response)

Expected Output:

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