delete_namespace

delete_namespace(**kwargs)

Deletes a namespace from the current account. If the namespace still contains one or more services, the request fails.

See also: AWS API Documentation

Request Syntax

response = client.delete_namespace(
    Id='string'
)
Parameters
Id (string) --

[REQUIRED]

The ID of the namespace that you want to delete.

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.InvalidInput
  • ServiceDiscovery.Client.exceptions.NamespaceNotFound
  • ServiceDiscovery.Client.exceptions.ResourceInUse
  • ServiceDiscovery.Client.exceptions.DuplicateRequest
  • ServiceDiscovery.Client.exceptions.RequestLimitExceeded

Examples

Example: Delete namespace

response = client.delete_namespace(
    Id='ns-ylexjili4cdxy3xm',
)

print(response)

Expected Output:

{
    'OperationId': 'gv4g5meo7ndmeh4fqskygvk23d2fijwa-k98y6drk',
    'ResponseMetadata': {
        '...': '...',
    },
}