删除ConfigMap
更新时间:2025-08-05
接口描述
删除ConfigMap。 |
请求结构
Plain Text
1GET /api/v1/{namespace}/configmaps/{name} HTTP/1.1
2Host: bec.bdcloudapi.com
3Content-Type: application/json; charset=utf-8
4Authorization: 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. |
响应头域
除公共头域外,无其它特殊头域。
响应参数
响应参数的详细描述请参见 数据结构 表
错误码
请参照前文的网关错误码和平台错误码。
请求示例
Plain Text
1GET /api/v1/namespaces/test-namespace/pods/test-pod/status HTTP/1.1
2Host: bec.bdcloudapi.com
3Content-Type: application/json; charset=utf-8
4Authorization: bce-auth-v1/318857a8f08b11e9845ca7e54775a0c2/2019-10-17T03:07:21Z/1800/host/212eef8cfe1ac94be56c4afedb9360bba621ef646c3c8288971d36801d70501a
响应示例
Plain Text
1{
2 "conditions": [
3 {
4 "lastProbeTime": null,
5 "lastTransitionTime": 1575549353000,
6 "message": null,
7 "reason": null,
8 "status": "True",
9 "type": "Initialized"
10 },
11 {
12 "lastProbeTime": null,
13 "lastTransitionTime": 1575549375000,
14 "message": null,
15 "reason": null,
16 "status": "True",
17 "type": "Ready"
18 },
19 {
20 "lastProbeTime": null,
21 "lastTransitionTime": 1575549375000,
22 "message": null,
23 "reason": null,
24 "status": "True",
25 "type": "ContainersReady"
26 },
27 {
28 "lastProbeTime": null,
29 "lastTransitionTime": 1575549353000,
30 "message": null,
31 "reason": null,
32 "status": "True",
33 "type": "PodScheduled"
34 }
35 ],
36 "containerStatuses": [
37 {
38 "containerID": "containerd://71405312ee08f4157bd3379021fd4d3cd461de1e2780c7b895f525647b8798ee",
39 "image": "docker.io/library/centos:centos7",
40 "imageID": "docker.io/library/centos@sha256:4a701376d03f6b39b8c2a8f4a8e499441b0d567f9ab9d58e4991de4472fb813c",
41 "lastState": {
42 "running": null,
43 "terminated": null,
44 "waiting": null
45 },
46 "name": "container01",
47 "ready": true,
48 "restartCount": 0,
49 "state": {
50 "running": {
51 "startedAt": 1575549374000
52 },
53 "terminated": null,
54 "waiting": null
55 }
56 }
57 ],
58 "hostIP": "121.227.168.8",
59 "initContainerStatuses": null,
60 "message": null,
61 "nominatedNodeName": null,
62 "phase": "Running",
63 "podIP": "10.244.1.27",
64 "qosClass": "Guaranteed",
65 "reason": null,
66 "startTime": 1575549353000
67}
