pulumi-alicloud 3.56.0a1717132537__py3-none-any.whl → 3.56.0a1717175543__py3-none-any.whl
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.
Potentially problematic release.
This version of pulumi-alicloud might be problematic. Click here for more details.
- pulumi_alicloud/__init__.py +96 -0
- pulumi_alicloud/alikafka/instance.py +47 -0
- pulumi_alicloud/apigateway/__init__.py +1 -0
- pulumi_alicloud/apigateway/_inputs.py +40 -0
- pulumi_alicloud/apigateway/access_control_list.py +322 -0
- pulumi_alicloud/apigateway/get_apis.py +96 -23
- pulumi_alicloud/apigateway/outputs.py +72 -14
- pulumi_alicloud/apigateway/plugin.py +225 -73
- pulumi_alicloud/cen/get_transit_router_vpc_attachments.py +171 -18
- pulumi_alicloud/cen/outputs.py +51 -22
- pulumi_alicloud/cloudfirewall/__init__.py +2 -0
- pulumi_alicloud/cloudfirewall/_inputs.py +68 -0
- pulumi_alicloud/cloudfirewall/nat_firewall.py +811 -0
- pulumi_alicloud/cloudfirewall/nat_firewall_control_policy.py +1589 -0
- pulumi_alicloud/cloudfirewall/outputs.py +75 -0
- pulumi_alicloud/ecs/security_group_rule.py +75 -53
- pulumi_alicloud/ess/_inputs.py +56 -0
- pulumi_alicloud/ess/outputs.py +61 -0
- pulumi_alicloud/ess/scaling_group.py +101 -7
- pulumi_alicloud/kms/key.py +251 -333
- pulumi_alicloud/kms/secret.py +210 -125
- pulumi_alicloud/nas/__init__.py +2 -0
- pulumi_alicloud/nas/_inputs.py +126 -0
- pulumi_alicloud/nas/access_point.py +743 -0
- pulumi_alicloud/nas/outputs.py +128 -0
- pulumi_alicloud/oss/__init__.py +7 -0
- pulumi_alicloud/oss/account_public_access_block.py +200 -0
- pulumi_alicloud/oss/bucket_access_monitor.py +206 -0
- pulumi_alicloud/oss/bucket_data_redundancy_transition.py +290 -0
- pulumi_alicloud/oss/bucket_meta_query.py +270 -0
- pulumi_alicloud/oss/bucket_public_access_block.py +258 -0
- pulumi_alicloud/oss/bucket_transfer_acceleration.py +205 -0
- pulumi_alicloud/oss/bucket_user_defined_log_fields.py +328 -0
- pulumi_alicloud/pulumi-plugin.json +1 -1
- pulumi_alicloud/redis/tair_instance.py +188 -0
- pulumi_alicloud/sls/__init__.py +1 -0
- pulumi_alicloud/sls/_inputs.py +384 -0
- pulumi_alicloud/sls/outputs.py +358 -0
- pulumi_alicloud/sls/scheduled_sql.py +523 -0
- {pulumi_alicloud-3.56.0a1717132537.dist-info → pulumi_alicloud-3.56.0a1717175543.dist-info}/METADATA +1 -1
- {pulumi_alicloud-3.56.0a1717132537.dist-info → pulumi_alicloud-3.56.0a1717175543.dist-info}/RECORD +43 -30
- {pulumi_alicloud-3.56.0a1717132537.dist-info → pulumi_alicloud-3.56.0a1717175543.dist-info}/WHEEL +0 -0
- {pulumi_alicloud-3.56.0a1717132537.dist-info → pulumi_alicloud-3.56.0a1717175543.dist-info}/top_level.txt +0 -0
pulumi_alicloud/kms/key.py
CHANGED
|
@@ -24,61 +24,44 @@ class KeyArgs:
|
|
|
24
24
|
key_usage: Optional[pulumi.Input[str]] = None,
|
|
25
25
|
origin: Optional[pulumi.Input[str]] = None,
|
|
26
26
|
pending_window_in_days: Optional[pulumi.Input[int]] = None,
|
|
27
|
+
policy: Optional[pulumi.Input[str]] = None,
|
|
27
28
|
protection_level: Optional[pulumi.Input[str]] = None,
|
|
28
29
|
rotation_interval: Optional[pulumi.Input[str]] = None,
|
|
29
30
|
status: Optional[pulumi.Input[str]] = None,
|
|
30
31
|
tags: Optional[pulumi.Input[Mapping[str, Any]]] = None):
|
|
31
32
|
"""
|
|
32
33
|
The set of arguments for constructing a Key resource.
|
|
33
|
-
:param pulumi.Input[str] automatic_rotation: Specifies whether to enable automatic key rotation. Default value: `Disabled`. Valid values:
|
|
34
|
-
- `Enabled`
|
|
35
|
-
- `Disabled`
|
|
36
|
-
**NOTE**: If you set the origin parameter to EXTERNAL or the key_spec parameter to an asymmetric CMK type, automatic key rotation is unavailable.
|
|
34
|
+
:param pulumi.Input[str] automatic_rotation: Specifies whether to enable automatic key rotation. Default value: `Disabled`. Valid values: `Enabled`, `Disabled`.
|
|
37
35
|
:param pulumi.Input[int] deletion_window_in_days: Field `deletion_window_in_days` has been deprecated from provider version 1.85.0. New field `pending_window_in_days` instead.
|
|
38
|
-
:param pulumi.Input[str] description: The description of the
|
|
39
|
-
:param pulumi.Input[str] dkms_instance_id: The
|
|
36
|
+
:param pulumi.Input[str] description: The description of the key.
|
|
37
|
+
:param pulumi.Input[str] dkms_instance_id: The ID of the KMS instance.
|
|
40
38
|
:param pulumi.Input[bool] is_enabled: Field `is_enabled` has been deprecated from provider version 1.85.0. New field `status` instead.
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
:param pulumi.Input[str] key_usage: The usage of the CMK. Default value: `ENCRYPT/DECRYPT`. Valid values:
|
|
46
|
-
- `ENCRYPT/DECRYPT`: encrypts or decrypts data.
|
|
47
|
-
- `SIGN/VERIFY`: generates or verifies a digital signature.
|
|
48
|
-
:param pulumi.Input[str] origin: The source of key material. Default value: `Aliyun_KMS`. Valid values:
|
|
49
|
-
- `Aliyun_KMS`
|
|
50
|
-
- `EXTERNAL`
|
|
51
|
-
**NOTE**: The value of this parameter is case-sensitive. If you set the `key_spec` to an asymmetric CMK type,
|
|
52
|
-
you are not allowed to set the `origin` to EXTERNAL. If you set the `origin` to EXTERNAL, you must import key material.
|
|
53
|
-
For more information, see [import key material](https://www.alibabacloud.com/help/en/doc-detail/68523.htm).
|
|
54
|
-
:param pulumi.Input[int] pending_window_in_days: The number of days before the CMK is deleted.
|
|
55
|
-
During this period, the CMK is in the PendingDeletion state.
|
|
56
|
-
After this period ends, you cannot cancel the deletion. Valid values: 7 to 366. Unit: days.
|
|
57
|
-
**NOTE:** From version 1.184.0, `pending_window_in_days` can be set to `366`.
|
|
58
|
-
:param pulumi.Input[str] protection_level: The protection level of the CMK. Default value: `SOFTWARE`. Valid values:
|
|
59
|
-
- `SOFTWARE`
|
|
60
|
-
- `HSM`
|
|
61
|
-
**NOTE**: The value of this parameter is case-sensitive. Assume that you set this parameter to HSM.
|
|
62
|
-
If you set the origin parameter to Aliyun_KMS, the CMK is created in a managed hardware security module (HSM).
|
|
63
|
-
If you set the origin parameter to EXTERNA, you can import an external key to the managed HSM.
|
|
64
|
-
:param pulumi.Input[str] rotation_interval: The interval for automatic key rotation. Specify the value in the integer[unit] format.
|
|
65
|
-
The following units are supported: d (day), h (hour), m (minute), and s (second).
|
|
66
|
-
For example, you can use either 7d or 604800s to specify a seven-day interval.
|
|
67
|
-
The interval can range from 7 days to 730 days.
|
|
68
|
-
**NOTE**: It is Required when `automatic_rotation = "Enabled"`
|
|
39
|
+
|
|
40
|
+
> **NOTE:** If you set the origin parameter to EXTERNAL or the key_spec parameter to an asymmetric CMK type, automatic key rotation is unavailable.
|
|
41
|
+
|
|
42
|
+
> **NOTE:** The default type of the CMK is `Aliyun_AES_256`. Only Dedicated KMS supports `Aliyun_AES_128` and `Aliyun_AES_192`.
|
|
69
43
|
|
|
70
44
|
> **NOTE:** When the pre-deletion days elapses, the key is permanently deleted and cannot be recovered.
|
|
71
|
-
:param pulumi.Input[str]
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
- `
|
|
45
|
+
:param pulumi.Input[str] key_spec: The specification of the key. Default value: `Aliyun_AES_256`. Valid values: `Aliyun_AES_256`, `Aliyun_AES_128`, `Aliyun_AES_192`, `Aliyun_SM4`, `RSA_2048`, `RSA_3072`, `EC_P256`, `EC_P256K`, `EC_SM2`.
|
|
46
|
+
:param pulumi.Input[str] key_state: Field `key_state` has been deprecated from provider version 1.123.1. New field `status` instead.
|
|
47
|
+
:param pulumi.Input[str] key_usage: The usage of the key. Default value: `ENCRYPT/DECRYPT`. Valid values:
|
|
48
|
+
- `ENCRYPT/DECRYPT`: Encrypts or decrypts data.
|
|
49
|
+
- `SIGN/VERIFY`: Generates or verifies a digital signature.
|
|
50
|
+
:param pulumi.Input[str] origin: The key material origin. Default value: `Aliyun_KMS`. Valid values: `Aliyun_KMS`, `EXTERNAL`.
|
|
51
|
+
:param pulumi.Input[int] pending_window_in_days: The number of days before the CMK is deleted. During this period, the CMK is in the PendingDeletion state. After this period ends, you cannot cancel the deletion. Unit: days. Valid values: `7` to `366`.
|
|
52
|
+
**NOTE:** From version 1.184.0, `pending_window_in_days` can be set to `366`.
|
|
53
|
+
:param pulumi.Input[str] policy: The content of the key policy. The value is in the JSON format. The value can be up to 32,768 bytes in length. For more information, see [How to use it](https://www.alibabacloud.com/help/en/kms/developer-reference/api-setkeypolicy).
|
|
54
|
+
:param pulumi.Input[str] protection_level: The protection level of the key. Default value: `SOFTWARE`. Valid values: `SOFTWARE`, `HSM`.
|
|
55
|
+
:param pulumi.Input[str] rotation_interval: The period of automatic key rotation. The following units are supported: d (day), h (hour), m (minute), and s (second). For example, you can use either 7d or 604800s to specify a seven-day interval.
|
|
56
|
+
**NOTE**: If `automatic_rotation` is set to `Enabled`, `rotation_interval` is required.
|
|
57
|
+
:param pulumi.Input[str] status: The status of key. Default value: `Enabled`. Valid values: `Enabled`, `Disabled`, `PendingDeletion`.
|
|
75
58
|
:param pulumi.Input[Mapping[str, Any]] tags: A mapping of tags to assign to the resource.
|
|
76
59
|
"""
|
|
77
60
|
if automatic_rotation is not None:
|
|
78
61
|
pulumi.set(__self__, "automatic_rotation", automatic_rotation)
|
|
79
62
|
if deletion_window_in_days is not None:
|
|
80
|
-
warnings.warn("""Field
|
|
81
|
-
pulumi.log.warn("""deletion_window_in_days is deprecated: Field
|
|
63
|
+
warnings.warn("""Field `deletion_window_in_days` has been deprecated from provider version 1.85.0. New field `pending_window_in_days` instead.""", DeprecationWarning)
|
|
64
|
+
pulumi.log.warn("""deletion_window_in_days is deprecated: Field `deletion_window_in_days` has been deprecated from provider version 1.85.0. New field `pending_window_in_days` instead.""")
|
|
82
65
|
if deletion_window_in_days is not None:
|
|
83
66
|
pulumi.set(__self__, "deletion_window_in_days", deletion_window_in_days)
|
|
84
67
|
if description is not None:
|
|
@@ -86,15 +69,15 @@ class KeyArgs:
|
|
|
86
69
|
if dkms_instance_id is not None:
|
|
87
70
|
pulumi.set(__self__, "dkms_instance_id", dkms_instance_id)
|
|
88
71
|
if is_enabled is not None:
|
|
89
|
-
warnings.warn("""Field
|
|
90
|
-
pulumi.log.warn("""is_enabled is deprecated: Field
|
|
72
|
+
warnings.warn("""Field `is_enabled` has been deprecated from provider version 1.85.0. New field `key_state` instead.""", DeprecationWarning)
|
|
73
|
+
pulumi.log.warn("""is_enabled is deprecated: Field `is_enabled` has been deprecated from provider version 1.85.0. New field `key_state` instead.""")
|
|
91
74
|
if is_enabled is not None:
|
|
92
75
|
pulumi.set(__self__, "is_enabled", is_enabled)
|
|
93
76
|
if key_spec is not None:
|
|
94
77
|
pulumi.set(__self__, "key_spec", key_spec)
|
|
95
78
|
if key_state is not None:
|
|
96
|
-
warnings.warn("""Field
|
|
97
|
-
pulumi.log.warn("""key_state is deprecated: Field
|
|
79
|
+
warnings.warn("""Field `key_state` has been deprecated from provider version 1.123.1. New field `status` instead.""", DeprecationWarning)
|
|
80
|
+
pulumi.log.warn("""key_state is deprecated: Field `key_state` has been deprecated from provider version 1.123.1. New field `status` instead.""")
|
|
98
81
|
if key_state is not None:
|
|
99
82
|
pulumi.set(__self__, "key_state", key_state)
|
|
100
83
|
if key_usage is not None:
|
|
@@ -103,6 +86,8 @@ class KeyArgs:
|
|
|
103
86
|
pulumi.set(__self__, "origin", origin)
|
|
104
87
|
if pending_window_in_days is not None:
|
|
105
88
|
pulumi.set(__self__, "pending_window_in_days", pending_window_in_days)
|
|
89
|
+
if policy is not None:
|
|
90
|
+
pulumi.set(__self__, "policy", policy)
|
|
106
91
|
if protection_level is not None:
|
|
107
92
|
pulumi.set(__self__, "protection_level", protection_level)
|
|
108
93
|
if rotation_interval is not None:
|
|
@@ -116,10 +101,7 @@ class KeyArgs:
|
|
|
116
101
|
@pulumi.getter(name="automaticRotation")
|
|
117
102
|
def automatic_rotation(self) -> Optional[pulumi.Input[str]]:
|
|
118
103
|
"""
|
|
119
|
-
Specifies whether to enable automatic key rotation. Default value: `Disabled`. Valid values:
|
|
120
|
-
- `Enabled`
|
|
121
|
-
- `Disabled`
|
|
122
|
-
**NOTE**: If you set the origin parameter to EXTERNAL or the key_spec parameter to an asymmetric CMK type, automatic key rotation is unavailable.
|
|
104
|
+
Specifies whether to enable automatic key rotation. Default value: `Disabled`. Valid values: `Enabled`, `Disabled`.
|
|
123
105
|
"""
|
|
124
106
|
return pulumi.get(self, "automatic_rotation")
|
|
125
107
|
|
|
@@ -133,8 +115,8 @@ class KeyArgs:
|
|
|
133
115
|
"""
|
|
134
116
|
Field `deletion_window_in_days` has been deprecated from provider version 1.85.0. New field `pending_window_in_days` instead.
|
|
135
117
|
"""
|
|
136
|
-
warnings.warn("""Field
|
|
137
|
-
pulumi.log.warn("""deletion_window_in_days is deprecated: Field
|
|
118
|
+
warnings.warn("""Field `deletion_window_in_days` has been deprecated from provider version 1.85.0. New field `pending_window_in_days` instead.""", DeprecationWarning)
|
|
119
|
+
pulumi.log.warn("""deletion_window_in_days is deprecated: Field `deletion_window_in_days` has been deprecated from provider version 1.85.0. New field `pending_window_in_days` instead.""")
|
|
138
120
|
|
|
139
121
|
return pulumi.get(self, "deletion_window_in_days")
|
|
140
122
|
|
|
@@ -146,7 +128,7 @@ class KeyArgs:
|
|
|
146
128
|
@pulumi.getter
|
|
147
129
|
def description(self) -> Optional[pulumi.Input[str]]:
|
|
148
130
|
"""
|
|
149
|
-
The description of the
|
|
131
|
+
The description of the key.
|
|
150
132
|
"""
|
|
151
133
|
return pulumi.get(self, "description")
|
|
152
134
|
|
|
@@ -158,7 +140,7 @@ class KeyArgs:
|
|
|
158
140
|
@pulumi.getter(name="dkmsInstanceId")
|
|
159
141
|
def dkms_instance_id(self) -> Optional[pulumi.Input[str]]:
|
|
160
142
|
"""
|
|
161
|
-
The
|
|
143
|
+
The ID of the KMS instance.
|
|
162
144
|
"""
|
|
163
145
|
return pulumi.get(self, "dkms_instance_id")
|
|
164
146
|
|
|
@@ -171,9 +153,15 @@ class KeyArgs:
|
|
|
171
153
|
def is_enabled(self) -> Optional[pulumi.Input[bool]]:
|
|
172
154
|
"""
|
|
173
155
|
Field `is_enabled` has been deprecated from provider version 1.85.0. New field `status` instead.
|
|
156
|
+
|
|
157
|
+
> **NOTE:** If you set the origin parameter to EXTERNAL or the key_spec parameter to an asymmetric CMK type, automatic key rotation is unavailable.
|
|
158
|
+
|
|
159
|
+
> **NOTE:** The default type of the CMK is `Aliyun_AES_256`. Only Dedicated KMS supports `Aliyun_AES_128` and `Aliyun_AES_192`.
|
|
160
|
+
|
|
161
|
+
> **NOTE:** When the pre-deletion days elapses, the key is permanently deleted and cannot be recovered.
|
|
174
162
|
"""
|
|
175
|
-
warnings.warn("""Field
|
|
176
|
-
pulumi.log.warn("""is_enabled is deprecated: Field
|
|
163
|
+
warnings.warn("""Field `is_enabled` has been deprecated from provider version 1.85.0. New field `key_state` instead.""", DeprecationWarning)
|
|
164
|
+
pulumi.log.warn("""is_enabled is deprecated: Field `is_enabled` has been deprecated from provider version 1.85.0. New field `key_state` instead.""")
|
|
177
165
|
|
|
178
166
|
return pulumi.get(self, "is_enabled")
|
|
179
167
|
|
|
@@ -185,9 +173,7 @@ class KeyArgs:
|
|
|
185
173
|
@pulumi.getter(name="keySpec")
|
|
186
174
|
def key_spec(self) -> Optional[pulumi.Input[str]]:
|
|
187
175
|
"""
|
|
188
|
-
The
|
|
189
|
-
`Aliyun_AES_256`, `Aliyun_AES_128`, `Aliyun_AES_192`, `Aliyun_SM4`, `RSA_2048`, `RSA_3072`, `EC_P256`, `EC_P256K`, `EC_SM2`.
|
|
190
|
-
Note: The default type of the CMK is `Aliyun_AES_256`. Only Dedicated KMS supports `Aliyun_AES_128` and `Aliyun_AES_192`.
|
|
176
|
+
The specification of the key. Default value: `Aliyun_AES_256`. Valid values: `Aliyun_AES_256`, `Aliyun_AES_128`, `Aliyun_AES_192`, `Aliyun_SM4`, `RSA_2048`, `RSA_3072`, `EC_P256`, `EC_P256K`, `EC_SM2`.
|
|
191
177
|
"""
|
|
192
178
|
return pulumi.get(self, "key_spec")
|
|
193
179
|
|
|
@@ -201,8 +187,8 @@ class KeyArgs:
|
|
|
201
187
|
"""
|
|
202
188
|
Field `key_state` has been deprecated from provider version 1.123.1. New field `status` instead.
|
|
203
189
|
"""
|
|
204
|
-
warnings.warn("""Field
|
|
205
|
-
pulumi.log.warn("""key_state is deprecated: Field
|
|
190
|
+
warnings.warn("""Field `key_state` has been deprecated from provider version 1.123.1. New field `status` instead.""", DeprecationWarning)
|
|
191
|
+
pulumi.log.warn("""key_state is deprecated: Field `key_state` has been deprecated from provider version 1.123.1. New field `status` instead.""")
|
|
206
192
|
|
|
207
193
|
return pulumi.get(self, "key_state")
|
|
208
194
|
|
|
@@ -214,9 +200,9 @@ class KeyArgs:
|
|
|
214
200
|
@pulumi.getter(name="keyUsage")
|
|
215
201
|
def key_usage(self) -> Optional[pulumi.Input[str]]:
|
|
216
202
|
"""
|
|
217
|
-
The usage of the
|
|
218
|
-
- `ENCRYPT/DECRYPT`:
|
|
219
|
-
- `SIGN/VERIFY`:
|
|
203
|
+
The usage of the key. Default value: `ENCRYPT/DECRYPT`. Valid values:
|
|
204
|
+
- `ENCRYPT/DECRYPT`: Encrypts or decrypts data.
|
|
205
|
+
- `SIGN/VERIFY`: Generates or verifies a digital signature.
|
|
220
206
|
"""
|
|
221
207
|
return pulumi.get(self, "key_usage")
|
|
222
208
|
|
|
@@ -228,12 +214,7 @@ class KeyArgs:
|
|
|
228
214
|
@pulumi.getter
|
|
229
215
|
def origin(self) -> Optional[pulumi.Input[str]]:
|
|
230
216
|
"""
|
|
231
|
-
The
|
|
232
|
-
- `Aliyun_KMS`
|
|
233
|
-
- `EXTERNAL`
|
|
234
|
-
**NOTE**: The value of this parameter is case-sensitive. If you set the `key_spec` to an asymmetric CMK type,
|
|
235
|
-
you are not allowed to set the `origin` to EXTERNAL. If you set the `origin` to EXTERNAL, you must import key material.
|
|
236
|
-
For more information, see [import key material](https://www.alibabacloud.com/help/en/doc-detail/68523.htm).
|
|
217
|
+
The key material origin. Default value: `Aliyun_KMS`. Valid values: `Aliyun_KMS`, `EXTERNAL`.
|
|
237
218
|
"""
|
|
238
219
|
return pulumi.get(self, "origin")
|
|
239
220
|
|
|
@@ -245,9 +226,7 @@ class KeyArgs:
|
|
|
245
226
|
@pulumi.getter(name="pendingWindowInDays")
|
|
246
227
|
def pending_window_in_days(self) -> Optional[pulumi.Input[int]]:
|
|
247
228
|
"""
|
|
248
|
-
The number of days before the CMK is deleted.
|
|
249
|
-
During this period, the CMK is in the PendingDeletion state.
|
|
250
|
-
After this period ends, you cannot cancel the deletion. Valid values: 7 to 366. Unit: days.
|
|
229
|
+
The number of days before the CMK is deleted. During this period, the CMK is in the PendingDeletion state. After this period ends, you cannot cancel the deletion. Unit: days. Valid values: `7` to `366`.
|
|
251
230
|
**NOTE:** From version 1.184.0, `pending_window_in_days` can be set to `366`.
|
|
252
231
|
"""
|
|
253
232
|
return pulumi.get(self, "pending_window_in_days")
|
|
@@ -256,16 +235,23 @@ class KeyArgs:
|
|
|
256
235
|
def pending_window_in_days(self, value: Optional[pulumi.Input[int]]):
|
|
257
236
|
pulumi.set(self, "pending_window_in_days", value)
|
|
258
237
|
|
|
238
|
+
@property
|
|
239
|
+
@pulumi.getter
|
|
240
|
+
def policy(self) -> Optional[pulumi.Input[str]]:
|
|
241
|
+
"""
|
|
242
|
+
The content of the key policy. The value is in the JSON format. The value can be up to 32,768 bytes in length. For more information, see [How to use it](https://www.alibabacloud.com/help/en/kms/developer-reference/api-setkeypolicy).
|
|
243
|
+
"""
|
|
244
|
+
return pulumi.get(self, "policy")
|
|
245
|
+
|
|
246
|
+
@policy.setter
|
|
247
|
+
def policy(self, value: Optional[pulumi.Input[str]]):
|
|
248
|
+
pulumi.set(self, "policy", value)
|
|
249
|
+
|
|
259
250
|
@property
|
|
260
251
|
@pulumi.getter(name="protectionLevel")
|
|
261
252
|
def protection_level(self) -> Optional[pulumi.Input[str]]:
|
|
262
253
|
"""
|
|
263
|
-
The protection level of the
|
|
264
|
-
- `SOFTWARE`
|
|
265
|
-
- `HSM`
|
|
266
|
-
**NOTE**: The value of this parameter is case-sensitive. Assume that you set this parameter to HSM.
|
|
267
|
-
If you set the origin parameter to Aliyun_KMS, the CMK is created in a managed hardware security module (HSM).
|
|
268
|
-
If you set the origin parameter to EXTERNA, you can import an external key to the managed HSM.
|
|
254
|
+
The protection level of the key. Default value: `SOFTWARE`. Valid values: `SOFTWARE`, `HSM`.
|
|
269
255
|
"""
|
|
270
256
|
return pulumi.get(self, "protection_level")
|
|
271
257
|
|
|
@@ -277,13 +263,8 @@ class KeyArgs:
|
|
|
277
263
|
@pulumi.getter(name="rotationInterval")
|
|
278
264
|
def rotation_interval(self) -> Optional[pulumi.Input[str]]:
|
|
279
265
|
"""
|
|
280
|
-
The
|
|
281
|
-
|
|
282
|
-
For example, you can use either 7d or 604800s to specify a seven-day interval.
|
|
283
|
-
The interval can range from 7 days to 730 days.
|
|
284
|
-
**NOTE**: It is Required when `automatic_rotation = "Enabled"`
|
|
285
|
-
|
|
286
|
-
> **NOTE:** When the pre-deletion days elapses, the key is permanently deleted and cannot be recovered.
|
|
266
|
+
The period of automatic key rotation. The following units are supported: d (day), h (hour), m (minute), and s (second). For example, you can use either 7d or 604800s to specify a seven-day interval.
|
|
267
|
+
**NOTE**: If `automatic_rotation` is set to `Enabled`, `rotation_interval` is required.
|
|
287
268
|
"""
|
|
288
269
|
return pulumi.get(self, "rotation_interval")
|
|
289
270
|
|
|
@@ -295,10 +276,7 @@ class KeyArgs:
|
|
|
295
276
|
@pulumi.getter
|
|
296
277
|
def status(self) -> Optional[pulumi.Input[str]]:
|
|
297
278
|
"""
|
|
298
|
-
The status of
|
|
299
|
-
- `Disabled`
|
|
300
|
-
- `Enabled`
|
|
301
|
-
- `PendingDeletion`
|
|
279
|
+
The status of key. Default value: `Enabled`. Valid values: `Enabled`, `Disabled`, `PendingDeletion`.
|
|
302
280
|
"""
|
|
303
281
|
return pulumi.get(self, "status")
|
|
304
282
|
|
|
@@ -339,6 +317,7 @@ class _KeyState:
|
|
|
339
317
|
next_rotation_date: Optional[pulumi.Input[str]] = None,
|
|
340
318
|
origin: Optional[pulumi.Input[str]] = None,
|
|
341
319
|
pending_window_in_days: Optional[pulumi.Input[int]] = None,
|
|
320
|
+
policy: Optional[pulumi.Input[str]] = None,
|
|
342
321
|
primary_key_version: Optional[pulumi.Input[str]] = None,
|
|
343
322
|
protection_level: Optional[pulumi.Input[str]] = None,
|
|
344
323
|
rotation_interval: Optional[pulumi.Input[str]] = None,
|
|
@@ -346,56 +325,38 @@ class _KeyState:
|
|
|
346
325
|
tags: Optional[pulumi.Input[Mapping[str, Any]]] = None):
|
|
347
326
|
"""
|
|
348
327
|
Input properties used for looking up and filtering Key resources.
|
|
349
|
-
:param pulumi.Input[str] arn: The
|
|
350
|
-
:param pulumi.Input[str] automatic_rotation: Specifies whether to enable automatic key rotation. Default value: `Disabled`. Valid values:
|
|
351
|
-
|
|
352
|
-
- `Disabled`
|
|
353
|
-
**NOTE**: If you set the origin parameter to EXTERNAL or the key_spec parameter to an asymmetric CMK type, automatic key rotation is unavailable.
|
|
354
|
-
:param pulumi.Input[str] creation_date: The date and time when the CMK was created. The time is displayed in UTC.
|
|
328
|
+
:param pulumi.Input[str] arn: The ARN of the key.
|
|
329
|
+
:param pulumi.Input[str] automatic_rotation: Specifies whether to enable automatic key rotation. Default value: `Disabled`. Valid values: `Enabled`, `Disabled`.
|
|
330
|
+
:param pulumi.Input[str] creation_date: The time when the CMK was created.
|
|
355
331
|
:param pulumi.Input[str] creator: The creator of the CMK.
|
|
356
|
-
:param pulumi.Input[str] delete_date: The
|
|
332
|
+
:param pulumi.Input[str] delete_date: The time at which the CMK is scheduled for deletion.
|
|
357
333
|
:param pulumi.Input[int] deletion_window_in_days: Field `deletion_window_in_days` has been deprecated from provider version 1.85.0. New field `pending_window_in_days` instead.
|
|
358
|
-
:param pulumi.Input[str] description: The description of the
|
|
359
|
-
:param pulumi.Input[str] dkms_instance_id: The
|
|
334
|
+
:param pulumi.Input[str] description: The description of the key.
|
|
335
|
+
:param pulumi.Input[str] dkms_instance_id: The ID of the KMS instance.
|
|
360
336
|
:param pulumi.Input[bool] is_enabled: Field `is_enabled` has been deprecated from provider version 1.85.0. New field `status` instead.
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
337
|
+
|
|
338
|
+
> **NOTE:** If you set the origin parameter to EXTERNAL or the key_spec parameter to an asymmetric CMK type, automatic key rotation is unavailable.
|
|
339
|
+
|
|
340
|
+
> **NOTE:** The default type of the CMK is `Aliyun_AES_256`. Only Dedicated KMS supports `Aliyun_AES_128` and `Aliyun_AES_192`.
|
|
341
|
+
|
|
342
|
+
> **NOTE:** When the pre-deletion days elapses, the key is permanently deleted and cannot be recovered.
|
|
343
|
+
:param pulumi.Input[str] key_spec: The specification of the key. Default value: `Aliyun_AES_256`. Valid values: `Aliyun_AES_256`, `Aliyun_AES_128`, `Aliyun_AES_192`, `Aliyun_SM4`, `RSA_2048`, `RSA_3072`, `EC_P256`, `EC_P256K`, `EC_SM2`.
|
|
364
344
|
:param pulumi.Input[str] key_state: Field `key_state` has been deprecated from provider version 1.123.1. New field `status` instead.
|
|
365
|
-
:param pulumi.Input[str] key_usage: The usage of the
|
|
366
|
-
- `ENCRYPT/DECRYPT`:
|
|
367
|
-
- `SIGN/VERIFY`:
|
|
368
|
-
:param pulumi.Input[str] last_rotation_date: The
|
|
369
|
-
:param pulumi.Input[str] material_expire_time: The time
|
|
370
|
-
:param pulumi.Input[str] next_rotation_date: The time the next rotation
|
|
371
|
-
:param pulumi.Input[str] origin: The
|
|
372
|
-
|
|
373
|
-
- `EXTERNAL`
|
|
374
|
-
**NOTE**: The value of this parameter is case-sensitive. If you set the `key_spec` to an asymmetric CMK type,
|
|
375
|
-
you are not allowed to set the `origin` to EXTERNAL. If you set the `origin` to EXTERNAL, you must import key material.
|
|
376
|
-
For more information, see [import key material](https://www.alibabacloud.com/help/en/doc-detail/68523.htm).
|
|
377
|
-
:param pulumi.Input[int] pending_window_in_days: The number of days before the CMK is deleted.
|
|
378
|
-
During this period, the CMK is in the PendingDeletion state.
|
|
379
|
-
After this period ends, you cannot cancel the deletion. Valid values: 7 to 366. Unit: days.
|
|
345
|
+
:param pulumi.Input[str] key_usage: The usage of the key. Default value: `ENCRYPT/DECRYPT`. Valid values:
|
|
346
|
+
- `ENCRYPT/DECRYPT`: Encrypts or decrypts data.
|
|
347
|
+
- `SIGN/VERIFY`: Generates or verifies a digital signature.
|
|
348
|
+
:param pulumi.Input[str] last_rotation_date: The time when the last rotation was performed.
|
|
349
|
+
:param pulumi.Input[str] material_expire_time: The time when the key material expires.
|
|
350
|
+
:param pulumi.Input[str] next_rotation_date: The time when the next rotation will be performed.
|
|
351
|
+
:param pulumi.Input[str] origin: The key material origin. Default value: `Aliyun_KMS`. Valid values: `Aliyun_KMS`, `EXTERNAL`.
|
|
352
|
+
:param pulumi.Input[int] pending_window_in_days: The number of days before the CMK is deleted. During this period, the CMK is in the PendingDeletion state. After this period ends, you cannot cancel the deletion. Unit: days. Valid values: `7` to `366`.
|
|
380
353
|
**NOTE:** From version 1.184.0, `pending_window_in_days` can be set to `366`.
|
|
354
|
+
:param pulumi.Input[str] policy: The content of the key policy. The value is in the JSON format. The value can be up to 32,768 bytes in length. For more information, see [How to use it](https://www.alibabacloud.com/help/en/kms/developer-reference/api-setkeypolicy).
|
|
381
355
|
:param pulumi.Input[str] primary_key_version: The ID of the current primary key version of the symmetric CMK.
|
|
382
|
-
:param pulumi.Input[str] protection_level: The protection level of the
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
If you set the origin parameter to Aliyun_KMS, the CMK is created in a managed hardware security module (HSM).
|
|
387
|
-
If you set the origin parameter to EXTERNA, you can import an external key to the managed HSM.
|
|
388
|
-
:param pulumi.Input[str] rotation_interval: The interval for automatic key rotation. Specify the value in the integer[unit] format.
|
|
389
|
-
The following units are supported: d (day), h (hour), m (minute), and s (second).
|
|
390
|
-
For example, you can use either 7d or 604800s to specify a seven-day interval.
|
|
391
|
-
The interval can range from 7 days to 730 days.
|
|
392
|
-
**NOTE**: It is Required when `automatic_rotation = "Enabled"`
|
|
393
|
-
|
|
394
|
-
> **NOTE:** When the pre-deletion days elapses, the key is permanently deleted and cannot be recovered.
|
|
395
|
-
:param pulumi.Input[str] status: The status of CMK. Default value: `Enabled`. Valid Values:
|
|
396
|
-
- `Disabled`
|
|
397
|
-
- `Enabled`
|
|
398
|
-
- `PendingDeletion`
|
|
356
|
+
:param pulumi.Input[str] protection_level: The protection level of the key. Default value: `SOFTWARE`. Valid values: `SOFTWARE`, `HSM`.
|
|
357
|
+
:param pulumi.Input[str] rotation_interval: The period of automatic key rotation. The following units are supported: d (day), h (hour), m (minute), and s (second). For example, you can use either 7d or 604800s to specify a seven-day interval.
|
|
358
|
+
**NOTE**: If `automatic_rotation` is set to `Enabled`, `rotation_interval` is required.
|
|
359
|
+
:param pulumi.Input[str] status: The status of key. Default value: `Enabled`. Valid values: `Enabled`, `Disabled`, `PendingDeletion`.
|
|
399
360
|
:param pulumi.Input[Mapping[str, Any]] tags: A mapping of tags to assign to the resource.
|
|
400
361
|
"""
|
|
401
362
|
if arn is not None:
|
|
@@ -409,8 +370,8 @@ class _KeyState:
|
|
|
409
370
|
if delete_date is not None:
|
|
410
371
|
pulumi.set(__self__, "delete_date", delete_date)
|
|
411
372
|
if deletion_window_in_days is not None:
|
|
412
|
-
warnings.warn("""Field
|
|
413
|
-
pulumi.log.warn("""deletion_window_in_days is deprecated: Field
|
|
373
|
+
warnings.warn("""Field `deletion_window_in_days` has been deprecated from provider version 1.85.0. New field `pending_window_in_days` instead.""", DeprecationWarning)
|
|
374
|
+
pulumi.log.warn("""deletion_window_in_days is deprecated: Field `deletion_window_in_days` has been deprecated from provider version 1.85.0. New field `pending_window_in_days` instead.""")
|
|
414
375
|
if deletion_window_in_days is not None:
|
|
415
376
|
pulumi.set(__self__, "deletion_window_in_days", deletion_window_in_days)
|
|
416
377
|
if description is not None:
|
|
@@ -418,15 +379,15 @@ class _KeyState:
|
|
|
418
379
|
if dkms_instance_id is not None:
|
|
419
380
|
pulumi.set(__self__, "dkms_instance_id", dkms_instance_id)
|
|
420
381
|
if is_enabled is not None:
|
|
421
|
-
warnings.warn("""Field
|
|
422
|
-
pulumi.log.warn("""is_enabled is deprecated: Field
|
|
382
|
+
warnings.warn("""Field `is_enabled` has been deprecated from provider version 1.85.0. New field `key_state` instead.""", DeprecationWarning)
|
|
383
|
+
pulumi.log.warn("""is_enabled is deprecated: Field `is_enabled` has been deprecated from provider version 1.85.0. New field `key_state` instead.""")
|
|
423
384
|
if is_enabled is not None:
|
|
424
385
|
pulumi.set(__self__, "is_enabled", is_enabled)
|
|
425
386
|
if key_spec is not None:
|
|
426
387
|
pulumi.set(__self__, "key_spec", key_spec)
|
|
427
388
|
if key_state is not None:
|
|
428
|
-
warnings.warn("""Field
|
|
429
|
-
pulumi.log.warn("""key_state is deprecated: Field
|
|
389
|
+
warnings.warn("""Field `key_state` has been deprecated from provider version 1.123.1. New field `status` instead.""", DeprecationWarning)
|
|
390
|
+
pulumi.log.warn("""key_state is deprecated: Field `key_state` has been deprecated from provider version 1.123.1. New field `status` instead.""")
|
|
430
391
|
if key_state is not None:
|
|
431
392
|
pulumi.set(__self__, "key_state", key_state)
|
|
432
393
|
if key_usage is not None:
|
|
@@ -441,6 +402,8 @@ class _KeyState:
|
|
|
441
402
|
pulumi.set(__self__, "origin", origin)
|
|
442
403
|
if pending_window_in_days is not None:
|
|
443
404
|
pulumi.set(__self__, "pending_window_in_days", pending_window_in_days)
|
|
405
|
+
if policy is not None:
|
|
406
|
+
pulumi.set(__self__, "policy", policy)
|
|
444
407
|
if primary_key_version is not None:
|
|
445
408
|
pulumi.set(__self__, "primary_key_version", primary_key_version)
|
|
446
409
|
if protection_level is not None:
|
|
@@ -456,7 +419,7 @@ class _KeyState:
|
|
|
456
419
|
@pulumi.getter
|
|
457
420
|
def arn(self) -> Optional[pulumi.Input[str]]:
|
|
458
421
|
"""
|
|
459
|
-
The
|
|
422
|
+
The ARN of the key.
|
|
460
423
|
"""
|
|
461
424
|
return pulumi.get(self, "arn")
|
|
462
425
|
|
|
@@ -468,10 +431,7 @@ class _KeyState:
|
|
|
468
431
|
@pulumi.getter(name="automaticRotation")
|
|
469
432
|
def automatic_rotation(self) -> Optional[pulumi.Input[str]]:
|
|
470
433
|
"""
|
|
471
|
-
Specifies whether to enable automatic key rotation. Default value: `Disabled`. Valid values:
|
|
472
|
-
- `Enabled`
|
|
473
|
-
- `Disabled`
|
|
474
|
-
**NOTE**: If you set the origin parameter to EXTERNAL or the key_spec parameter to an asymmetric CMK type, automatic key rotation is unavailable.
|
|
434
|
+
Specifies whether to enable automatic key rotation. Default value: `Disabled`. Valid values: `Enabled`, `Disabled`.
|
|
475
435
|
"""
|
|
476
436
|
return pulumi.get(self, "automatic_rotation")
|
|
477
437
|
|
|
@@ -483,7 +443,7 @@ class _KeyState:
|
|
|
483
443
|
@pulumi.getter(name="creationDate")
|
|
484
444
|
def creation_date(self) -> Optional[pulumi.Input[str]]:
|
|
485
445
|
"""
|
|
486
|
-
The
|
|
446
|
+
The time when the CMK was created.
|
|
487
447
|
"""
|
|
488
448
|
return pulumi.get(self, "creation_date")
|
|
489
449
|
|
|
@@ -507,7 +467,7 @@ class _KeyState:
|
|
|
507
467
|
@pulumi.getter(name="deleteDate")
|
|
508
468
|
def delete_date(self) -> Optional[pulumi.Input[str]]:
|
|
509
469
|
"""
|
|
510
|
-
The
|
|
470
|
+
The time at which the CMK is scheduled for deletion.
|
|
511
471
|
"""
|
|
512
472
|
return pulumi.get(self, "delete_date")
|
|
513
473
|
|
|
@@ -521,8 +481,8 @@ class _KeyState:
|
|
|
521
481
|
"""
|
|
522
482
|
Field `deletion_window_in_days` has been deprecated from provider version 1.85.0. New field `pending_window_in_days` instead.
|
|
523
483
|
"""
|
|
524
|
-
warnings.warn("""Field
|
|
525
|
-
pulumi.log.warn("""deletion_window_in_days is deprecated: Field
|
|
484
|
+
warnings.warn("""Field `deletion_window_in_days` has been deprecated from provider version 1.85.0. New field `pending_window_in_days` instead.""", DeprecationWarning)
|
|
485
|
+
pulumi.log.warn("""deletion_window_in_days is deprecated: Field `deletion_window_in_days` has been deprecated from provider version 1.85.0. New field `pending_window_in_days` instead.""")
|
|
526
486
|
|
|
527
487
|
return pulumi.get(self, "deletion_window_in_days")
|
|
528
488
|
|
|
@@ -534,7 +494,7 @@ class _KeyState:
|
|
|
534
494
|
@pulumi.getter
|
|
535
495
|
def description(self) -> Optional[pulumi.Input[str]]:
|
|
536
496
|
"""
|
|
537
|
-
The description of the
|
|
497
|
+
The description of the key.
|
|
538
498
|
"""
|
|
539
499
|
return pulumi.get(self, "description")
|
|
540
500
|
|
|
@@ -546,7 +506,7 @@ class _KeyState:
|
|
|
546
506
|
@pulumi.getter(name="dkmsInstanceId")
|
|
547
507
|
def dkms_instance_id(self) -> Optional[pulumi.Input[str]]:
|
|
548
508
|
"""
|
|
549
|
-
The
|
|
509
|
+
The ID of the KMS instance.
|
|
550
510
|
"""
|
|
551
511
|
return pulumi.get(self, "dkms_instance_id")
|
|
552
512
|
|
|
@@ -559,9 +519,15 @@ class _KeyState:
|
|
|
559
519
|
def is_enabled(self) -> Optional[pulumi.Input[bool]]:
|
|
560
520
|
"""
|
|
561
521
|
Field `is_enabled` has been deprecated from provider version 1.85.0. New field `status` instead.
|
|
522
|
+
|
|
523
|
+
> **NOTE:** If you set the origin parameter to EXTERNAL or the key_spec parameter to an asymmetric CMK type, automatic key rotation is unavailable.
|
|
524
|
+
|
|
525
|
+
> **NOTE:** The default type of the CMK is `Aliyun_AES_256`. Only Dedicated KMS supports `Aliyun_AES_128` and `Aliyun_AES_192`.
|
|
526
|
+
|
|
527
|
+
> **NOTE:** When the pre-deletion days elapses, the key is permanently deleted and cannot be recovered.
|
|
562
528
|
"""
|
|
563
|
-
warnings.warn("""Field
|
|
564
|
-
pulumi.log.warn("""is_enabled is deprecated: Field
|
|
529
|
+
warnings.warn("""Field `is_enabled` has been deprecated from provider version 1.85.0. New field `key_state` instead.""", DeprecationWarning)
|
|
530
|
+
pulumi.log.warn("""is_enabled is deprecated: Field `is_enabled` has been deprecated from provider version 1.85.0. New field `key_state` instead.""")
|
|
565
531
|
|
|
566
532
|
return pulumi.get(self, "is_enabled")
|
|
567
533
|
|
|
@@ -573,9 +539,7 @@ class _KeyState:
|
|
|
573
539
|
@pulumi.getter(name="keySpec")
|
|
574
540
|
def key_spec(self) -> Optional[pulumi.Input[str]]:
|
|
575
541
|
"""
|
|
576
|
-
The
|
|
577
|
-
`Aliyun_AES_256`, `Aliyun_AES_128`, `Aliyun_AES_192`, `Aliyun_SM4`, `RSA_2048`, `RSA_3072`, `EC_P256`, `EC_P256K`, `EC_SM2`.
|
|
578
|
-
Note: The default type of the CMK is `Aliyun_AES_256`. Only Dedicated KMS supports `Aliyun_AES_128` and `Aliyun_AES_192`.
|
|
542
|
+
The specification of the key. Default value: `Aliyun_AES_256`. Valid values: `Aliyun_AES_256`, `Aliyun_AES_128`, `Aliyun_AES_192`, `Aliyun_SM4`, `RSA_2048`, `RSA_3072`, `EC_P256`, `EC_P256K`, `EC_SM2`.
|
|
579
543
|
"""
|
|
580
544
|
return pulumi.get(self, "key_spec")
|
|
581
545
|
|
|
@@ -589,8 +553,8 @@ class _KeyState:
|
|
|
589
553
|
"""
|
|
590
554
|
Field `key_state` has been deprecated from provider version 1.123.1. New field `status` instead.
|
|
591
555
|
"""
|
|
592
|
-
warnings.warn("""Field
|
|
593
|
-
pulumi.log.warn("""key_state is deprecated: Field
|
|
556
|
+
warnings.warn("""Field `key_state` has been deprecated from provider version 1.123.1. New field `status` instead.""", DeprecationWarning)
|
|
557
|
+
pulumi.log.warn("""key_state is deprecated: Field `key_state` has been deprecated from provider version 1.123.1. New field `status` instead.""")
|
|
594
558
|
|
|
595
559
|
return pulumi.get(self, "key_state")
|
|
596
560
|
|
|
@@ -602,9 +566,9 @@ class _KeyState:
|
|
|
602
566
|
@pulumi.getter(name="keyUsage")
|
|
603
567
|
def key_usage(self) -> Optional[pulumi.Input[str]]:
|
|
604
568
|
"""
|
|
605
|
-
The usage of the
|
|
606
|
-
- `ENCRYPT/DECRYPT`:
|
|
607
|
-
- `SIGN/VERIFY`:
|
|
569
|
+
The usage of the key. Default value: `ENCRYPT/DECRYPT`. Valid values:
|
|
570
|
+
- `ENCRYPT/DECRYPT`: Encrypts or decrypts data.
|
|
571
|
+
- `SIGN/VERIFY`: Generates or verifies a digital signature.
|
|
608
572
|
"""
|
|
609
573
|
return pulumi.get(self, "key_usage")
|
|
610
574
|
|
|
@@ -616,7 +580,7 @@ class _KeyState:
|
|
|
616
580
|
@pulumi.getter(name="lastRotationDate")
|
|
617
581
|
def last_rotation_date(self) -> Optional[pulumi.Input[str]]:
|
|
618
582
|
"""
|
|
619
|
-
The
|
|
583
|
+
The time when the last rotation was performed.
|
|
620
584
|
"""
|
|
621
585
|
return pulumi.get(self, "last_rotation_date")
|
|
622
586
|
|
|
@@ -628,7 +592,7 @@ class _KeyState:
|
|
|
628
592
|
@pulumi.getter(name="materialExpireTime")
|
|
629
593
|
def material_expire_time(self) -> Optional[pulumi.Input[str]]:
|
|
630
594
|
"""
|
|
631
|
-
The time
|
|
595
|
+
The time when the key material expires.
|
|
632
596
|
"""
|
|
633
597
|
return pulumi.get(self, "material_expire_time")
|
|
634
598
|
|
|
@@ -640,7 +604,7 @@ class _KeyState:
|
|
|
640
604
|
@pulumi.getter(name="nextRotationDate")
|
|
641
605
|
def next_rotation_date(self) -> Optional[pulumi.Input[str]]:
|
|
642
606
|
"""
|
|
643
|
-
The time the next rotation
|
|
607
|
+
The time when the next rotation will be performed.
|
|
644
608
|
"""
|
|
645
609
|
return pulumi.get(self, "next_rotation_date")
|
|
646
610
|
|
|
@@ -652,12 +616,7 @@ class _KeyState:
|
|
|
652
616
|
@pulumi.getter
|
|
653
617
|
def origin(self) -> Optional[pulumi.Input[str]]:
|
|
654
618
|
"""
|
|
655
|
-
The
|
|
656
|
-
- `Aliyun_KMS`
|
|
657
|
-
- `EXTERNAL`
|
|
658
|
-
**NOTE**: The value of this parameter is case-sensitive. If you set the `key_spec` to an asymmetric CMK type,
|
|
659
|
-
you are not allowed to set the `origin` to EXTERNAL. If you set the `origin` to EXTERNAL, you must import key material.
|
|
660
|
-
For more information, see [import key material](https://www.alibabacloud.com/help/en/doc-detail/68523.htm).
|
|
619
|
+
The key material origin. Default value: `Aliyun_KMS`. Valid values: `Aliyun_KMS`, `EXTERNAL`.
|
|
661
620
|
"""
|
|
662
621
|
return pulumi.get(self, "origin")
|
|
663
622
|
|
|
@@ -669,9 +628,7 @@ class _KeyState:
|
|
|
669
628
|
@pulumi.getter(name="pendingWindowInDays")
|
|
670
629
|
def pending_window_in_days(self) -> Optional[pulumi.Input[int]]:
|
|
671
630
|
"""
|
|
672
|
-
The number of days before the CMK is deleted.
|
|
673
|
-
During this period, the CMK is in the PendingDeletion state.
|
|
674
|
-
After this period ends, you cannot cancel the deletion. Valid values: 7 to 366. Unit: days.
|
|
631
|
+
The number of days before the CMK is deleted. During this period, the CMK is in the PendingDeletion state. After this period ends, you cannot cancel the deletion. Unit: days. Valid values: `7` to `366`.
|
|
675
632
|
**NOTE:** From version 1.184.0, `pending_window_in_days` can be set to `366`.
|
|
676
633
|
"""
|
|
677
634
|
return pulumi.get(self, "pending_window_in_days")
|
|
@@ -680,6 +637,18 @@ class _KeyState:
|
|
|
680
637
|
def pending_window_in_days(self, value: Optional[pulumi.Input[int]]):
|
|
681
638
|
pulumi.set(self, "pending_window_in_days", value)
|
|
682
639
|
|
|
640
|
+
@property
|
|
641
|
+
@pulumi.getter
|
|
642
|
+
def policy(self) -> Optional[pulumi.Input[str]]:
|
|
643
|
+
"""
|
|
644
|
+
The content of the key policy. The value is in the JSON format. The value can be up to 32,768 bytes in length. For more information, see [How to use it](https://www.alibabacloud.com/help/en/kms/developer-reference/api-setkeypolicy).
|
|
645
|
+
"""
|
|
646
|
+
return pulumi.get(self, "policy")
|
|
647
|
+
|
|
648
|
+
@policy.setter
|
|
649
|
+
def policy(self, value: Optional[pulumi.Input[str]]):
|
|
650
|
+
pulumi.set(self, "policy", value)
|
|
651
|
+
|
|
683
652
|
@property
|
|
684
653
|
@pulumi.getter(name="primaryKeyVersion")
|
|
685
654
|
def primary_key_version(self) -> Optional[pulumi.Input[str]]:
|
|
@@ -696,12 +665,7 @@ class _KeyState:
|
|
|
696
665
|
@pulumi.getter(name="protectionLevel")
|
|
697
666
|
def protection_level(self) -> Optional[pulumi.Input[str]]:
|
|
698
667
|
"""
|
|
699
|
-
The protection level of the
|
|
700
|
-
- `SOFTWARE`
|
|
701
|
-
- `HSM`
|
|
702
|
-
**NOTE**: The value of this parameter is case-sensitive. Assume that you set this parameter to HSM.
|
|
703
|
-
If you set the origin parameter to Aliyun_KMS, the CMK is created in a managed hardware security module (HSM).
|
|
704
|
-
If you set the origin parameter to EXTERNA, you can import an external key to the managed HSM.
|
|
668
|
+
The protection level of the key. Default value: `SOFTWARE`. Valid values: `SOFTWARE`, `HSM`.
|
|
705
669
|
"""
|
|
706
670
|
return pulumi.get(self, "protection_level")
|
|
707
671
|
|
|
@@ -713,13 +677,8 @@ class _KeyState:
|
|
|
713
677
|
@pulumi.getter(name="rotationInterval")
|
|
714
678
|
def rotation_interval(self) -> Optional[pulumi.Input[str]]:
|
|
715
679
|
"""
|
|
716
|
-
The
|
|
717
|
-
|
|
718
|
-
For example, you can use either 7d or 604800s to specify a seven-day interval.
|
|
719
|
-
The interval can range from 7 days to 730 days.
|
|
720
|
-
**NOTE**: It is Required when `automatic_rotation = "Enabled"`
|
|
721
|
-
|
|
722
|
-
> **NOTE:** When the pre-deletion days elapses, the key is permanently deleted and cannot be recovered.
|
|
680
|
+
The period of automatic key rotation. The following units are supported: d (day), h (hour), m (minute), and s (second). For example, you can use either 7d or 604800s to specify a seven-day interval.
|
|
681
|
+
**NOTE**: If `automatic_rotation` is set to `Enabled`, `rotation_interval` is required.
|
|
723
682
|
"""
|
|
724
683
|
return pulumi.get(self, "rotation_interval")
|
|
725
684
|
|
|
@@ -731,10 +690,7 @@ class _KeyState:
|
|
|
731
690
|
@pulumi.getter
|
|
732
691
|
def status(self) -> Optional[pulumi.Input[str]]:
|
|
733
692
|
"""
|
|
734
|
-
The status of
|
|
735
|
-
- `Disabled`
|
|
736
|
-
- `Enabled`
|
|
737
|
-
- `PendingDeletion`
|
|
693
|
+
The status of key. Default value: `Enabled`. Valid values: `Enabled`, `Disabled`, `PendingDeletion`.
|
|
738
694
|
"""
|
|
739
695
|
return pulumi.get(self, "status")
|
|
740
696
|
|
|
@@ -770,13 +726,16 @@ class Key(pulumi.CustomResource):
|
|
|
770
726
|
key_usage: Optional[pulumi.Input[str]] = None,
|
|
771
727
|
origin: Optional[pulumi.Input[str]] = None,
|
|
772
728
|
pending_window_in_days: Optional[pulumi.Input[int]] = None,
|
|
729
|
+
policy: Optional[pulumi.Input[str]] = None,
|
|
773
730
|
protection_level: Optional[pulumi.Input[str]] = None,
|
|
774
731
|
rotation_interval: Optional[pulumi.Input[str]] = None,
|
|
775
732
|
status: Optional[pulumi.Input[str]] = None,
|
|
776
733
|
tags: Optional[pulumi.Input[Mapping[str, Any]]] = None,
|
|
777
734
|
__props__=None):
|
|
778
735
|
"""
|
|
779
|
-
|
|
736
|
+
Provides a KMS Key resource.
|
|
737
|
+
|
|
738
|
+
For information about KMS Key and how to use it, see [What is Key](https://www.alibabacloud.com/help/en/kms/developer-reference/api-createkey).
|
|
780
739
|
|
|
781
740
|
> **NOTE:** Available since v1.85.0.
|
|
782
741
|
|
|
@@ -788,15 +747,15 @@ class Key(pulumi.CustomResource):
|
|
|
788
747
|
import pulumi
|
|
789
748
|
import pulumi_alicloud as alicloud
|
|
790
749
|
|
|
791
|
-
|
|
750
|
+
default = alicloud.kms.Key("default",
|
|
792
751
|
description="Hello KMS",
|
|
793
|
-
|
|
794
|
-
|
|
752
|
+
status="Enabled",
|
|
753
|
+
pending_window_in_days=7)
|
|
795
754
|
```
|
|
796
755
|
|
|
797
756
|
## Import
|
|
798
757
|
|
|
799
|
-
|
|
758
|
+
KMS Key can be imported using the id, e.g.
|
|
800
759
|
|
|
801
760
|
```sh
|
|
802
761
|
$ pulumi import alicloud:kms/key:Key example <id>
|
|
@@ -804,48 +763,30 @@ class Key(pulumi.CustomResource):
|
|
|
804
763
|
|
|
805
764
|
:param str resource_name: The name of the resource.
|
|
806
765
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
807
|
-
:param pulumi.Input[str] automatic_rotation: Specifies whether to enable automatic key rotation. Default value: `Disabled`. Valid values:
|
|
808
|
-
- `Enabled`
|
|
809
|
-
- `Disabled`
|
|
810
|
-
**NOTE**: If you set the origin parameter to EXTERNAL or the key_spec parameter to an asymmetric CMK type, automatic key rotation is unavailable.
|
|
766
|
+
:param pulumi.Input[str] automatic_rotation: Specifies whether to enable automatic key rotation. Default value: `Disabled`. Valid values: `Enabled`, `Disabled`.
|
|
811
767
|
:param pulumi.Input[int] deletion_window_in_days: Field `deletion_window_in_days` has been deprecated from provider version 1.85.0. New field `pending_window_in_days` instead.
|
|
812
|
-
:param pulumi.Input[str] description: The description of the
|
|
813
|
-
:param pulumi.Input[str] dkms_instance_id: The
|
|
768
|
+
:param pulumi.Input[str] description: The description of the key.
|
|
769
|
+
:param pulumi.Input[str] dkms_instance_id: The ID of the KMS instance.
|
|
814
770
|
:param pulumi.Input[bool] is_enabled: Field `is_enabled` has been deprecated from provider version 1.85.0. New field `status` instead.
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
:param pulumi.Input[str] key_usage: The usage of the CMK. Default value: `ENCRYPT/DECRYPT`. Valid values:
|
|
820
|
-
- `ENCRYPT/DECRYPT`: encrypts or decrypts data.
|
|
821
|
-
- `SIGN/VERIFY`: generates or verifies a digital signature.
|
|
822
|
-
:param pulumi.Input[str] origin: The source of key material. Default value: `Aliyun_KMS`. Valid values:
|
|
823
|
-
- `Aliyun_KMS`
|
|
824
|
-
- `EXTERNAL`
|
|
825
|
-
**NOTE**: The value of this parameter is case-sensitive. If you set the `key_spec` to an asymmetric CMK type,
|
|
826
|
-
you are not allowed to set the `origin` to EXTERNAL. If you set the `origin` to EXTERNAL, you must import key material.
|
|
827
|
-
For more information, see [import key material](https://www.alibabacloud.com/help/en/doc-detail/68523.htm).
|
|
828
|
-
:param pulumi.Input[int] pending_window_in_days: The number of days before the CMK is deleted.
|
|
829
|
-
During this period, the CMK is in the PendingDeletion state.
|
|
830
|
-
After this period ends, you cannot cancel the deletion. Valid values: 7 to 366. Unit: days.
|
|
831
|
-
**NOTE:** From version 1.184.0, `pending_window_in_days` can be set to `366`.
|
|
832
|
-
:param pulumi.Input[str] protection_level: The protection level of the CMK. Default value: `SOFTWARE`. Valid values:
|
|
833
|
-
- `SOFTWARE`
|
|
834
|
-
- `HSM`
|
|
835
|
-
**NOTE**: The value of this parameter is case-sensitive. Assume that you set this parameter to HSM.
|
|
836
|
-
If you set the origin parameter to Aliyun_KMS, the CMK is created in a managed hardware security module (HSM).
|
|
837
|
-
If you set the origin parameter to EXTERNA, you can import an external key to the managed HSM.
|
|
838
|
-
:param pulumi.Input[str] rotation_interval: The interval for automatic key rotation. Specify the value in the integer[unit] format.
|
|
839
|
-
The following units are supported: d (day), h (hour), m (minute), and s (second).
|
|
840
|
-
For example, you can use either 7d or 604800s to specify a seven-day interval.
|
|
841
|
-
The interval can range from 7 days to 730 days.
|
|
842
|
-
**NOTE**: It is Required when `automatic_rotation = "Enabled"`
|
|
771
|
+
|
|
772
|
+
> **NOTE:** If you set the origin parameter to EXTERNAL or the key_spec parameter to an asymmetric CMK type, automatic key rotation is unavailable.
|
|
773
|
+
|
|
774
|
+
> **NOTE:** The default type of the CMK is `Aliyun_AES_256`. Only Dedicated KMS supports `Aliyun_AES_128` and `Aliyun_AES_192`.
|
|
843
775
|
|
|
844
776
|
> **NOTE:** When the pre-deletion days elapses, the key is permanently deleted and cannot be recovered.
|
|
845
|
-
:param pulumi.Input[str]
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
- `
|
|
777
|
+
:param pulumi.Input[str] key_spec: The specification of the key. Default value: `Aliyun_AES_256`. Valid values: `Aliyun_AES_256`, `Aliyun_AES_128`, `Aliyun_AES_192`, `Aliyun_SM4`, `RSA_2048`, `RSA_3072`, `EC_P256`, `EC_P256K`, `EC_SM2`.
|
|
778
|
+
:param pulumi.Input[str] key_state: Field `key_state` has been deprecated from provider version 1.123.1. New field `status` instead.
|
|
779
|
+
:param pulumi.Input[str] key_usage: The usage of the key. Default value: `ENCRYPT/DECRYPT`. Valid values:
|
|
780
|
+
- `ENCRYPT/DECRYPT`: Encrypts or decrypts data.
|
|
781
|
+
- `SIGN/VERIFY`: Generates or verifies a digital signature.
|
|
782
|
+
:param pulumi.Input[str] origin: The key material origin. Default value: `Aliyun_KMS`. Valid values: `Aliyun_KMS`, `EXTERNAL`.
|
|
783
|
+
:param pulumi.Input[int] pending_window_in_days: The number of days before the CMK is deleted. During this period, the CMK is in the PendingDeletion state. After this period ends, you cannot cancel the deletion. Unit: days. Valid values: `7` to `366`.
|
|
784
|
+
**NOTE:** From version 1.184.0, `pending_window_in_days` can be set to `366`.
|
|
785
|
+
:param pulumi.Input[str] policy: The content of the key policy. The value is in the JSON format. The value can be up to 32,768 bytes in length. For more information, see [How to use it](https://www.alibabacloud.com/help/en/kms/developer-reference/api-setkeypolicy).
|
|
786
|
+
:param pulumi.Input[str] protection_level: The protection level of the key. Default value: `SOFTWARE`. Valid values: `SOFTWARE`, `HSM`.
|
|
787
|
+
:param pulumi.Input[str] rotation_interval: The period of automatic key rotation. The following units are supported: d (day), h (hour), m (minute), and s (second). For example, you can use either 7d or 604800s to specify a seven-day interval.
|
|
788
|
+
**NOTE**: If `automatic_rotation` is set to `Enabled`, `rotation_interval` is required.
|
|
789
|
+
:param pulumi.Input[str] status: The status of key. Default value: `Enabled`. Valid values: `Enabled`, `Disabled`, `PendingDeletion`.
|
|
849
790
|
:param pulumi.Input[Mapping[str, Any]] tags: A mapping of tags to assign to the resource.
|
|
850
791
|
"""
|
|
851
792
|
...
|
|
@@ -855,7 +796,9 @@ class Key(pulumi.CustomResource):
|
|
|
855
796
|
args: Optional[KeyArgs] = None,
|
|
856
797
|
opts: Optional[pulumi.ResourceOptions] = None):
|
|
857
798
|
"""
|
|
858
|
-
|
|
799
|
+
Provides a KMS Key resource.
|
|
800
|
+
|
|
801
|
+
For information about KMS Key and how to use it, see [What is Key](https://www.alibabacloud.com/help/en/kms/developer-reference/api-createkey).
|
|
859
802
|
|
|
860
803
|
> **NOTE:** Available since v1.85.0.
|
|
861
804
|
|
|
@@ -867,15 +810,15 @@ class Key(pulumi.CustomResource):
|
|
|
867
810
|
import pulumi
|
|
868
811
|
import pulumi_alicloud as alicloud
|
|
869
812
|
|
|
870
|
-
|
|
813
|
+
default = alicloud.kms.Key("default",
|
|
871
814
|
description="Hello KMS",
|
|
872
|
-
|
|
873
|
-
|
|
815
|
+
status="Enabled",
|
|
816
|
+
pending_window_in_days=7)
|
|
874
817
|
```
|
|
875
818
|
|
|
876
819
|
## Import
|
|
877
820
|
|
|
878
|
-
|
|
821
|
+
KMS Key can be imported using the id, e.g.
|
|
879
822
|
|
|
880
823
|
```sh
|
|
881
824
|
$ pulumi import alicloud:kms/key:Key example <id>
|
|
@@ -906,6 +849,7 @@ class Key(pulumi.CustomResource):
|
|
|
906
849
|
key_usage: Optional[pulumi.Input[str]] = None,
|
|
907
850
|
origin: Optional[pulumi.Input[str]] = None,
|
|
908
851
|
pending_window_in_days: Optional[pulumi.Input[int]] = None,
|
|
852
|
+
policy: Optional[pulumi.Input[str]] = None,
|
|
909
853
|
protection_level: Optional[pulumi.Input[str]] = None,
|
|
910
854
|
rotation_interval: Optional[pulumi.Input[str]] = None,
|
|
911
855
|
status: Optional[pulumi.Input[str]] = None,
|
|
@@ -929,6 +873,7 @@ class Key(pulumi.CustomResource):
|
|
|
929
873
|
__props__.__dict__["key_usage"] = key_usage
|
|
930
874
|
__props__.__dict__["origin"] = origin
|
|
931
875
|
__props__.__dict__["pending_window_in_days"] = pending_window_in_days
|
|
876
|
+
__props__.__dict__["policy"] = policy
|
|
932
877
|
__props__.__dict__["protection_level"] = protection_level
|
|
933
878
|
__props__.__dict__["rotation_interval"] = rotation_interval
|
|
934
879
|
__props__.__dict__["status"] = status
|
|
@@ -968,6 +913,7 @@ class Key(pulumi.CustomResource):
|
|
|
968
913
|
next_rotation_date: Optional[pulumi.Input[str]] = None,
|
|
969
914
|
origin: Optional[pulumi.Input[str]] = None,
|
|
970
915
|
pending_window_in_days: Optional[pulumi.Input[int]] = None,
|
|
916
|
+
policy: Optional[pulumi.Input[str]] = None,
|
|
971
917
|
primary_key_version: Optional[pulumi.Input[str]] = None,
|
|
972
918
|
protection_level: Optional[pulumi.Input[str]] = None,
|
|
973
919
|
rotation_interval: Optional[pulumi.Input[str]] = None,
|
|
@@ -980,56 +926,38 @@ class Key(pulumi.CustomResource):
|
|
|
980
926
|
:param str resource_name: The unique name of the resulting resource.
|
|
981
927
|
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
|
|
982
928
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
983
|
-
:param pulumi.Input[str] arn: The
|
|
984
|
-
:param pulumi.Input[str] automatic_rotation: Specifies whether to enable automatic key rotation. Default value: `Disabled`. Valid values:
|
|
985
|
-
|
|
986
|
-
- `Disabled`
|
|
987
|
-
**NOTE**: If you set the origin parameter to EXTERNAL or the key_spec parameter to an asymmetric CMK type, automatic key rotation is unavailable.
|
|
988
|
-
:param pulumi.Input[str] creation_date: The date and time when the CMK was created. The time is displayed in UTC.
|
|
929
|
+
:param pulumi.Input[str] arn: The ARN of the key.
|
|
930
|
+
:param pulumi.Input[str] automatic_rotation: Specifies whether to enable automatic key rotation. Default value: `Disabled`. Valid values: `Enabled`, `Disabled`.
|
|
931
|
+
:param pulumi.Input[str] creation_date: The time when the CMK was created.
|
|
989
932
|
:param pulumi.Input[str] creator: The creator of the CMK.
|
|
990
|
-
:param pulumi.Input[str] delete_date: The
|
|
933
|
+
:param pulumi.Input[str] delete_date: The time at which the CMK is scheduled for deletion.
|
|
991
934
|
:param pulumi.Input[int] deletion_window_in_days: Field `deletion_window_in_days` has been deprecated from provider version 1.85.0. New field `pending_window_in_days` instead.
|
|
992
|
-
:param pulumi.Input[str] description: The description of the
|
|
993
|
-
:param pulumi.Input[str] dkms_instance_id: The
|
|
935
|
+
:param pulumi.Input[str] description: The description of the key.
|
|
936
|
+
:param pulumi.Input[str] dkms_instance_id: The ID of the KMS instance.
|
|
994
937
|
:param pulumi.Input[bool] is_enabled: Field `is_enabled` has been deprecated from provider version 1.85.0. New field `status` instead.
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
938
|
+
|
|
939
|
+
> **NOTE:** If you set the origin parameter to EXTERNAL or the key_spec parameter to an asymmetric CMK type, automatic key rotation is unavailable.
|
|
940
|
+
|
|
941
|
+
> **NOTE:** The default type of the CMK is `Aliyun_AES_256`. Only Dedicated KMS supports `Aliyun_AES_128` and `Aliyun_AES_192`.
|
|
942
|
+
|
|
943
|
+
> **NOTE:** When the pre-deletion days elapses, the key is permanently deleted and cannot be recovered.
|
|
944
|
+
:param pulumi.Input[str] key_spec: The specification of the key. Default value: `Aliyun_AES_256`. Valid values: `Aliyun_AES_256`, `Aliyun_AES_128`, `Aliyun_AES_192`, `Aliyun_SM4`, `RSA_2048`, `RSA_3072`, `EC_P256`, `EC_P256K`, `EC_SM2`.
|
|
998
945
|
:param pulumi.Input[str] key_state: Field `key_state` has been deprecated from provider version 1.123.1. New field `status` instead.
|
|
999
|
-
:param pulumi.Input[str] key_usage: The usage of the
|
|
1000
|
-
- `ENCRYPT/DECRYPT`:
|
|
1001
|
-
- `SIGN/VERIFY`:
|
|
1002
|
-
:param pulumi.Input[str] last_rotation_date: The
|
|
1003
|
-
:param pulumi.Input[str] material_expire_time: The time
|
|
1004
|
-
:param pulumi.Input[str] next_rotation_date: The time the next rotation
|
|
1005
|
-
:param pulumi.Input[str] origin: The
|
|
1006
|
-
|
|
1007
|
-
- `EXTERNAL`
|
|
1008
|
-
**NOTE**: The value of this parameter is case-sensitive. If you set the `key_spec` to an asymmetric CMK type,
|
|
1009
|
-
you are not allowed to set the `origin` to EXTERNAL. If you set the `origin` to EXTERNAL, you must import key material.
|
|
1010
|
-
For more information, see [import key material](https://www.alibabacloud.com/help/en/doc-detail/68523.htm).
|
|
1011
|
-
:param pulumi.Input[int] pending_window_in_days: The number of days before the CMK is deleted.
|
|
1012
|
-
During this period, the CMK is in the PendingDeletion state.
|
|
1013
|
-
After this period ends, you cannot cancel the deletion. Valid values: 7 to 366. Unit: days.
|
|
946
|
+
:param pulumi.Input[str] key_usage: The usage of the key. Default value: `ENCRYPT/DECRYPT`. Valid values:
|
|
947
|
+
- `ENCRYPT/DECRYPT`: Encrypts or decrypts data.
|
|
948
|
+
- `SIGN/VERIFY`: Generates or verifies a digital signature.
|
|
949
|
+
:param pulumi.Input[str] last_rotation_date: The time when the last rotation was performed.
|
|
950
|
+
:param pulumi.Input[str] material_expire_time: The time when the key material expires.
|
|
951
|
+
:param pulumi.Input[str] next_rotation_date: The time when the next rotation will be performed.
|
|
952
|
+
:param pulumi.Input[str] origin: The key material origin. Default value: `Aliyun_KMS`. Valid values: `Aliyun_KMS`, `EXTERNAL`.
|
|
953
|
+
:param pulumi.Input[int] pending_window_in_days: The number of days before the CMK is deleted. During this period, the CMK is in the PendingDeletion state. After this period ends, you cannot cancel the deletion. Unit: days. Valid values: `7` to `366`.
|
|
1014
954
|
**NOTE:** From version 1.184.0, `pending_window_in_days` can be set to `366`.
|
|
955
|
+
:param pulumi.Input[str] policy: The content of the key policy. The value is in the JSON format. The value can be up to 32,768 bytes in length. For more information, see [How to use it](https://www.alibabacloud.com/help/en/kms/developer-reference/api-setkeypolicy).
|
|
1015
956
|
:param pulumi.Input[str] primary_key_version: The ID of the current primary key version of the symmetric CMK.
|
|
1016
|
-
:param pulumi.Input[str] protection_level: The protection level of the
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
If you set the origin parameter to Aliyun_KMS, the CMK is created in a managed hardware security module (HSM).
|
|
1021
|
-
If you set the origin parameter to EXTERNA, you can import an external key to the managed HSM.
|
|
1022
|
-
:param pulumi.Input[str] rotation_interval: The interval for automatic key rotation. Specify the value in the integer[unit] format.
|
|
1023
|
-
The following units are supported: d (day), h (hour), m (minute), and s (second).
|
|
1024
|
-
For example, you can use either 7d or 604800s to specify a seven-day interval.
|
|
1025
|
-
The interval can range from 7 days to 730 days.
|
|
1026
|
-
**NOTE**: It is Required when `automatic_rotation = "Enabled"`
|
|
1027
|
-
|
|
1028
|
-
> **NOTE:** When the pre-deletion days elapses, the key is permanently deleted and cannot be recovered.
|
|
1029
|
-
:param pulumi.Input[str] status: The status of CMK. Default value: `Enabled`. Valid Values:
|
|
1030
|
-
- `Disabled`
|
|
1031
|
-
- `Enabled`
|
|
1032
|
-
- `PendingDeletion`
|
|
957
|
+
:param pulumi.Input[str] protection_level: The protection level of the key. Default value: `SOFTWARE`. Valid values: `SOFTWARE`, `HSM`.
|
|
958
|
+
:param pulumi.Input[str] rotation_interval: The period of automatic key rotation. The following units are supported: d (day), h (hour), m (minute), and s (second). For example, you can use either 7d or 604800s to specify a seven-day interval.
|
|
959
|
+
**NOTE**: If `automatic_rotation` is set to `Enabled`, `rotation_interval` is required.
|
|
960
|
+
:param pulumi.Input[str] status: The status of key. Default value: `Enabled`. Valid values: `Enabled`, `Disabled`, `PendingDeletion`.
|
|
1033
961
|
:param pulumi.Input[Mapping[str, Any]] tags: A mapping of tags to assign to the resource.
|
|
1034
962
|
"""
|
|
1035
963
|
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
|
|
@@ -1053,6 +981,7 @@ class Key(pulumi.CustomResource):
|
|
|
1053
981
|
__props__.__dict__["next_rotation_date"] = next_rotation_date
|
|
1054
982
|
__props__.__dict__["origin"] = origin
|
|
1055
983
|
__props__.__dict__["pending_window_in_days"] = pending_window_in_days
|
|
984
|
+
__props__.__dict__["policy"] = policy
|
|
1056
985
|
__props__.__dict__["primary_key_version"] = primary_key_version
|
|
1057
986
|
__props__.__dict__["protection_level"] = protection_level
|
|
1058
987
|
__props__.__dict__["rotation_interval"] = rotation_interval
|
|
@@ -1064,7 +993,7 @@ class Key(pulumi.CustomResource):
|
|
|
1064
993
|
@pulumi.getter
|
|
1065
994
|
def arn(self) -> pulumi.Output[str]:
|
|
1066
995
|
"""
|
|
1067
|
-
The
|
|
996
|
+
The ARN of the key.
|
|
1068
997
|
"""
|
|
1069
998
|
return pulumi.get(self, "arn")
|
|
1070
999
|
|
|
@@ -1072,10 +1001,7 @@ class Key(pulumi.CustomResource):
|
|
|
1072
1001
|
@pulumi.getter(name="automaticRotation")
|
|
1073
1002
|
def automatic_rotation(self) -> pulumi.Output[str]:
|
|
1074
1003
|
"""
|
|
1075
|
-
Specifies whether to enable automatic key rotation. Default value: `Disabled`. Valid values:
|
|
1076
|
-
- `Enabled`
|
|
1077
|
-
- `Disabled`
|
|
1078
|
-
**NOTE**: If you set the origin parameter to EXTERNAL or the key_spec parameter to an asymmetric CMK type, automatic key rotation is unavailable.
|
|
1004
|
+
Specifies whether to enable automatic key rotation. Default value: `Disabled`. Valid values: `Enabled`, `Disabled`.
|
|
1079
1005
|
"""
|
|
1080
1006
|
return pulumi.get(self, "automatic_rotation")
|
|
1081
1007
|
|
|
@@ -1083,7 +1009,7 @@ class Key(pulumi.CustomResource):
|
|
|
1083
1009
|
@pulumi.getter(name="creationDate")
|
|
1084
1010
|
def creation_date(self) -> pulumi.Output[str]:
|
|
1085
1011
|
"""
|
|
1086
|
-
The
|
|
1012
|
+
The time when the CMK was created.
|
|
1087
1013
|
"""
|
|
1088
1014
|
return pulumi.get(self, "creation_date")
|
|
1089
1015
|
|
|
@@ -1099,18 +1025,18 @@ class Key(pulumi.CustomResource):
|
|
|
1099
1025
|
@pulumi.getter(name="deleteDate")
|
|
1100
1026
|
def delete_date(self) -> pulumi.Output[str]:
|
|
1101
1027
|
"""
|
|
1102
|
-
The
|
|
1028
|
+
The time at which the CMK is scheduled for deletion.
|
|
1103
1029
|
"""
|
|
1104
1030
|
return pulumi.get(self, "delete_date")
|
|
1105
1031
|
|
|
1106
1032
|
@property
|
|
1107
1033
|
@pulumi.getter(name="deletionWindowInDays")
|
|
1108
|
-
def deletion_window_in_days(self) -> pulumi.Output[int]:
|
|
1034
|
+
def deletion_window_in_days(self) -> pulumi.Output[Optional[int]]:
|
|
1109
1035
|
"""
|
|
1110
1036
|
Field `deletion_window_in_days` has been deprecated from provider version 1.85.0. New field `pending_window_in_days` instead.
|
|
1111
1037
|
"""
|
|
1112
|
-
warnings.warn("""Field
|
|
1113
|
-
pulumi.log.warn("""deletion_window_in_days is deprecated: Field
|
|
1038
|
+
warnings.warn("""Field `deletion_window_in_days` has been deprecated from provider version 1.85.0. New field `pending_window_in_days` instead.""", DeprecationWarning)
|
|
1039
|
+
pulumi.log.warn("""deletion_window_in_days is deprecated: Field `deletion_window_in_days` has been deprecated from provider version 1.85.0. New field `pending_window_in_days` instead.""")
|
|
1114
1040
|
|
|
1115
1041
|
return pulumi.get(self, "deletion_window_in_days")
|
|
1116
1042
|
|
|
@@ -1118,7 +1044,7 @@ class Key(pulumi.CustomResource):
|
|
|
1118
1044
|
@pulumi.getter
|
|
1119
1045
|
def description(self) -> pulumi.Output[Optional[str]]:
|
|
1120
1046
|
"""
|
|
1121
|
-
The description of the
|
|
1047
|
+
The description of the key.
|
|
1122
1048
|
"""
|
|
1123
1049
|
return pulumi.get(self, "description")
|
|
1124
1050
|
|
|
@@ -1126,18 +1052,24 @@ class Key(pulumi.CustomResource):
|
|
|
1126
1052
|
@pulumi.getter(name="dkmsInstanceId")
|
|
1127
1053
|
def dkms_instance_id(self) -> pulumi.Output[Optional[str]]:
|
|
1128
1054
|
"""
|
|
1129
|
-
The
|
|
1055
|
+
The ID of the KMS instance.
|
|
1130
1056
|
"""
|
|
1131
1057
|
return pulumi.get(self, "dkms_instance_id")
|
|
1132
1058
|
|
|
1133
1059
|
@property
|
|
1134
1060
|
@pulumi.getter(name="isEnabled")
|
|
1135
|
-
def is_enabled(self) -> pulumi.Output[
|
|
1061
|
+
def is_enabled(self) -> pulumi.Output[bool]:
|
|
1136
1062
|
"""
|
|
1137
1063
|
Field `is_enabled` has been deprecated from provider version 1.85.0. New field `status` instead.
|
|
1064
|
+
|
|
1065
|
+
> **NOTE:** If you set the origin parameter to EXTERNAL or the key_spec parameter to an asymmetric CMK type, automatic key rotation is unavailable.
|
|
1066
|
+
|
|
1067
|
+
> **NOTE:** The default type of the CMK is `Aliyun_AES_256`. Only Dedicated KMS supports `Aliyun_AES_128` and `Aliyun_AES_192`.
|
|
1068
|
+
|
|
1069
|
+
> **NOTE:** When the pre-deletion days elapses, the key is permanently deleted and cannot be recovered.
|
|
1138
1070
|
"""
|
|
1139
|
-
warnings.warn("""Field
|
|
1140
|
-
pulumi.log.warn("""is_enabled is deprecated: Field
|
|
1071
|
+
warnings.warn("""Field `is_enabled` has been deprecated from provider version 1.85.0. New field `key_state` instead.""", DeprecationWarning)
|
|
1072
|
+
pulumi.log.warn("""is_enabled is deprecated: Field `is_enabled` has been deprecated from provider version 1.85.0. New field `key_state` instead.""")
|
|
1141
1073
|
|
|
1142
1074
|
return pulumi.get(self, "is_enabled")
|
|
1143
1075
|
|
|
@@ -1145,9 +1077,7 @@ class Key(pulumi.CustomResource):
|
|
|
1145
1077
|
@pulumi.getter(name="keySpec")
|
|
1146
1078
|
def key_spec(self) -> pulumi.Output[str]:
|
|
1147
1079
|
"""
|
|
1148
|
-
The
|
|
1149
|
-
`Aliyun_AES_256`, `Aliyun_AES_128`, `Aliyun_AES_192`, `Aliyun_SM4`, `RSA_2048`, `RSA_3072`, `EC_P256`, `EC_P256K`, `EC_SM2`.
|
|
1150
|
-
Note: The default type of the CMK is `Aliyun_AES_256`. Only Dedicated KMS supports `Aliyun_AES_128` and `Aliyun_AES_192`.
|
|
1080
|
+
The specification of the key. Default value: `Aliyun_AES_256`. Valid values: `Aliyun_AES_256`, `Aliyun_AES_128`, `Aliyun_AES_192`, `Aliyun_SM4`, `RSA_2048`, `RSA_3072`, `EC_P256`, `EC_P256K`, `EC_SM2`.
|
|
1151
1081
|
"""
|
|
1152
1082
|
return pulumi.get(self, "key_spec")
|
|
1153
1083
|
|
|
@@ -1157,8 +1087,8 @@ class Key(pulumi.CustomResource):
|
|
|
1157
1087
|
"""
|
|
1158
1088
|
Field `key_state` has been deprecated from provider version 1.123.1. New field `status` instead.
|
|
1159
1089
|
"""
|
|
1160
|
-
warnings.warn("""Field
|
|
1161
|
-
pulumi.log.warn("""key_state is deprecated: Field
|
|
1090
|
+
warnings.warn("""Field `key_state` has been deprecated from provider version 1.123.1. New field `status` instead.""", DeprecationWarning)
|
|
1091
|
+
pulumi.log.warn("""key_state is deprecated: Field `key_state` has been deprecated from provider version 1.123.1. New field `status` instead.""")
|
|
1162
1092
|
|
|
1163
1093
|
return pulumi.get(self, "key_state")
|
|
1164
1094
|
|
|
@@ -1166,9 +1096,9 @@ class Key(pulumi.CustomResource):
|
|
|
1166
1096
|
@pulumi.getter(name="keyUsage")
|
|
1167
1097
|
def key_usage(self) -> pulumi.Output[str]:
|
|
1168
1098
|
"""
|
|
1169
|
-
The usage of the
|
|
1170
|
-
- `ENCRYPT/DECRYPT`:
|
|
1171
|
-
- `SIGN/VERIFY`:
|
|
1099
|
+
The usage of the key. Default value: `ENCRYPT/DECRYPT`. Valid values:
|
|
1100
|
+
- `ENCRYPT/DECRYPT`: Encrypts or decrypts data.
|
|
1101
|
+
- `SIGN/VERIFY`: Generates or verifies a digital signature.
|
|
1172
1102
|
"""
|
|
1173
1103
|
return pulumi.get(self, "key_usage")
|
|
1174
1104
|
|
|
@@ -1176,7 +1106,7 @@ class Key(pulumi.CustomResource):
|
|
|
1176
1106
|
@pulumi.getter(name="lastRotationDate")
|
|
1177
1107
|
def last_rotation_date(self) -> pulumi.Output[str]:
|
|
1178
1108
|
"""
|
|
1179
|
-
The
|
|
1109
|
+
The time when the last rotation was performed.
|
|
1180
1110
|
"""
|
|
1181
1111
|
return pulumi.get(self, "last_rotation_date")
|
|
1182
1112
|
|
|
@@ -1184,7 +1114,7 @@ class Key(pulumi.CustomResource):
|
|
|
1184
1114
|
@pulumi.getter(name="materialExpireTime")
|
|
1185
1115
|
def material_expire_time(self) -> pulumi.Output[str]:
|
|
1186
1116
|
"""
|
|
1187
|
-
The time
|
|
1117
|
+
The time when the key material expires.
|
|
1188
1118
|
"""
|
|
1189
1119
|
return pulumi.get(self, "material_expire_time")
|
|
1190
1120
|
|
|
@@ -1192,7 +1122,7 @@ class Key(pulumi.CustomResource):
|
|
|
1192
1122
|
@pulumi.getter(name="nextRotationDate")
|
|
1193
1123
|
def next_rotation_date(self) -> pulumi.Output[str]:
|
|
1194
1124
|
"""
|
|
1195
|
-
The time the next rotation
|
|
1125
|
+
The time when the next rotation will be performed.
|
|
1196
1126
|
"""
|
|
1197
1127
|
return pulumi.get(self, "next_rotation_date")
|
|
1198
1128
|
|
|
@@ -1200,26 +1130,27 @@ class Key(pulumi.CustomResource):
|
|
|
1200
1130
|
@pulumi.getter
|
|
1201
1131
|
def origin(self) -> pulumi.Output[str]:
|
|
1202
1132
|
"""
|
|
1203
|
-
The
|
|
1204
|
-
- `Aliyun_KMS`
|
|
1205
|
-
- `EXTERNAL`
|
|
1206
|
-
**NOTE**: The value of this parameter is case-sensitive. If you set the `key_spec` to an asymmetric CMK type,
|
|
1207
|
-
you are not allowed to set the `origin` to EXTERNAL. If you set the `origin` to EXTERNAL, you must import key material.
|
|
1208
|
-
For more information, see [import key material](https://www.alibabacloud.com/help/en/doc-detail/68523.htm).
|
|
1133
|
+
The key material origin. Default value: `Aliyun_KMS`. Valid values: `Aliyun_KMS`, `EXTERNAL`.
|
|
1209
1134
|
"""
|
|
1210
1135
|
return pulumi.get(self, "origin")
|
|
1211
1136
|
|
|
1212
1137
|
@property
|
|
1213
1138
|
@pulumi.getter(name="pendingWindowInDays")
|
|
1214
|
-
def pending_window_in_days(self) -> pulumi.Output[int]:
|
|
1139
|
+
def pending_window_in_days(self) -> pulumi.Output[Optional[int]]:
|
|
1215
1140
|
"""
|
|
1216
|
-
The number of days before the CMK is deleted.
|
|
1217
|
-
During this period, the CMK is in the PendingDeletion state.
|
|
1218
|
-
After this period ends, you cannot cancel the deletion. Valid values: 7 to 366. Unit: days.
|
|
1141
|
+
The number of days before the CMK is deleted. During this period, the CMK is in the PendingDeletion state. After this period ends, you cannot cancel the deletion. Unit: days. Valid values: `7` to `366`.
|
|
1219
1142
|
**NOTE:** From version 1.184.0, `pending_window_in_days` can be set to `366`.
|
|
1220
1143
|
"""
|
|
1221
1144
|
return pulumi.get(self, "pending_window_in_days")
|
|
1222
1145
|
|
|
1146
|
+
@property
|
|
1147
|
+
@pulumi.getter
|
|
1148
|
+
def policy(self) -> pulumi.Output[str]:
|
|
1149
|
+
"""
|
|
1150
|
+
The content of the key policy. The value is in the JSON format. The value can be up to 32,768 bytes in length. For more information, see [How to use it](https://www.alibabacloud.com/help/en/kms/developer-reference/api-setkeypolicy).
|
|
1151
|
+
"""
|
|
1152
|
+
return pulumi.get(self, "policy")
|
|
1153
|
+
|
|
1223
1154
|
@property
|
|
1224
1155
|
@pulumi.getter(name="primaryKeyVersion")
|
|
1225
1156
|
def primary_key_version(self) -> pulumi.Output[str]:
|
|
@@ -1232,12 +1163,7 @@ class Key(pulumi.CustomResource):
|
|
|
1232
1163
|
@pulumi.getter(name="protectionLevel")
|
|
1233
1164
|
def protection_level(self) -> pulumi.Output[Optional[str]]:
|
|
1234
1165
|
"""
|
|
1235
|
-
The protection level of the
|
|
1236
|
-
- `SOFTWARE`
|
|
1237
|
-
- `HSM`
|
|
1238
|
-
**NOTE**: The value of this parameter is case-sensitive. Assume that you set this parameter to HSM.
|
|
1239
|
-
If you set the origin parameter to Aliyun_KMS, the CMK is created in a managed hardware security module (HSM).
|
|
1240
|
-
If you set the origin parameter to EXTERNA, you can import an external key to the managed HSM.
|
|
1166
|
+
The protection level of the key. Default value: `SOFTWARE`. Valid values: `SOFTWARE`, `HSM`.
|
|
1241
1167
|
"""
|
|
1242
1168
|
return pulumi.get(self, "protection_level")
|
|
1243
1169
|
|
|
@@ -1245,13 +1171,8 @@ class Key(pulumi.CustomResource):
|
|
|
1245
1171
|
@pulumi.getter(name="rotationInterval")
|
|
1246
1172
|
def rotation_interval(self) -> pulumi.Output[Optional[str]]:
|
|
1247
1173
|
"""
|
|
1248
|
-
The
|
|
1249
|
-
|
|
1250
|
-
For example, you can use either 7d or 604800s to specify a seven-day interval.
|
|
1251
|
-
The interval can range from 7 days to 730 days.
|
|
1252
|
-
**NOTE**: It is Required when `automatic_rotation = "Enabled"`
|
|
1253
|
-
|
|
1254
|
-
> **NOTE:** When the pre-deletion days elapses, the key is permanently deleted and cannot be recovered.
|
|
1174
|
+
The period of automatic key rotation. The following units are supported: d (day), h (hour), m (minute), and s (second). For example, you can use either 7d or 604800s to specify a seven-day interval.
|
|
1175
|
+
**NOTE**: If `automatic_rotation` is set to `Enabled`, `rotation_interval` is required.
|
|
1255
1176
|
"""
|
|
1256
1177
|
return pulumi.get(self, "rotation_interval")
|
|
1257
1178
|
|
|
@@ -1259,10 +1180,7 @@ class Key(pulumi.CustomResource):
|
|
|
1259
1180
|
@pulumi.getter
|
|
1260
1181
|
def status(self) -> pulumi.Output[str]:
|
|
1261
1182
|
"""
|
|
1262
|
-
The status of
|
|
1263
|
-
- `Disabled`
|
|
1264
|
-
- `Enabled`
|
|
1265
|
-
- `PendingDeletion`
|
|
1183
|
+
The status of key. Default value: `Enabled`. Valid values: `Enabled`, `Disabled`, `PendingDeletion`.
|
|
1266
1184
|
"""
|
|
1267
1185
|
return pulumi.get(self, "status")
|
|
1268
1186
|
|