ServiceDiscovery / Client / delete_namespace

delete_namespace#

ServiceDiscovery.Client.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

Examples

Example: Delete namespace

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

print(response)

Expected Output:

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