删除ConfigMap
更新时间:2020-01-03
接口描述
删除ConfigMap。 |
请求结构
GET /api/v1/{namespace}/configmaps/{name} HTTP/1.1
Host: bec.bdcloudapi.com
Content-Type: application/json; charset=utf-8
Authorization: authorization string
请求头域
除公共头域外,无其它特殊头域。
请求参数
表1 Path参数描述
参数 | 类型 | 参数位置 | 描述 | 是否必须 |
---|---|---|---|---|
name | String | URI参数 | Name of the Configmap. | 必须 |
namespace | String | URI参数 | Object name and auth scope, such as for teams and projects. | 必须 |
表2 Query参数描述
参数 | 类型 | 是否必须 | 描述 |
---|---|---|---|
pretty | String | 非必须 | If 'true', then the output is pretty printed. |
gracePeriodSeconds | String | 非必须 | SThe duration in seconds before the object should be deleted. Value must be a 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. |
orphanDependents | String | 非必须 | Deprecated: 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 | 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. |
响应头域
除公共头域外,无其它特殊头域。
响应参数
响应参数的详细描述请参见 数据结构 表
错误码
请参照前文的网关错误码和平台错误码。
请求示例
GET /api/v1/namespaces/test-namespace/pods/test-pod/status HTTP/1.1
Host: bec.bdcloudapi.com
Content-Type: application/json; charset=utf-8
Authorization: bce-auth-v1/318857a8f08b11e9845ca7e54775a0c2/2019-10-17T03:07:21Z/1800/host/212eef8cfe1ac94be56c4afedb9360bba621ef646c3c8288971d36801d70501a
响应示例
{
"conditions": [
{
"lastProbeTime": null,
"lastTransitionTime": 1575549353000,
"message": null,
"reason": null,
"status": "True",
"type": "Initialized"
},
{
"lastProbeTime": null,
"lastTransitionTime": 1575549375000,
"message": null,
"reason": null,
"status": "True",
"type": "Ready"
},
{
"lastProbeTime": null,
"lastTransitionTime": 1575549375000,
"message": null,
"reason": null,
"status": "True",
"type": "ContainersReady"
},
{
"lastProbeTime": null,
"lastTransitionTime": 1575549353000,
"message": null,
"reason": null,
"status": "True",
"type": "PodScheduled"
}
],
"containerStatuses": [
{
"containerID": "containerd://71405312ee08f4157bd3379021fd4d3cd461de1e2780c7b895f525647b8798ee",
"image": "docker.io/library/centos:centos7",
"imageID": "docker.io/library/centos@sha256:4a701376d03f6b39b8c2a8f4a8e499441b0d567f9ab9d58e4991de4472fb813c",
"lastState": {
"running": null,
"terminated": null,
"waiting": null
},
"name": "container01",
"ready": true,
"restartCount": 0,
"state": {
"running": {
"startedAt": 1575549374000
},
"terminated": null,
"waiting": null
}
}
],
"hostIP": "121.227.168.8",
"initContainerStatuses": null,
"message": null,
"nominatedNodeName": null,
"phase": "Running",
"podIP": "10.244.1.27",
"qosClass": "Guaranteed",
"reason": null,
"startTime": 1575549353000
}