删除Secret
功能介绍
该API用于删除指定Namespace下的Secret对象。
请求消息
请求参数:
请求参数如表2所示。
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
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 delete immediately. Value range of this parameter: > 0. |
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. |
请求示例:
{ "kind": "DeleteOptions", "apiVersion": "v1", "gracePeriodSeconds": 10 }
响应消息
响应参数:
响应参数如表4所示。
参数 |
参数类型 |
描述 |
---|---|---|
kind |
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. |
apiVersion |
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. |
metadata |
metadata object |
- |
status |
String |
Status of the operation. One of: "Success" or "Failure". |
message |
String |
A human-readable description of the status of this operation. |
reason |
String |
A machine-readable description of why this operation is in the "Failure" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it. |
details |
details object |
- |
code |
Integer |
Suggested HTTP return code for this status, 0 if not set. |
参数 |
参数类型 |
描述 |
---|---|---|
selfLink |
String |
SelfLink is a URL representing this object. Populated by the system. Read-only. |
resourceVersion |
String |
String that identifies the server's internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only. |
参数 |
参数类型 |
描述 |
---|---|---|
name |
String |
The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). |
kind |
String |
The kind attribute of the resource associated with the status StatusReason. On some operations may differ from the requested resource Kind. |
causes |
- |
|
retryAfterSeconds |
Integer |
If specified, the time in seconds before the operation should be retried. |
uid |
String |
UID of the resource. (when there is a single resource which can be described). |
group |
String |
The group attribute of the resource associated with the status StatusReason. |
参数 |
参数类型 |
描述 |
---|---|---|
reason |
String |
A machine-readable description of the cause of the error. If this value is empty there is no information available. |
message |
String |
A human-readable description of the cause of the error. This field may be presented as-is to a reader. |
field |
String |
The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. |
响应示例:
{ "kind": "Status", "apiVersion": "v1", "metadata": {}, "status": "Success", "code": 200 }
