tencentcloud-sdk-python-tke 3.1.128__tar.gz → 3.1.134__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {tencentcloud_sdk_python_tke-3.1.128 → tencentcloud_sdk_python_tke-3.1.134}/PKG-INFO +2 -2
- {tencentcloud_sdk_python_tke-3.1.128 → tencentcloud_sdk_python_tke-3.1.134}/setup.py +1 -1
- {tencentcloud_sdk_python_tke-3.1.128 → tencentcloud_sdk_python_tke-3.1.134}/tencentcloud/__init__.py +1 -1
- {tencentcloud_sdk_python_tke-3.1.128 → tencentcloud_sdk_python_tke-3.1.134}/tencentcloud/tke/v20220501/models.py +37 -37
- {tencentcloud_sdk_python_tke-3.1.128 → tencentcloud_sdk_python_tke-3.1.134}/tencentcloud/tke/v20220501/tke_client.py +90 -1
- {tencentcloud_sdk_python_tke-3.1.128 → tencentcloud_sdk_python_tke-3.1.134}/tencentcloud/tke/v20220501/tke_client_async.py +90 -1
- {tencentcloud_sdk_python_tke-3.1.128 → tencentcloud_sdk_python_tke-3.1.134}/tencentcloud_sdk_python_tke.egg-info/PKG-INFO +2 -2
- tencentcloud_sdk_python_tke-3.1.134/tencentcloud_sdk_python_tke.egg-info/requires.txt +1 -0
- tencentcloud_sdk_python_tke-3.1.128/tencentcloud_sdk_python_tke.egg-info/requires.txt +0 -1
- {tencentcloud_sdk_python_tke-3.1.128 → tencentcloud_sdk_python_tke-3.1.134}/README.rst +0 -0
- {tencentcloud_sdk_python_tke-3.1.128 → tencentcloud_sdk_python_tke-3.1.134}/setup.cfg +0 -0
- {tencentcloud_sdk_python_tke-3.1.128 → tencentcloud_sdk_python_tke-3.1.134}/tencentcloud/tke/__init__.py +0 -0
- {tencentcloud_sdk_python_tke-3.1.128 → tencentcloud_sdk_python_tke-3.1.134}/tencentcloud/tke/v20180525/__init__.py +0 -0
- {tencentcloud_sdk_python_tke-3.1.128 → tencentcloud_sdk_python_tke-3.1.134}/tencentcloud/tke/v20180525/errorcodes.py +0 -0
- {tencentcloud_sdk_python_tke-3.1.128 → tencentcloud_sdk_python_tke-3.1.134}/tencentcloud/tke/v20180525/models.py +0 -0
- {tencentcloud_sdk_python_tke-3.1.128 → tencentcloud_sdk_python_tke-3.1.134}/tencentcloud/tke/v20180525/tke_client.py +0 -0
- {tencentcloud_sdk_python_tke-3.1.128 → tencentcloud_sdk_python_tke-3.1.134}/tencentcloud/tke/v20180525/tke_client_async.py +0 -0
- {tencentcloud_sdk_python_tke-3.1.128 → tencentcloud_sdk_python_tke-3.1.134}/tencentcloud/tke/v20220501/__init__.py +0 -0
- {tencentcloud_sdk_python_tke-3.1.128 → tencentcloud_sdk_python_tke-3.1.134}/tencentcloud/tke/v20220501/errorcodes.py +0 -0
- {tencentcloud_sdk_python_tke-3.1.128 → tencentcloud_sdk_python_tke-3.1.134}/tencentcloud_sdk_python_tke.egg-info/SOURCES.txt +0 -0
- {tencentcloud_sdk_python_tke-3.1.128 → tencentcloud_sdk_python_tke-3.1.134}/tencentcloud_sdk_python_tke.egg-info/dependency_links.txt +0 -0
- {tencentcloud_sdk_python_tke-3.1.128 → tencentcloud_sdk_python_tke-3.1.134}/tencentcloud_sdk_python_tke.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: tencentcloud-sdk-python-tke
|
|
3
|
-
Version: 3.1.
|
|
3
|
+
Version: 3.1.134
|
|
4
4
|
Summary: Tencent Cloud Tke SDK for Python
|
|
5
5
|
Home-page: https://github.com/TencentCloud/tencentcloud-sdk-python
|
|
6
6
|
Author: Tencent Cloud
|
|
@@ -15,7 +15,7 @@ Classifier: Programming Language :: Python :: 2.7
|
|
|
15
15
|
Classifier: Programming Language :: Python :: 3
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.6
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.7
|
|
18
|
-
Requires-Dist: tencentcloud-sdk-python-common<4.0.0,>=3.1.
|
|
18
|
+
Requires-Dist: tencentcloud-sdk-python-common<4.0.0,>=3.1.134
|
|
19
19
|
|
|
20
20
|
============================
|
|
21
21
|
Tencent Cloud SDK for Python
|
|
@@ -8,7 +8,7 @@ ROOT = os.path.dirname(__file__)
|
|
|
8
8
|
|
|
9
9
|
setup(
|
|
10
10
|
name='tencentcloud-sdk-python-tke',
|
|
11
|
-
install_requires=["tencentcloud-sdk-python-common>=3.1.
|
|
11
|
+
install_requires=["tencentcloud-sdk-python-common>=3.1.134,<4.0.0"],
|
|
12
12
|
|
|
13
13
|
version=tencentcloud.__version__,
|
|
14
14
|
description='Tencent Cloud Tke SDK for Python',
|
|
@@ -931,25 +931,25 @@ class CreateNodePoolRequest(AbstractModel):
|
|
|
931
931
|
|
|
932
932
|
def __init__(self):
|
|
933
933
|
r"""
|
|
934
|
-
:param _ClusterId:
|
|
934
|
+
:param _ClusterId: <p>集群 ID</p>
|
|
935
935
|
:type ClusterId: str
|
|
936
|
-
:param _Name:
|
|
936
|
+
:param _Name: <p>节点池名称</p>
|
|
937
937
|
:type Name: str
|
|
938
|
-
:param _Type:
|
|
938
|
+
:param _Type: <p>节点池类型</p>
|
|
939
939
|
:type Type: str
|
|
940
|
-
:param _Labels:
|
|
940
|
+
:param _Labels: <p>节点 Labels</p>
|
|
941
941
|
:type Labels: list of Label
|
|
942
|
-
:param _Taints:
|
|
942
|
+
:param _Taints: <p>节点污点</p>
|
|
943
943
|
:type Taints: list of Taint
|
|
944
|
-
:param _Tags:
|
|
944
|
+
:param _Tags: <p>节点标签</p>
|
|
945
945
|
:type Tags: list of TagSpecification
|
|
946
|
-
:param _DeletionProtection:
|
|
946
|
+
:param _DeletionProtection: <p>是否开启删除保护</p>
|
|
947
947
|
:type DeletionProtection: bool
|
|
948
|
-
:param _Unschedulable:
|
|
948
|
+
:param _Unschedulable: <p>节点是否默认不可调度</p>
|
|
949
949
|
:type Unschedulable: bool
|
|
950
|
-
:param _Native:
|
|
950
|
+
:param _Native: <p>原生节点池创建参数(Type字段设置为Native时需填写)</p>
|
|
951
951
|
:type Native: :class:`tencentcloud.tke.v20220501.models.CreateNativeNodePoolParam`
|
|
952
|
-
:param _Annotations:
|
|
952
|
+
:param _Annotations: <p>节点 Annotation 列表</p>
|
|
953
953
|
:type Annotations: list of Annotation
|
|
954
954
|
"""
|
|
955
955
|
self._ClusterId = None
|
|
@@ -965,7 +965,7 @@ class CreateNodePoolRequest(AbstractModel):
|
|
|
965
965
|
|
|
966
966
|
@property
|
|
967
967
|
def ClusterId(self):
|
|
968
|
-
r"""
|
|
968
|
+
r"""<p>集群 ID</p>
|
|
969
969
|
:rtype: str
|
|
970
970
|
"""
|
|
971
971
|
return self._ClusterId
|
|
@@ -976,7 +976,7 @@ class CreateNodePoolRequest(AbstractModel):
|
|
|
976
976
|
|
|
977
977
|
@property
|
|
978
978
|
def Name(self):
|
|
979
|
-
r"""
|
|
979
|
+
r"""<p>节点池名称</p>
|
|
980
980
|
:rtype: str
|
|
981
981
|
"""
|
|
982
982
|
return self._Name
|
|
@@ -987,7 +987,7 @@ class CreateNodePoolRequest(AbstractModel):
|
|
|
987
987
|
|
|
988
988
|
@property
|
|
989
989
|
def Type(self):
|
|
990
|
-
r"""
|
|
990
|
+
r"""<p>节点池类型</p>
|
|
991
991
|
:rtype: str
|
|
992
992
|
"""
|
|
993
993
|
return self._Type
|
|
@@ -998,7 +998,7 @@ class CreateNodePoolRequest(AbstractModel):
|
|
|
998
998
|
|
|
999
999
|
@property
|
|
1000
1000
|
def Labels(self):
|
|
1001
|
-
r"""
|
|
1001
|
+
r"""<p>节点 Labels</p>
|
|
1002
1002
|
:rtype: list of Label
|
|
1003
1003
|
"""
|
|
1004
1004
|
return self._Labels
|
|
@@ -1009,7 +1009,7 @@ class CreateNodePoolRequest(AbstractModel):
|
|
|
1009
1009
|
|
|
1010
1010
|
@property
|
|
1011
1011
|
def Taints(self):
|
|
1012
|
-
r"""
|
|
1012
|
+
r"""<p>节点污点</p>
|
|
1013
1013
|
:rtype: list of Taint
|
|
1014
1014
|
"""
|
|
1015
1015
|
return self._Taints
|
|
@@ -1020,7 +1020,7 @@ class CreateNodePoolRequest(AbstractModel):
|
|
|
1020
1020
|
|
|
1021
1021
|
@property
|
|
1022
1022
|
def Tags(self):
|
|
1023
|
-
r"""
|
|
1023
|
+
r"""<p>节点标签</p>
|
|
1024
1024
|
:rtype: list of TagSpecification
|
|
1025
1025
|
"""
|
|
1026
1026
|
return self._Tags
|
|
@@ -1031,7 +1031,7 @@ class CreateNodePoolRequest(AbstractModel):
|
|
|
1031
1031
|
|
|
1032
1032
|
@property
|
|
1033
1033
|
def DeletionProtection(self):
|
|
1034
|
-
r"""
|
|
1034
|
+
r"""<p>是否开启删除保护</p>
|
|
1035
1035
|
:rtype: bool
|
|
1036
1036
|
"""
|
|
1037
1037
|
return self._DeletionProtection
|
|
@@ -1042,7 +1042,7 @@ class CreateNodePoolRequest(AbstractModel):
|
|
|
1042
1042
|
|
|
1043
1043
|
@property
|
|
1044
1044
|
def Unschedulable(self):
|
|
1045
|
-
r"""
|
|
1045
|
+
r"""<p>节点是否默认不可调度</p>
|
|
1046
1046
|
:rtype: bool
|
|
1047
1047
|
"""
|
|
1048
1048
|
return self._Unschedulable
|
|
@@ -1053,7 +1053,7 @@ class CreateNodePoolRequest(AbstractModel):
|
|
|
1053
1053
|
|
|
1054
1054
|
@property
|
|
1055
1055
|
def Native(self):
|
|
1056
|
-
r"""
|
|
1056
|
+
r"""<p>原生节点池创建参数(Type字段设置为Native时需填写)</p>
|
|
1057
1057
|
:rtype: :class:`tencentcloud.tke.v20220501.models.CreateNativeNodePoolParam`
|
|
1058
1058
|
"""
|
|
1059
1059
|
return self._Native
|
|
@@ -1064,7 +1064,7 @@ class CreateNodePoolRequest(AbstractModel):
|
|
|
1064
1064
|
|
|
1065
1065
|
@property
|
|
1066
1066
|
def Annotations(self):
|
|
1067
|
-
r"""
|
|
1067
|
+
r"""<p>节点 Annotation 列表</p>
|
|
1068
1068
|
:rtype: list of Annotation
|
|
1069
1069
|
"""
|
|
1070
1070
|
return self._Annotations
|
|
@@ -1124,7 +1124,7 @@ class CreateNodePoolResponse(AbstractModel):
|
|
|
1124
1124
|
|
|
1125
1125
|
def __init__(self):
|
|
1126
1126
|
r"""
|
|
1127
|
-
:param _NodePoolId:
|
|
1127
|
+
:param _NodePoolId: <p>节点池 ID</p>
|
|
1128
1128
|
:type NodePoolId: str
|
|
1129
1129
|
:param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
|
1130
1130
|
:type RequestId: str
|
|
@@ -1134,7 +1134,7 @@ class CreateNodePoolResponse(AbstractModel):
|
|
|
1134
1134
|
|
|
1135
1135
|
@property
|
|
1136
1136
|
def NodePoolId(self):
|
|
1137
|
-
r"""
|
|
1137
|
+
r"""<p>节点池 ID</p>
|
|
1138
1138
|
:rtype: str
|
|
1139
1139
|
"""
|
|
1140
1140
|
return self._NodePoolId
|
|
@@ -8297,16 +8297,27 @@ class Taint(AbstractModel):
|
|
|
8297
8297
|
|
|
8298
8298
|
def __init__(self):
|
|
8299
8299
|
r"""
|
|
8300
|
+
:param _Effect: Taint的Effect
|
|
8301
|
+
:type Effect: str
|
|
8300
8302
|
:param _Key: Taint的Key
|
|
8301
8303
|
:type Key: str
|
|
8302
8304
|
:param _Value: Taint的Value
|
|
8303
8305
|
:type Value: str
|
|
8304
|
-
:param _Effect: Taint的Effect
|
|
8305
|
-
:type Effect: str
|
|
8306
8306
|
"""
|
|
8307
|
+
self._Effect = None
|
|
8307
8308
|
self._Key = None
|
|
8308
8309
|
self._Value = None
|
|
8309
|
-
|
|
8310
|
+
|
|
8311
|
+
@property
|
|
8312
|
+
def Effect(self):
|
|
8313
|
+
r"""Taint的Effect
|
|
8314
|
+
:rtype: str
|
|
8315
|
+
"""
|
|
8316
|
+
return self._Effect
|
|
8317
|
+
|
|
8318
|
+
@Effect.setter
|
|
8319
|
+
def Effect(self, Effect):
|
|
8320
|
+
self._Effect = Effect
|
|
8310
8321
|
|
|
8311
8322
|
@property
|
|
8312
8323
|
def Key(self):
|
|
@@ -8330,22 +8341,11 @@ class Taint(AbstractModel):
|
|
|
8330
8341
|
def Value(self, Value):
|
|
8331
8342
|
self._Value = Value
|
|
8332
8343
|
|
|
8333
|
-
@property
|
|
8334
|
-
def Effect(self):
|
|
8335
|
-
r"""Taint的Effect
|
|
8336
|
-
:rtype: str
|
|
8337
|
-
"""
|
|
8338
|
-
return self._Effect
|
|
8339
|
-
|
|
8340
|
-
@Effect.setter
|
|
8341
|
-
def Effect(self, Effect):
|
|
8342
|
-
self._Effect = Effect
|
|
8343
|
-
|
|
8344
8344
|
|
|
8345
8345
|
def _deserialize(self, params):
|
|
8346
|
+
self._Effect = params.get("Effect")
|
|
8346
8347
|
self._Key = params.get("Key")
|
|
8347
8348
|
self._Value = params.get("Value")
|
|
8348
|
-
self._Effect = params.get("Effect")
|
|
8349
8349
|
memeber_set = set(params.keys())
|
|
8350
8350
|
for name, value in vars(self).items():
|
|
8351
8351
|
property_name = name[1:]
|
|
@@ -50,7 +50,96 @@ class TkeClient(AbstractClient):
|
|
|
50
50
|
|
|
51
51
|
|
|
52
52
|
def CreateNodePool(self, request):
|
|
53
|
-
r"""
|
|
53
|
+
r"""**通过 CAM 策略强制节点池安全配置**
|
|
54
|
+
|
|
55
|
+
创建原生节点池(`CreateNodePool`)接口已接入 CAM 条件鉴权,会根据请求参数计算出一组**条件键(Condition Key)**并传入 CAM 鉴权。您可以在 CAM/SCP 策略中基于这些条件键配置 `deny` 规则,从而强制约束节点池的安全配置(如必须开启磁盘加密、安全加固等)。
|
|
56
|
+
|
|
57
|
+
**支持的条件键**
|
|
58
|
+
|
|
59
|
+
| 条件键 | 含义 | 取值 | 取值判定说明 |
|
|
60
|
+
|--------|------|------|-------------|
|
|
61
|
+
| `tke:NodePoolType` | 节点池类型 | `Native` / `External` | 取请求的节点池类型,未指定时默认为 `Native` |
|
|
62
|
+
| `tke:SystemDiskEncrypted` | 系统盘是否加密 | `true` / `false` | 系统盘加密属性为 `ENCRYPT`(大小写不敏感)时为 `true`,否则为 `false` |
|
|
63
|
+
| `tke:AllDataDisksEncrypted` | 所有数据盘是否都已加密 | `true` / `false` | 全部数据盘加密属性均为 `ENCRYPT` 时为 `true`;未配置数据盘时也为 `true`;只要有任一数据盘未加密即为 `false` |
|
|
64
|
+
| `tke:SecurityAgentEnabled` | 是否开启安全加固(Security Agent) | `true` / `false` | 开启安全加固时为 `true`,否则为 `false` |
|
|
65
|
+
|
|
66
|
+
> 说明:所有条件键的取值均为字符串 `"true"` / `"false"`,请在策略中使用字符串形式匹配。
|
|
67
|
+
|
|
68
|
+
**使用方式**
|
|
69
|
+
|
|
70
|
+
在 CAM 策略中使用 `bool_equal` 匹配条件键值为 `"false"`,配合 `effect: deny`,即可实现"未满足安全配置则拒绝创建节点池"的强制约束。
|
|
71
|
+
|
|
72
|
+
**示例一:强制开启安全加固**
|
|
73
|
+
|
|
74
|
+
创建节点池时若未开启安全加固(`tke:SecurityAgentEnabled = "false"`),则拒绝。
|
|
75
|
+
|
|
76
|
+
```json
|
|
77
|
+
{
|
|
78
|
+
"version": "2.0",
|
|
79
|
+
"statement": [
|
|
80
|
+
{
|
|
81
|
+
"effect": "deny",
|
|
82
|
+
"action": ["tke:CreateNodePool"],
|
|
83
|
+
"resource": ["*"],
|
|
84
|
+
"condition": {
|
|
85
|
+
"bool_equal": {
|
|
86
|
+
"tke:SecurityAgentEnabled": "false"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
**示例二:强制数据盘加密**
|
|
95
|
+
|
|
96
|
+
创建节点池时若存在未加密的数据盘(`tke:AllDataDisksEncrypted = "false"`),则拒绝。
|
|
97
|
+
|
|
98
|
+
```json
|
|
99
|
+
{
|
|
100
|
+
"version": "2.0",
|
|
101
|
+
"statement": [
|
|
102
|
+
{
|
|
103
|
+
"effect": "deny",
|
|
104
|
+
"action": ["tke:CreateNodePool"],
|
|
105
|
+
"resource": ["*"],
|
|
106
|
+
"condition": {
|
|
107
|
+
"bool_equal": {
|
|
108
|
+
"tke:AllDataDisksEncrypted": "false"
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
]
|
|
113
|
+
}
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
**示例三:强制系统盘加密**
|
|
117
|
+
|
|
118
|
+
创建节点池时若系统盘未加密(`tke:SystemDiskEncrypted = "false"`),则拒绝。
|
|
119
|
+
|
|
120
|
+
```json
|
|
121
|
+
{
|
|
122
|
+
"version": "2.0",
|
|
123
|
+
"statement": [
|
|
124
|
+
{
|
|
125
|
+
"effect": "deny",
|
|
126
|
+
"action": ["tke:CreateNodePool"],
|
|
127
|
+
"resource": ["*"],
|
|
128
|
+
"condition": {
|
|
129
|
+
"bool_equal": {
|
|
130
|
+
"tke:SystemDiskEncrypted": "false"
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
]
|
|
135
|
+
}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
**注意事项**
|
|
139
|
+
|
|
140
|
+
- 上述条件键在**未配置任何 CAM 策略**时不会影响节点池创建,仅在您显式配置了对应 `deny` 策略时才生效。
|
|
141
|
+
- 如需同时强制多项安全配置,必须在同一策略的 `statement` 中配置多条 `deny` 规则,不能将多个条件键写入同一条 `condition`。
|
|
142
|
+
- `tke:AllDataDisksEncrypted` 在**无数据盘**场景下取值为 `true`(不存在未加密的数据盘),因此仅约束"已配置的数据盘必须加密",不会强制要求必须挂载数据盘。
|
|
54
143
|
|
|
55
144
|
:param request: Request instance for CreateNodePool.
|
|
56
145
|
:type request: :class:`tencentcloud.tke.v20220501.models.CreateNodePoolRequest`
|
|
@@ -49,7 +49,96 @@ class TkeClient(AbstractClient):
|
|
|
49
49
|
opts: Dict = None,
|
|
50
50
|
) -> models.CreateNodePoolResponse:
|
|
51
51
|
"""
|
|
52
|
-
|
|
52
|
+
**通过 CAM 策略强制节点池安全配置**
|
|
53
|
+
|
|
54
|
+
创建原生节点池(`CreateNodePool`)接口已接入 CAM 条件鉴权,会根据请求参数计算出一组**条件键(Condition Key)**并传入 CAM 鉴权。您可以在 CAM/SCP 策略中基于这些条件键配置 `deny` 规则,从而强制约束节点池的安全配置(如必须开启磁盘加密、安全加固等)。
|
|
55
|
+
|
|
56
|
+
**支持的条件键**
|
|
57
|
+
|
|
58
|
+
| 条件键 | 含义 | 取值 | 取值判定说明 |
|
|
59
|
+
|--------|------|------|-------------|
|
|
60
|
+
| `tke:NodePoolType` | 节点池类型 | `Native` / `External` | 取请求的节点池类型,未指定时默认为 `Native` |
|
|
61
|
+
| `tke:SystemDiskEncrypted` | 系统盘是否加密 | `true` / `false` | 系统盘加密属性为 `ENCRYPT`(大小写不敏感)时为 `true`,否则为 `false` |
|
|
62
|
+
| `tke:AllDataDisksEncrypted` | 所有数据盘是否都已加密 | `true` / `false` | 全部数据盘加密属性均为 `ENCRYPT` 时为 `true`;未配置数据盘时也为 `true`;只要有任一数据盘未加密即为 `false` |
|
|
63
|
+
| `tke:SecurityAgentEnabled` | 是否开启安全加固(Security Agent) | `true` / `false` | 开启安全加固时为 `true`,否则为 `false` |
|
|
64
|
+
|
|
65
|
+
> 说明:所有条件键的取值均为字符串 `"true"` / `"false"`,请在策略中使用字符串形式匹配。
|
|
66
|
+
|
|
67
|
+
**使用方式**
|
|
68
|
+
|
|
69
|
+
在 CAM 策略中使用 `bool_equal` 匹配条件键值为 `"false"`,配合 `effect: deny`,即可实现"未满足安全配置则拒绝创建节点池"的强制约束。
|
|
70
|
+
|
|
71
|
+
**示例一:强制开启安全加固**
|
|
72
|
+
|
|
73
|
+
创建节点池时若未开启安全加固(`tke:SecurityAgentEnabled = "false"`),则拒绝。
|
|
74
|
+
|
|
75
|
+
```json
|
|
76
|
+
{
|
|
77
|
+
"version": "2.0",
|
|
78
|
+
"statement": [
|
|
79
|
+
{
|
|
80
|
+
"effect": "deny",
|
|
81
|
+
"action": ["tke:CreateNodePool"],
|
|
82
|
+
"resource": ["*"],
|
|
83
|
+
"condition": {
|
|
84
|
+
"bool_equal": {
|
|
85
|
+
"tke:SecurityAgentEnabled": "false"
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
]
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
**示例二:强制数据盘加密**
|
|
94
|
+
|
|
95
|
+
创建节点池时若存在未加密的数据盘(`tke:AllDataDisksEncrypted = "false"`),则拒绝。
|
|
96
|
+
|
|
97
|
+
```json
|
|
98
|
+
{
|
|
99
|
+
"version": "2.0",
|
|
100
|
+
"statement": [
|
|
101
|
+
{
|
|
102
|
+
"effect": "deny",
|
|
103
|
+
"action": ["tke:CreateNodePool"],
|
|
104
|
+
"resource": ["*"],
|
|
105
|
+
"condition": {
|
|
106
|
+
"bool_equal": {
|
|
107
|
+
"tke:AllDataDisksEncrypted": "false"
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
**示例三:强制系统盘加密**
|
|
116
|
+
|
|
117
|
+
创建节点池时若系统盘未加密(`tke:SystemDiskEncrypted = "false"`),则拒绝。
|
|
118
|
+
|
|
119
|
+
```json
|
|
120
|
+
{
|
|
121
|
+
"version": "2.0",
|
|
122
|
+
"statement": [
|
|
123
|
+
{
|
|
124
|
+
"effect": "deny",
|
|
125
|
+
"action": ["tke:CreateNodePool"],
|
|
126
|
+
"resource": ["*"],
|
|
127
|
+
"condition": {
|
|
128
|
+
"bool_equal": {
|
|
129
|
+
"tke:SystemDiskEncrypted": "false"
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
]
|
|
134
|
+
}
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
**注意事项**
|
|
138
|
+
|
|
139
|
+
- 上述条件键在**未配置任何 CAM 策略**时不会影响节点池创建,仅在您显式配置了对应 `deny` 策略时才生效。
|
|
140
|
+
- 如需同时强制多项安全配置,必须在同一策略的 `statement` 中配置多条 `deny` 规则,不能将多个条件键写入同一条 `condition`。
|
|
141
|
+
- `tke:AllDataDisksEncrypted` 在**无数据盘**场景下取值为 `true`(不存在未加密的数据盘),因此仅约束"已配置的数据盘必须加密",不会强制要求必须挂载数据盘。
|
|
53
142
|
"""
|
|
54
143
|
|
|
55
144
|
kwargs = {}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: tencentcloud-sdk-python-tke
|
|
3
|
-
Version: 3.1.
|
|
3
|
+
Version: 3.1.134
|
|
4
4
|
Summary: Tencent Cloud Tke SDK for Python
|
|
5
5
|
Home-page: https://github.com/TencentCloud/tencentcloud-sdk-python
|
|
6
6
|
Author: Tencent Cloud
|
|
@@ -15,7 +15,7 @@ Classifier: Programming Language :: Python :: 2.7
|
|
|
15
15
|
Classifier: Programming Language :: Python :: 3
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.6
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.7
|
|
18
|
-
Requires-Dist: tencentcloud-sdk-python-common<4.0.0,>=3.1.
|
|
18
|
+
Requires-Dist: tencentcloud-sdk-python-common<4.0.0,>=3.1.134
|
|
19
19
|
|
|
20
20
|
============================
|
|
21
21
|
Tencent Cloud SDK for Python
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
tencentcloud-sdk-python-common<4.0.0,>=3.1.134
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
tencentcloud-sdk-python-common<4.0.0,>=3.1.128
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|