Deleting an Endpoints Object
Function
This API is used to delete an Endpoints object.
URI
DELETE /api/v1/namespaces/{namespace}/endpoints/{name}
Table 1 describes the parameters of this API.
|
Parameter |
Mandatory |
Description |
|---|---|---|
|
pretty |
No |
If 'true', then the output is pretty printed. |
|
namespace |
Yes |
Object name and auth scope, such as for teams and projects. |
|
name |
Yes |
Name of the endpoint. |
|
gracePeriodSeconds |
No |
The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. Zero means immediate deletion. |
|
orphanDependents |
No |
Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. |
|
propagationPolicy |
No |
Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. |
Request
Request parameters:
Table 2 describes the request parameters.
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
kind |
Yes |
String |
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. The value of this parameter is DeleteOptions. |
|
apiVersion |
Yes |
String |
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. The value of this parameter is v1. |
|
gracePeriodSeconds |
No |
Integer |
The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. Zero means immediate deletion. Value range of this parameter: > 0. |
|
propagationPolicy |
No |
String |
Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. |
|
preconditions |
No |
preconditions object |
Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned. |
|
orphanDependents |
No |
Boolean |
Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object's finalizers list. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
uid |
No |
String |
Specifies the target UID. |
Example request:
{
"kind": "DeleteOptions",
"apiVersion": "string",
"gracePeriodSeconds": 0
}
Response
Response parameters:
For the description about response parameters, see Table 2.
Example response:
{
"kind": "Status",
"apiVersion": "v1",
"metadata": {},
"status": "Success",
"code": 200
}
Status Code
Table 4 describes the status code of this API.
For the description about error status codes, see Status Code.
Last Article: Creating an Endpoints Object
Next Article: Deleting All Endpoints
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.