Skip to content

Commit 504424c

Browse files
Features: support for customer managed encryption keys
1 parent c9c869c commit 504424c

15 files changed

+555
-2
lines changed

generator/ServiceModels/dsql/dsql-2018-05-10.api.json

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@
258258
"type":"structure",
259259
"members":{
260260
"deletionProtectionEnabled":{"shape":"DeletionProtectionEnabled"},
261+
"kmsEncryptionKey":{"shape":"KmsEncryptionKey"},
261262
"tags":{"shape":"TagMap"},
262263
"clientToken":{
263264
"shape":"ClientToken",
@@ -281,6 +282,7 @@
281282
"status":{"shape":"ClusterStatus"},
282283
"creationTime":{"shape":"ClusterCreationTime"},
283284
"multiRegionProperties":{"shape":"MultiRegionProperties"},
285+
"encryptionDetails":{"shape":"EncryptionDetails"},
284286
"deletionProtectionEnabled":{"shape":"DeletionProtectionEnabled"}
285287
}
286288
},
@@ -320,6 +322,34 @@
320322
"type":"boolean",
321323
"box":true
322324
},
325+
"EncryptionDetails":{
326+
"type":"structure",
327+
"required":[
328+
"encryptionType",
329+
"encryptionStatus"
330+
],
331+
"members":{
332+
"encryptionType":{"shape":"EncryptionType"},
333+
"kmsKeyArn":{"shape":"KmsKeyArn"},
334+
"encryptionStatus":{"shape":"EncryptionStatus"}
335+
}
336+
},
337+
"EncryptionStatus":{
338+
"type":"string",
339+
"enum":[
340+
"ENABLED",
341+
"UPDATING",
342+
"KMS_KEY_INACCESSIBLE",
343+
"ENABLING"
344+
]
345+
},
346+
"EncryptionType":{
347+
"type":"string",
348+
"enum":[
349+
"AWS_OWNED_KMS_KEY",
350+
"CUSTOMER_MANAGED_KMS_KEY"
351+
]
352+
},
323353
"GetClusterInput":{
324354
"type":"structure",
325355
"required":["identifier"],
@@ -347,7 +377,8 @@
347377
"creationTime":{"shape":"ClusterCreationTime"},
348378
"deletionProtectionEnabled":{"shape":"DeletionProtectionEnabled"},
349379
"multiRegionProperties":{"shape":"MultiRegionProperties"},
350-
"tags":{"shape":"TagMap"}
380+
"tags":{"shape":"TagMap"},
381+
"encryptionDetails":{"shape":"EncryptionDetails"}
351382
}
352383
},
353384
"GetVpcEndpointServiceNameInput":{
@@ -388,6 +419,13 @@
388419
"fault":true,
389420
"retryable":{"throttling":false}
390421
},
422+
"KmsEncryptionKey":{
423+
"type":"string",
424+
"max":2048,
425+
"min":1,
426+
"pattern":"[a-zA-Z0-9:/_-]+"
427+
},
428+
"KmsKeyArn":{"type":"string"},
391429
"ListClustersInput":{
392430
"type":"structure",
393431
"members":{
@@ -583,6 +621,7 @@
583621
"locationName":"identifier"
584622
},
585623
"deletionProtectionEnabled":{"shape":"DeletionProtectionEnabled"},
624+
"kmsEncryptionKey":{"shape":"KmsEncryptionKey"},
586625
"clientToken":{
587626
"shape":"ClientToken",
588627
"idempotencyToken":true

generator/ServiceModels/dsql/dsql-2018-05-10.docs.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,25 @@
129129
"UpdateClusterInput$deletionProtectionEnabled": "<p>Specifies whether to enable deletion protection in your cluster.</p>"
130130
}
131131
},
132+
"EncryptionDetails": {
133+
"base": "<p>Configuration details about encryption for the cluster including the KMS key ARN, encryption type, and encryption status.</p>",
134+
"refs": {
135+
"CreateClusterOutput$encryptionDetails": "<p>The encryption configuration for the cluster that was specified during the creation process, including the KMS key identifier and encryption state.</p>",
136+
"GetClusterOutput$encryptionDetails": "<p>The current encryption configuration details for the cluster.</p>"
137+
}
138+
},
139+
"EncryptionStatus": {
140+
"base": null,
141+
"refs": {
142+
"EncryptionDetails$encryptionStatus": "<p>The status of encryption for the cluster.</p>"
143+
}
144+
},
145+
"EncryptionType": {
146+
"base": null,
147+
"refs": {
148+
"EncryptionDetails$encryptionType": "<p>The type of encryption that protects the data on your cluster.</p>"
149+
}
150+
},
132151
"GetClusterInput": {
133152
"base": null,
134153
"refs": {
@@ -161,6 +180,19 @@
161180
"refs": {
162181
}
163182
},
183+
"KmsEncryptionKey": {
184+
"base": null,
185+
"refs": {
186+
"CreateClusterInput$kmsEncryptionKey": "<p>The KMS key that encrypts and protects the data on your cluster. You can specify the ARN, ID, or alias of an existing key or have Amazon Web Services create a default key for you.</p>",
187+
"UpdateClusterInput$kmsEncryptionKey": "<p>The KMS key that encrypts and protects the data on your cluster. You can specify the ARN, ID, or alias of an existing key or have Amazon Web Services create a default key for you.</p>"
188+
}
189+
},
190+
"KmsKeyArn": {
191+
"base": null,
192+
"refs": {
193+
"EncryptionDetails$kmsKeyArn": "<p>The ARN of the KMS key that encrypts data in the cluster.</p>"
194+
}
195+
},
164196
"ListClustersInput": {
165197
"base": null,
166198
"refs": {

generator/ServiceModels/dsql/dsql-2018-05-10.normal.json

Lines changed: 62 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,10 @@
295295
"shape":"DeletionProtectionEnabled",
296296
"documentation":"<p>If enabled, you can't delete your cluster. You must first disable this property before you can delete your cluster.</p>"
297297
},
298+
"kmsEncryptionKey":{
299+
"shape":"KmsEncryptionKey",
300+
"documentation":"<p>The KMS key that encrypts and protects the data on your cluster. You can specify the ARN, ID, or alias of an existing key or have Amazon Web Services create a default key for you.</p>"
301+
},
298302
"tags":{
299303
"shape":"TagMap",
300304
"documentation":"<p>A map of key and value pairs to use to tag your cluster.</p>"
@@ -340,6 +344,10 @@
340344
"shape":"MultiRegionProperties",
341345
"documentation":"<p>The multi-Region cluster configuration details that were set during cluster creation</p>"
342346
},
347+
"encryptionDetails":{
348+
"shape":"EncryptionDetails",
349+
"documentation":"<p>The encryption configuration for the cluster that was specified during the creation process, including the KMS key identifier and encryption state.</p>"
350+
},
343351
"deletionProtectionEnabled":{
344352
"shape":"DeletionProtectionEnabled",
345353
"documentation":"<p>Whether deletion protection is enabled on this cluster.</p>"
@@ -399,6 +407,44 @@
399407
"documentation":"<p>Indicates whether deletion protection is enabled for a cluster.</p>",
400408
"box":true
401409
},
410+
"EncryptionDetails":{
411+
"type":"structure",
412+
"required":[
413+
"encryptionType",
414+
"encryptionStatus"
415+
],
416+
"members":{
417+
"encryptionType":{
418+
"shape":"EncryptionType",
419+
"documentation":"<p>The type of encryption that protects the data on your cluster.</p>"
420+
},
421+
"kmsKeyArn":{
422+
"shape":"KmsKeyArn",
423+
"documentation":"<p>The ARN of the KMS key that encrypts data in the cluster.</p>"
424+
},
425+
"encryptionStatus":{
426+
"shape":"EncryptionStatus",
427+
"documentation":"<p>The status of encryption for the cluster.</p>"
428+
}
429+
},
430+
"documentation":"<p>Configuration details about encryption for the cluster including the KMS key ARN, encryption type, and encryption status.</p>"
431+
},
432+
"EncryptionStatus":{
433+
"type":"string",
434+
"enum":[
435+
"ENABLED",
436+
"UPDATING",
437+
"KMS_KEY_INACCESSIBLE",
438+
"ENABLING"
439+
]
440+
},
441+
"EncryptionType":{
442+
"type":"string",
443+
"enum":[
444+
"AWS_OWNED_KMS_KEY",
445+
"CUSTOMER_MANAGED_KMS_KEY"
446+
]
447+
},
402448
"GetClusterInput":{
403449
"type":"structure",
404450
"required":["identifier"],
@@ -445,7 +491,11 @@
445491
"shape":"MultiRegionProperties",
446492
"documentation":"<p>Returns the current multi-Region cluster configuration, including witness region and linked cluster information.</p>"
447493
},
448-
"tags":{"shape":"TagMap"}
494+
"tags":{"shape":"TagMap"},
495+
"encryptionDetails":{
496+
"shape":"EncryptionDetails",
497+
"documentation":"<p>The current encryption configuration details for the cluster.</p>"
498+
}
449499
},
450500
"documentation":"<p>The output of a cluster.</p>"
451501
},
@@ -493,6 +543,13 @@
493543
"fault":true,
494544
"retryable":{"throttling":false}
495545
},
546+
"KmsEncryptionKey":{
547+
"type":"string",
548+
"max":2048,
549+
"min":1,
550+
"pattern":"[a-zA-Z0-9:/_-]+"
551+
},
552+
"KmsKeyArn":{"type":"string"},
496553
"ListClustersInput":{
497554
"type":"structure",
498555
"members":{
@@ -761,6 +818,10 @@
761818
"shape":"DeletionProtectionEnabled",
762819
"documentation":"<p>Specifies whether to enable deletion protection in your cluster.</p>"
763820
},
821+
"kmsEncryptionKey":{
822+
"shape":"KmsEncryptionKey",
823+
"documentation":"<p>The KMS key that encrypts and protects the data on your cluster. You can specify the ARN, ID, or alias of an existing key or have Amazon Web Services create a default key for you.</p>"
824+
},
764825
"clientToken":{
765826
"shape":"ClientToken",
766827
"documentation":"<p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully. The subsequent retries with the same client token return the result from the original successful request and they have no additional effect.</p> <p>If you don't specify a client token, the Amazon Web Services SDK automatically generates one.</p>",

sdk/code-analysis/ServiceAnalysis/DSQL/Generated/PropertyValueRules.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66
<max>128</max>
77
<pattern>[!-~]+</pattern>
88
</property-value-rule>
9+
<property-value-rule>
10+
<property>Amazon.DSQL.Model.CreateClusterRequest.KmsEncryptionKey</property>
11+
<min>1</min>
12+
<max>2048</max>
13+
<pattern>[a-zA-Z0-9:/_-]+</pattern>
14+
</property-value-rule>
915
<property-value-rule>
1016
<property>Amazon.DSQL.Model.CreateClusterResponse.Arn</property>
1117
<pattern>arn:aws(-[^:]+)?:dsql:[a-z0-9-]{1,20}:[0-9]{12}:cluster/[a-z0-9]{26}</pattern>
@@ -87,6 +93,12 @@
8793
<property>Amazon.DSQL.Model.UpdateClusterRequest.Identifier</property>
8894
<pattern>[a-z0-9]{26}</pattern>
8995
</property-value-rule>
96+
<property-value-rule>
97+
<property>Amazon.DSQL.Model.UpdateClusterRequest.KmsEncryptionKey</property>
98+
<min>1</min>
99+
<max>2048</max>
100+
<pattern>[a-zA-Z0-9:/_-]+</pattern>
101+
</property-value-rule>
90102
<property-value-rule>
91103
<property>Amazon.DSQL.Model.UpdateClusterResponse.Arn</property>
92104
<pattern>arn:aws(-[^:]+)?:dsql:[a-z0-9-]{1,20}:[0-9]{12}:cluster/[a-z0-9]{26}</pattern>

sdk/src/Services/DSQL/Generated/Model/CreateClusterRequest.cs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ public partial class CreateClusterRequest : AmazonDSQLRequest
110110
{
111111
private string _clientToken;
112112
private bool? _deletionProtectionEnabled;
113+
private string _kmsEncryptionKey;
113114
private MultiRegionProperties _multiRegionProperties;
114115
private Dictionary<string, string> _tags = AWSConfigs.InitializeCollections ? new Dictionary<string, string>() : null;
115116

@@ -160,6 +161,27 @@ internal bool IsSetDeletionProtectionEnabled()
160161
return this._deletionProtectionEnabled.HasValue;
161162
}
162163

164+
/// <summary>
165+
/// Gets and sets the property KmsEncryptionKey.
166+
/// <para>
167+
/// The KMS key that encrypts and protects the data on your cluster. You can specify the
168+
/// ARN, ID, or alias of an existing key or have Amazon Web Services create a default
169+
/// key for you.
170+
/// </para>
171+
/// </summary>
172+
[AWSProperty(Min=1, Max=2048)]
173+
public string KmsEncryptionKey
174+
{
175+
get { return this._kmsEncryptionKey; }
176+
set { this._kmsEncryptionKey = value; }
177+
}
178+
179+
// Check to see if KmsEncryptionKey property is set
180+
internal bool IsSetKmsEncryptionKey()
181+
{
182+
return this._kmsEncryptionKey != null;
183+
}
184+
163185
/// <summary>
164186
/// Gets and sets the property MultiRegionProperties.
165187
/// <para>

sdk/src/Services/DSQL/Generated/Model/CreateClusterResponse.cs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ public partial class CreateClusterResponse : AmazonWebServiceResponse
3737
private string _arn;
3838
private DateTime? _creationTime;
3939
private bool? _deletionProtectionEnabled;
40+
private EncryptionDetails _encryptionDetails;
4041
private string _identifier;
4142
private MultiRegionProperties _multiRegionProperties;
4243
private ClusterStatus _status;
@@ -98,6 +99,25 @@ internal bool IsSetDeletionProtectionEnabled()
9899
return this._deletionProtectionEnabled.HasValue;
99100
}
100101

102+
/// <summary>
103+
/// Gets and sets the property EncryptionDetails.
104+
/// <para>
105+
/// The encryption configuration for the cluster that was specified during the creation
106+
/// process, including the KMS key identifier and encryption state.
107+
/// </para>
108+
/// </summary>
109+
public EncryptionDetails EncryptionDetails
110+
{
111+
get { return this._encryptionDetails; }
112+
set { this._encryptionDetails = value; }
113+
}
114+
115+
// Check to see if EncryptionDetails property is set
116+
internal bool IsSetEncryptionDetails()
117+
{
118+
return this._encryptionDetails != null;
119+
}
120+
101121
/// <summary>
102122
/// Gets and sets the property Identifier.
103123
/// <para>

0 commit comments

Comments
 (0)