功能介紹
刪除一個(gè)指定Network對(duì)象。
調(diào)用方法
請(qǐng)參見如何調(diào)用API。
URI
DELETE /apis/networking.cci.io/v1beta1/namespaces/{namespace}/networks/{name}
|
參數(shù) |
是否必選 |
參數(shù)類型 |
描述 |
|---|---|---|---|
|
name |
是 |
String |
name of the Network |
|
namespace |
是 |
String |
object name and auth scope, such as for teams and projects |
|
參數(shù) |
是否必選 |
參數(shù)類型 |
描述 |
|---|---|---|---|
|
dryRun |
否 |
String |
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed |
|
gracePeriodSeconds |
否 |
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. |
|
orphanDependents |
否 |
Boolean |
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 |
否 |
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. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cas cad ing policy that deletes all dependents in the foreground. |
|
pretty |
否 |
String |
If 'true', then the output is pretty printed. |
請(qǐng)求參數(shù)
|
參數(shù) |
是否必選 |
參數(shù)類型 |
描述 |
|---|---|---|---|
|
X-Auth-Token |
是 |
String |
用戶Token。 通過調(diào)用 IAM 服務(wù)獲取用戶Token接口獲取(響應(yīng)消息頭中X-Subject-Token的值)。 |
|
Content-Type |
是 |
String |
消息體的類型(格式),默認(rèn)取值為“application/json” 缺省值:application/json |
|
參數(shù) |
是否必選 |
參數(shù)類型 |
描述 |
|---|---|---|---|
|
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. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources |
|
dryRun |
否 |
Array of strings |
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed |
|
gracePeriodSeconds |
否 |
Long |
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. |
|
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. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
|
orphanDependents |
否 |
Boolean |
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. |
|
preconditions |
否 |
Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned. |
|
|
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. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. |
響應(yīng)參數(shù)
狀態(tài)碼: 200
|
參數(shù) |
參數(shù)類型 |
描述 |
|---|---|---|
|
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. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources |
|
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. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
|
metadata |
ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. |
|
|
spec |
Spec defines the attributes on a network |
|
|
status |
Status describes the network status |
|
參數(shù) |
參數(shù)類型 |
描述 |
|---|---|---|
|
apiVersion |
String |
APIVersion defines the version of this resource that this field set applies to. The format is "group/version" just like the top-level APIVersion field. It is necessary to track the version of a field set because it cannot be automatically converted. |
|
fieldsType |
String |
FieldsType is the discriminator for the different fields format and version. There is currently only one possible value: "FieldsV1" |
|
fieldsV1 |
Object |
FieldsV1 holds the first JSON version format as described in the "FieldsV1" type. |
|
manager |
String |
Manager is an identifier of the workflow managing these fields. |
|
operation |
String |
Operation is the type of operation which lead to this ManagedFieldsEntry being created. The only valid values for this field are 'Apply' and 'Update'. |
|
time |
String |
Time is timestamp of when these fields were set. It should always be empty if Operation is 'Apply' |
|
參數(shù) |
參數(shù)類型 |
描述 |
|---|---|---|
|
apiVersion |
String |
API version of the referent. |
|
blockOwnerDeletion |
Boolean |
If true, AND if the owner has the "foregroundDeletion" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. Defaults to false. To set this field, a user needs "delete" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned. |
|
controller |
Boolean |
If true, this reference points to the managing controller. |
|
kind |
String |
Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
|
name |
String |
Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names |
|
uid |
String |
UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids |
|
參數(shù) |
參數(shù)類型 |
描述 |
|---|---|---|
|
attachedVPC |
String |
ID of the VPC to attach |
|
availableZone |
String |
available zone |
|
cidr |
String |
The CIDR of the network |
|
networkID |
String |
network ID |
|
networkType |
String |
network type like 'overlay_l2' |
|
subnetID |
String |
Subnet ID |
|
subnets |
Subnets |
|
參數(shù) |
參數(shù)類型 |
描述 |
|---|---|---|
|
cidr |
String |
The CIDR of the network |
|
networkID |
String |
NetworkID describes the subnet network id |
|
subnetID |
String |
SubnetID describes the subnet id |
|
參數(shù) |
參數(shù)類型 |
描述 |
|---|---|---|
|
message |
String |
Message describes why network is in current state |
|
state |
String |
State describes the network state |
狀態(tài)碼: 202
|
參數(shù) |
參數(shù)類型 |
描述 |
|---|---|---|
|
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. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources |
|
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. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
|
metadata |
ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. |
|
|
spec |
Spec defines the attributes on a network |
|
|
status |
Status describes the network status |
|
參數(shù) |
參數(shù)類型 |
描述 |
|---|---|---|
|
apiVersion |
String |
APIVersion defines the version of this resource that this field set applies to. The format is "group/version" just like the top-level APIVersion field. It is necessary to track the version of a field set because it cannot be automatically converted. |
|
fieldsType |
String |
FieldsType is the discriminator for the different fields format and version. There is currently only one possible value: "FieldsV1" |
|
fieldsV1 |
Object |
FieldsV1 holds the first JSON version format as described in the "FieldsV1" type. |
|
manager |
String |
Manager is an identifier of the workflow managing these fields. |
|
operation |
String |
Operation is the type of operation which lead to this ManagedFieldsEntry being created. The only valid values for this field are 'Apply' and 'Update'. |
|
time |
String |
Time is timestamp of when these fields were set. It should always be empty if Operation is 'Apply' |
|
參數(shù) |
參數(shù)類型 |
描述 |
|---|---|---|
|
apiVersion |
String |
API version of the referent. |
|
blockOwnerDeletion |
Boolean |
If true, AND if the owner has the "foregroundDeletion" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. Defaults to false. To set this field, a user needs "delete" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned. |
|
controller |
Boolean |
If true, this reference points to the managing controller. |
|
kind |
String |
Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
|
name |
String |
Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names |
|
uid |
String |
UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids |
|
參數(shù) |
參數(shù)類型 |
描述 |
|---|---|---|
|
attachedVPC |
String |
ID of the VPC to attach |
|
availableZone |
String |
available zone |
|
cidr |
String |
The CIDR of the network |
|
networkID |
String |
network ID |
|
networkType |
String |
network type like 'overlay_l2' |
|
subnetID |
String |
Subnet ID |
|
subnets |
Subnets |
請(qǐng)求示例
刪除Network。
{
"Kind" : "DeleteOptions",
"apiVersion" : "v1",
"gracePeriodSeconds" : 0
}
響應(yīng)示例
狀態(tài)碼: 200
OK
{
"apiVersion" : "networking.cci.io/v1beta1",
"kind" : "Network",
"metadata" : {
"annotations" : {
"network.alpha.kubernetes.io/default-security-group" : "19c5d024-aed5-4856-b958-c0f65ce70855",
"network.alpha.kubernetes.io/domain-id" : "aadb43c0b14c4cafbccfff483d075987",
"network.alpha.kubernetes.io/project-id" : "51bf52609f2a49c68bfda3398817b376"
},
"creationTimestamp" : "2018-09-03T11:21:00Z",
"name" : "namespace-test-dc1-default-network",
"namespace" : "namespace-test",
"resourceVersion" : "5016899",
"selfLink" : "/apis/networking.cci.io/v1beta1/namespaces/namespace-test/networks/namespace-test-dc1-default-network",
"uid" : "6fb85414-af6b-11e8-b6ef-f898ef6c78b4"
},
"spec" : {
"attachedVPC" : "0d4080e5-546a-46c4-86fe-f3e26d685177",
"availableZone" : "cn-north-4a",
"cidr" : "192.168.244.0/23",
"networkID" : "0022e356-f730-4226-802e-9cdaa6e7da17",
"networkType" : "underlay_neutron",
"subnetID" : "1ffd839d-e534-4fa8-a59d-42356335bf74"
},
"status" : {
"state" : "Active"
}
}
狀態(tài)碼
|
狀態(tài)碼 |
描述 |
|---|---|
|
200 |
OK |
|
202 |
Accepted |
|
400 |
BadRequest |
|
401 |
Unauthorized |
|
403 |
Forbidden |
|
404 |
NotFound |
|
405 |
MethodNotAllowed |
|
406 |
NotAcceptable |
|
409 |
Conflict |
|
415 |
UnsupportedMediaType |
|
422 |
Invalid |
|
429 |
TooManyRequests |
|
500 |
InternalError |
|
503 |
ServiceUnavailable |
|
504 |
ServerTimeout |
最新文章
- 備份文件重裝系統(tǒng)_系統(tǒng)備份文件可以刪除嗎_刪除系統(tǒng)備份文件
- 如何關(guān)閉云備份_云備份有什么用_云備份刪除有什么影響
- OA辦公系統(tǒng)OA_OA實(shí)施主要干什么_泛微OA刪除人員
- MySQL連接數(shù)據(jù)庫_MySQL創(chuàng)建數(shù)據(jù)庫語句_MySQL怎么刪除數(shù)據(jù)庫
- web應(yīng)用防火墻證書上傳_web應(yīng)用防火墻證書綁定_web應(yīng)用防火墻證書刪除
- web應(yīng)用防火墻添加黑白名單_web應(yīng)用防火墻修改黑白名單_web應(yīng)用防火墻刪除黑白名單
