Skip to content

Commit 53b0b02

Browse files
Remove unpopulated KeyMaterialId from Encrypt Response
1 parent 88bf60b commit 53b0b02

File tree

9 files changed

+13
-49
lines changed

9 files changed

+13
-49
lines changed

generator/ServiceModels/kms/kms-2014-11-01.api.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1533,8 +1533,7 @@
15331533
"members":{
15341534
"CiphertextBlob":{"shape":"CiphertextType"},
15351535
"KeyId":{"shape":"KeyIdType"},
1536-
"EncryptionAlgorithm":{"shape":"EncryptionAlgorithmSpec"},
1537-
"KeyMaterialId":{"shape":"BackingKeyIdType"}
1536+
"EncryptionAlgorithm":{"shape":"EncryptionAlgorithmSpec"}
15381537
}
15391538
},
15401539
"EncryptionAlgorithmSpec":{

generator/ServiceModels/kms/kms-2014-11-01.docs.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,11 @@
118118
"BackingKeyIdType": {
119119
"base": null,
120120
"refs": {
121-
"DecryptResponse$KeyMaterialId": "<p>The identifier of the key material used to decrypt the ciphertext. This field is present only when the operation uses a symmetric encryption KMS key.</p>",
121+
"DecryptResponse$KeyMaterialId": "<p>The identifier of the key material used to decrypt the ciphertext. This field is present only when the operation uses a symmetric encryption KMS key. This field is omitted if the request includes the <code>Recipient</code> parameter.</p>",
122122
"DeleteImportedKeyMaterialRequest$KeyMaterialId": "<p>Identifies the imported key material you are deleting. </p> <important> <p>If no KeyMaterialId is specified, KMS deletes the current key material.</p> </important> <p>To get the list of key material IDs associated with a KMS key, use <a>ListKeyRotations</a>.</p>",
123-
"EncryptResponse$KeyMaterialId": "<p>The identifier of the key material used to encrypt the ciphertext. This field is present only when the operation uses a symmetric encryption KMS key.</p>",
124-
"GenerateDataKeyPairResponse$KeyMaterialId": "<p>The identifier of the key material used to encrypt the private key.</p>",
123+
"GenerateDataKeyPairResponse$KeyMaterialId": "<p>The identifier of the key material used to encrypt the private key. This field is omitted if the request includes the <code>Recipient</code> parameter.</p>",
125124
"GenerateDataKeyPairWithoutPlaintextResponse$KeyMaterialId": "<p>The identifier of the key material used to encrypt the private key.</p>",
126-
"GenerateDataKeyResponse$KeyMaterialId": "<p>The identifier of the key material used to encrypt the data key.</p>",
125+
"GenerateDataKeyResponse$KeyMaterialId": "<p>The identifier of the key material used to encrypt the data key. This field is omitted if the request includes the <code>Recipient</code> parameter.</p>",
127126
"GenerateDataKeyWithoutPlaintextResponse$KeyMaterialId": "<p>The identifier of the key material used to encrypt the data key.</p>",
128127
"ImportKeyMaterialRequest$KeyMaterialId": "<p>Identifies the key material being imported. This parameter is optional and only usable with symmetric encryption keys. You cannot specify a key material ID with <code>ImportType</code> set to <code>NEW_KEY_MATERIAL</code>. Whenever you import key material into a symmetric encryption key, KMS assigns a unique identifier to the key material based on the KMS key ID and the imported key material. When you re-import key material with a specified key material ID, KMS:</p> <ul> <li> <p>Computes the identifier for the key material</p> </li> <li> <p>Matches the computed identifier against the specified key material ID</p> </li> <li> <p>Verifies that the key material ID is already associated with the KMS key</p> </li> </ul> <p>To get the list of key material IDs associated with a KMS key, use <a>ListKeyRotations</a>.</p>",
129128
"ImportKeyMaterialResponse$KeyMaterialId": "<p>Identifies the imported key material.</p>",

generator/ServiceModels/kms/kms-2014-11-01.normal.json

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1608,7 +1608,7 @@
16081608
},
16091609
"KeyMaterialId":{
16101610
"shape":"BackingKeyIdType",
1611-
"documentation":"<p>The identifier of the key material used to decrypt the ciphertext. This field is present only when the operation uses a symmetric encryption KMS key.</p>"
1611+
"documentation":"<p>The identifier of the key material used to decrypt the ciphertext. This field is present only when the operation uses a symmetric encryption KMS key. This field is omitted if the request includes the <code>Recipient</code> parameter.</p>"
16121612
}
16131613
}
16141614
},
@@ -1918,10 +1918,6 @@
19181918
"EncryptionAlgorithm":{
19191919
"shape":"EncryptionAlgorithmSpec",
19201920
"documentation":"<p>The encryption algorithm that was used to encrypt the plaintext.</p>"
1921-
},
1922-
"KeyMaterialId":{
1923-
"shape":"BackingKeyIdType",
1924-
"documentation":"<p>The identifier of the key material used to encrypt the ciphertext. This field is present only when the operation uses a symmetric encryption KMS key.</p>"
19251921
}
19261922
}
19271923
},
@@ -2023,7 +2019,7 @@
20232019
},
20242020
"KeyMaterialId":{
20252021
"shape":"BackingKeyIdType",
2026-
"documentation":"<p>The identifier of the key material used to encrypt the private key.</p>"
2022+
"documentation":"<p>The identifier of the key material used to encrypt the private key. This field is omitted if the request includes the <code>Recipient</code> parameter.</p>"
20272023
}
20282024
}
20292025
},
@@ -2136,7 +2132,7 @@
21362132
},
21372133
"KeyMaterialId":{
21382134
"shape":"BackingKeyIdType",
2139-
"documentation":"<p>The identifier of the key material used to encrypt the data key.</p>"
2135+
"documentation":"<p>The identifier of the key material used to encrypt the data key. This field is omitted if the request includes the <code>Recipient</code> parameter.</p>"
21402136
}
21412137
}
21422138
},

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -296,12 +296,6 @@
296296
<min>1</min>
297297
<max>2048</max>
298298
</property-value-rule>
299-
<property-value-rule>
300-
<property>Amazon.KeyManagementService.Model.EncryptResponse.KeyMaterialId</property>
301-
<min>64</min>
302-
<max>64</max>
303-
<pattern>^[a-f0-9]+$</pattern>
304-
</property-value-rule>
305299
<property-value-rule>
306300
<property>Amazon.KeyManagementService.Model.GenerateDataKeyRequest.KeyId</property>
307301
<min>1</min>

sdk/src/Services/KeyManagementService/Generated/Model/DecryptResponse.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ internal bool IsSetKeyId()
110110
/// Gets and sets the property KeyMaterialId.
111111
/// <para>
112112
/// The identifier of the key material used to decrypt the ciphertext. This field is present
113-
/// only when the operation uses a symmetric encryption KMS key.
113+
/// only when the operation uses a symmetric encryption KMS key. This field is omitted
114+
/// if the request includes the <c>Recipient</c> parameter.
114115
/// </para>
115116
/// </summary>
116117
[AWSProperty(Min=64, Max=64)]

sdk/src/Services/KeyManagementService/Generated/Model/EncryptResponse.cs

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ public partial class EncryptResponse : AmazonWebServiceResponse
3737
private MemoryStream _ciphertextBlob;
3838
private EncryptionAlgorithmSpec _encryptionAlgorithm;
3939
private string _keyId;
40-
private string _keyMaterialId;
4140

4241
/// <summary>
4342
/// Gets and sets the property CiphertextBlob.
@@ -97,25 +96,5 @@ internal bool IsSetKeyId()
9796
return this._keyId != null;
9897
}
9998

100-
/// <summary>
101-
/// Gets and sets the property KeyMaterialId.
102-
/// <para>
103-
/// The identifier of the key material used to encrypt the ciphertext. This field is present
104-
/// only when the operation uses a symmetric encryption KMS key.
105-
/// </para>
106-
/// </summary>
107-
[AWSProperty(Min=64, Max=64)]
108-
public string KeyMaterialId
109-
{
110-
get { return this._keyMaterialId; }
111-
set { this._keyMaterialId = value; }
112-
}
113-
114-
// Check to see if KeyMaterialId property is set
115-
internal bool IsSetKeyMaterialId()
116-
{
117-
return this._keyMaterialId != null;
118-
}
119-
12099
}
121100
}

sdk/src/Services/KeyManagementService/Generated/Model/GenerateDataKeyPairResponse.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ internal bool IsSetKeyId()
9595
/// <summary>
9696
/// Gets and sets the property KeyMaterialId.
9797
/// <para>
98-
/// The identifier of the key material used to encrypt the private key.
98+
/// The identifier of the key material used to encrypt the private key. This field is
99+
/// omitted if the request includes the <c>Recipient</c> parameter.
99100
/// </para>
100101
/// </summary>
101102
[AWSProperty(Min=64, Max=64)]

sdk/src/Services/KeyManagementService/Generated/Model/GenerateDataKeyResponse.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ internal bool IsSetKeyId()
112112
/// <summary>
113113
/// Gets and sets the property KeyMaterialId.
114114
/// <para>
115-
/// The identifier of the key material used to encrypt the data key.
115+
/// The identifier of the key material used to encrypt the data key. This field is omitted
116+
/// if the request includes the <c>Recipient</c> parameter.
116117
/// </para>
117118
/// </summary>
118119
[AWSProperty(Min=64, Max=64)]

sdk/src/Services/KeyManagementService/Generated/Model/Internal/MarshallTransformations/EncryptResponseUnmarshaller.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,6 @@ public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext cont
7070
response.KeyId = unmarshaller.Unmarshall(context);
7171
continue;
7272
}
73-
if (context.TestExpression("KeyMaterialId", targetDepth))
74-
{
75-
var unmarshaller = StringUnmarshaller.Instance;
76-
response.KeyMaterialId = unmarshaller.Unmarshall(context);
77-
continue;
78-
}
7973
}
8074

8175
return response;

0 commit comments

Comments
 (0)