Skip to content

Commit c454e90

Browse files
The CreateApplication API now supports an optional kms key arn parameter to allow customers to specify a CMK for application encryption.
1 parent 36889dc commit c454e90

File tree

10 files changed

+140
-4
lines changed

10 files changed

+140
-4
lines changed

generator/ServiceModels/opensearch/opensearch-2021-01-01.api.json

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2069,7 +2069,8 @@
20692069
"dataSources":{"shape":"DataSources"},
20702070
"iamIdentityCenterOptions":{"shape":"IamIdentityCenterOptionsInput"},
20712071
"appConfigs":{"shape":"AppConfigs"},
2072-
"tagList":{"shape":"TagList"}
2072+
"tagList":{"shape":"TagList"},
2073+
"kmsKeyArn":{"shape":"KmsKeyArn"}
20732074
}
20742075
},
20752076
"CreateApplicationResponse":{
@@ -2082,7 +2083,8 @@
20822083
"iamIdentityCenterOptions":{"shape":"IamIdentityCenterOptions"},
20832084
"appConfigs":{"shape":"AppConfigs"},
20842085
"tagList":{"shape":"TagList"},
2085-
"createdAt":{"shape":"Timestamp"}
2086+
"createdAt":{"shape":"Timestamp"},
2087+
"kmsKeyArn":{"shape":"KmsKeyArn"}
20862088
}
20872089
},
20882090
"CreateDomainRequest":{
@@ -3291,7 +3293,8 @@
32913293
"dataSources":{"shape":"DataSources"},
32923294
"appConfigs":{"shape":"AppConfigs"},
32933295
"createdAt":{"shape":"Timestamp"},
3294-
"lastUpdatedAt":{"shape":"Timestamp"}
3296+
"lastUpdatedAt":{"shape":"Timestamp"},
3297+
"kmsKeyArn":{"shape":"KmsKeyArn"}
32953298
}
32963299
},
32973300
"GetCompatibleVersionsRequest":{
@@ -3780,6 +3783,12 @@
37803783
"KeyStoreAccessEnabled":{"shape":"Boolean"}
37813784
}
37823785
},
3786+
"KmsKeyArn":{
3787+
"type":"string",
3788+
"max":2048,
3789+
"min":20,
3790+
"pattern":"^arn:aws[a-zA-Z-]*:kms:[a-z0-9-]+:[0-9]{12}:key/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$"
3791+
},
37833792
"KmsKeyId":{
37843793
"type":"string",
37853794
"max":500,

generator/ServiceModels/opensearch/opensearch-2021-01-01.docs.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1955,6 +1955,14 @@
19551955
"PackageAssociationConfiguration$KeyStoreAccessOption": "<p>The configuration parameters to enable accessing the key store required by the package.</p>"
19561956
}
19571957
},
1958+
"KmsKeyArn": {
1959+
"base": null,
1960+
"refs": {
1961+
"CreateApplicationRequest$kmsKeyArn": "<p>The Amazon Resource Name (ARN) of the KMS key used to encrypt the application's data at rest. If provided, the application uses your customer-managed key for encryption. If omitted, the application uses an AWS-managed key. The KMS key must be in the same region as the application.</p>",
1962+
"CreateApplicationResponse$kmsKeyArn": "<p>The Amazon Resource Name (ARN) of the KMS key used to encrypt the application's data at rest.</p>",
1963+
"GetApplicationResponse$kmsKeyArn": "<p>The Amazon Resource Name (ARN) of the KMS key used to encrypt the application's data at rest.</p>"
1964+
}
1965+
},
19581966
"KmsKeyId": {
19591967
"base": null,
19601968
"refs": {

generator/ServiceModels/opensearch/opensearch-2021-01-01.normal.json

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2673,7 +2673,11 @@
26732673
"shape":"AppConfigs",
26742674
"documentation":"<p>Configuration settings for the OpenSearch application, including administrative options.</p>"
26752675
},
2676-
"tagList":{"shape":"TagList"}
2676+
"tagList":{"shape":"TagList"},
2677+
"kmsKeyArn":{
2678+
"shape":"KmsKeyArn",
2679+
"documentation":"<p>The Amazon Resource Name (ARN) of the KMS key used to encrypt the application's data at rest. If provided, the application uses your customer-managed key for encryption. If omitted, the application uses an AWS-managed key. The KMS key must be in the same region as the application.</p>"
2680+
}
26772681
}
26782682
},
26792683
"CreateApplicationResponse":{
@@ -2704,6 +2708,10 @@
27042708
"createdAt":{
27052709
"shape":"Timestamp",
27062710
"documentation":"<p>The timestamp indicating when the OpenSearch application was created.</p>"
2711+
},
2712+
"kmsKeyArn":{
2713+
"shape":"KmsKeyArn",
2714+
"documentation":"<p>The Amazon Resource Name (ARN) of the KMS key used to encrypt the application's data at rest.</p>"
27072715
}
27082716
}
27092717
},
@@ -4780,6 +4788,10 @@
47804788
"lastUpdatedAt":{
47814789
"shape":"Timestamp",
47824790
"documentation":"<p>The timestamp of the last update to the OpenSearch application.</p>"
4791+
},
4792+
"kmsKeyArn":{
4793+
"shape":"KmsKeyArn",
4794+
"documentation":"<p>The Amazon Resource Name (ARN) of the KMS key used to encrypt the application's data at rest.</p>"
47834795
}
47844796
}
47854797
},
@@ -5544,6 +5556,12 @@
55445556
},
55455557
"documentation":"<p>The configuration parameters to enable access to the key store required by the package.</p>"
55465558
},
5559+
"KmsKeyArn":{
5560+
"type":"string",
5561+
"max":2048,
5562+
"min":20,
5563+
"pattern":"^arn:aws[a-zA-Z-]*:kms:[a-z0-9-]+:[0-9]{12}:key/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$"
5564+
},
55475565
"KmsKeyId":{
55485566
"type":"string",
55495567
"max":500,

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

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,12 @@
8383
<min>1</min>
8484
<max>64</max>
8585
</property-value-rule>
86+
<property-value-rule>
87+
<property>Amazon.OpenSearchService.Model.CreateApplicationRequest.KmsKeyArn</property>
88+
<min>20</min>
89+
<max>2048</max>
90+
<pattern>^arn:aws[a-zA-Z-]*:kms:[a-z0-9-]+:[0-9]{12}:key/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$</pattern>
91+
</property-value-rule>
8692
<property-value-rule>
8793
<property>Amazon.OpenSearchService.Model.CreateApplicationRequest.Name</property>
8894
<min>3</min>
@@ -99,6 +105,12 @@
99105
<property>Amazon.OpenSearchService.Model.CreateApplicationResponse.Id</property>
100106
<pattern>[a-z0-9]{3,30}</pattern>
101107
</property-value-rule>
108+
<property-value-rule>
109+
<property>Amazon.OpenSearchService.Model.CreateApplicationResponse.KmsKeyArn</property>
110+
<min>20</min>
111+
<max>2048</max>
112+
<pattern>^arn:aws[a-zA-Z-]*:kms:[a-z0-9-]+:[0-9]{12}:key/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$</pattern>
113+
</property-value-rule>
102114
<property-value-rule>
103115
<property>Amazon.OpenSearchService.Model.CreateApplicationResponse.Name</property>
104116
<min>3</min>
@@ -398,6 +410,12 @@
398410
<property>Amazon.OpenSearchService.Model.GetApplicationResponse.Id</property>
399411
<pattern>[a-z0-9]{3,30}</pattern>
400412
</property-value-rule>
413+
<property-value-rule>
414+
<property>Amazon.OpenSearchService.Model.GetApplicationResponse.KmsKeyArn</property>
415+
<min>20</min>
416+
<max>2048</max>
417+
<pattern>^arn:aws[a-zA-Z-]*:kms:[a-z0-9-]+:[0-9]{12}:key/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$</pattern>
418+
</property-value-rule>
401419
<property-value-rule>
402420
<property>Amazon.OpenSearchService.Model.GetApplicationResponse.Name</property>
403421
<min>3</min>

sdk/src/Services/OpenSearchService/Generated/Model/CreateApplicationRequest.cs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ public partial class CreateApplicationRequest : AmazonOpenSearchServiceRequest
4040
private string _clientToken;
4141
private List<DataSource> _dataSources = AWSConfigs.InitializeCollections ? new List<DataSource>() : null;
4242
private IamIdentityCenterOptionsInput _iamIdentityCenterOptions;
43+
private string _kmsKeyArn;
4344
private string _name;
4445
private List<Tag> _tagList = AWSConfigs.InitializeCollections ? new List<Tag>() : null;
4546

@@ -118,6 +119,28 @@ internal bool IsSetIamIdentityCenterOptions()
118119
return this._iamIdentityCenterOptions != null;
119120
}
120121

122+
/// <summary>
123+
/// Gets and sets the property KmsKeyArn.
124+
/// <para>
125+
/// The Amazon Resource Name (ARN) of the KMS key used to encrypt the application's data
126+
/// at rest. If provided, the application uses your customer-managed key for encryption.
127+
/// If omitted, the application uses an AWS-managed key. The KMS key must be in the same
128+
/// region as the application.
129+
/// </para>
130+
/// </summary>
131+
[AWSProperty(Min=20, Max=2048)]
132+
public string KmsKeyArn
133+
{
134+
get { return this._kmsKeyArn; }
135+
set { this._kmsKeyArn = value; }
136+
}
137+
138+
// Check to see if KmsKeyArn property is set
139+
internal bool IsSetKmsKeyArn()
140+
{
141+
return this._kmsKeyArn != null;
142+
}
143+
121144
/// <summary>
122145
/// Gets and sets the property Name.
123146
/// <para>

sdk/src/Services/OpenSearchService/Generated/Model/CreateApplicationResponse.cs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ public partial class CreateApplicationResponse : AmazonWebServiceResponse
4040
private List<DataSource> _dataSources = AWSConfigs.InitializeCollections ? new List<DataSource>() : null;
4141
private IamIdentityCenterOptions _iamIdentityCenterOptions;
4242
private string _id;
43+
private string _kmsKeyArn;
4344
private string _name;
4445
private List<Tag> _tagList = AWSConfigs.InitializeCollections ? new List<Tag>() : null;
4546

@@ -150,6 +151,26 @@ internal bool IsSetId()
150151
return this._id != null;
151152
}
152153

154+
/// <summary>
155+
/// Gets and sets the property KmsKeyArn.
156+
/// <para>
157+
/// The Amazon Resource Name (ARN) of the KMS key used to encrypt the application's data
158+
/// at rest.
159+
/// </para>
160+
/// </summary>
161+
[AWSProperty(Min=20, Max=2048)]
162+
public string KmsKeyArn
163+
{
164+
get { return this._kmsKeyArn; }
165+
set { this._kmsKeyArn = value; }
166+
}
167+
168+
// Check to see if KmsKeyArn property is set
169+
internal bool IsSetKmsKeyArn()
170+
{
171+
return this._kmsKeyArn != null;
172+
}
173+
153174
/// <summary>
154175
/// Gets and sets the property Name.
155176
/// <para>

sdk/src/Services/OpenSearchService/Generated/Model/GetApplicationResponse.cs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ public partial class GetApplicationResponse : AmazonWebServiceResponse
4141
private string _endpoint;
4242
private IamIdentityCenterOptions _iamIdentityCenterOptions;
4343
private string _id;
44+
private string _kmsKeyArn;
4445
private DateTime? _lastUpdatedAt;
4546
private string _name;
4647
private ApplicationStatus _status;
@@ -170,6 +171,26 @@ internal bool IsSetId()
170171
return this._id != null;
171172
}
172173

174+
/// <summary>
175+
/// Gets and sets the property KmsKeyArn.
176+
/// <para>
177+
/// The Amazon Resource Name (ARN) of the KMS key used to encrypt the application's data
178+
/// at rest.
179+
/// </para>
180+
/// </summary>
181+
[AWSProperty(Min=20, Max=2048)]
182+
public string KmsKeyArn
183+
{
184+
get { return this._kmsKeyArn; }
185+
set { this._kmsKeyArn = value; }
186+
}
187+
188+
// Check to see if KmsKeyArn property is set
189+
internal bool IsSetKmsKeyArn()
190+
{
191+
return this._kmsKeyArn != null;
192+
}
193+
173194
/// <summary>
174195
/// Gets and sets the property LastUpdatedAt.
175196
/// <para>

sdk/src/Services/OpenSearchService/Generated/Model/Internal/MarshallTransformations/CreateApplicationRequestMarshaller.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,12 @@ public IRequest Marshall(CreateApplicationRequest publicRequest)
121121
context.Writer.WriteObjectEnd();
122122
}
123123

124+
if(publicRequest.IsSetKmsKeyArn())
125+
{
126+
context.Writer.WritePropertyName("kmsKeyArn");
127+
context.Writer.Write(publicRequest.KmsKeyArn);
128+
}
129+
124130
if(publicRequest.IsSetName())
125131
{
126132
context.Writer.WritePropertyName("name");

sdk/src/Services/OpenSearchService/Generated/Model/Internal/MarshallTransformations/CreateApplicationResponseUnmarshaller.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,12 @@ public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext cont
8888
response.Id = unmarshaller.Unmarshall(context);
8989
continue;
9090
}
91+
if (context.TestExpression("kmsKeyArn", targetDepth))
92+
{
93+
var unmarshaller = StringUnmarshaller.Instance;
94+
response.KmsKeyArn = unmarshaller.Unmarshall(context);
95+
continue;
96+
}
9197
if (context.TestExpression("name", targetDepth))
9298
{
9399
var unmarshaller = StringUnmarshaller.Instance;

sdk/src/Services/OpenSearchService/Generated/Model/Internal/MarshallTransformations/GetApplicationResponseUnmarshaller.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,12 @@ public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext cont
9494
response.Id = unmarshaller.Unmarshall(context);
9595
continue;
9696
}
97+
if (context.TestExpression("kmsKeyArn", targetDepth))
98+
{
99+
var unmarshaller = StringUnmarshaller.Instance;
100+
response.KmsKeyArn = unmarshaller.Unmarshall(context);
101+
continue;
102+
}
97103
if (context.TestExpression("lastUpdatedAt", targetDepth))
98104
{
99105
var unmarshaller = DateTimeUnmarshaller.Instance;

0 commit comments

Comments
 (0)