Skip to content

Commit aaf7317

Browse files
AWS Payment Cryptography Service now supports Multi-Region key replication. Customers can choose to automatically distribute keys across AWS Regions.
1 parent e1c13a9 commit aaf7317

File tree

60 files changed

+13363
-757
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+13363
-757
lines changed

generator/ServiceModels/payment-cryptography/payment-cryptography-2021-09-14.api.json

Lines changed: 224 additions & 17 deletions
Large diffs are not rendered by default.

generator/ServiceModels/payment-cryptography/payment-cryptography-2021-09-14.docs.json

Lines changed: 159 additions & 108 deletions
Large diffs are not rendered by default.
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
22
"version": "1.0",
3-
"examples": {
4-
}
3+
"examples": {}
54
}

generator/ServiceModels/payment-cryptography/payment-cryptography-2021-09-14.normal.json

Lines changed: 300 additions & 27 deletions
Large diffs are not rendered by default.

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

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
<?xml version="1.0" encoding="utf-16"?>
22
<property-value-rules>
3+
<property-value-rule>
4+
<property>Amazon.PaymentCryptography.Model.AddKeyReplicationRegionsRequest.KeyIdentifier</property>
5+
<min>7</min>
6+
<max>322</max>
7+
<pattern>arn:aws:payment-cryptography:[a-z]{2}-[a-z]{1,16}-[0-9]+:[0-9]{12}:(key/[0-9a-zA-Z]{16,64}|alias/[a-zA-Z0-9/_-]+)$|^alias/[a-zA-Z0-9/_-]+</pattern>
8+
</property-value-rule>
39
<property-value-rule>
410
<property>Amazon.PaymentCryptography.Model.CreateAliasRequest.AliasName</property>
511
<min>7</min>
@@ -49,7 +55,7 @@
4955
</property-value-rule>
5056
<property-value-rule>
5157
<property>Amazon.PaymentCryptography.Model.GetParametersForExportResponse.ExportToken</property>
52-
<pattern>export-token-[0-9a-zA-Z]{16,64}</pattern>
58+
<pattern>(export-token-[0-9a-zA-Z]{16,64})?</pattern>
5359
</property-value-rule>
5460
<property-value-rule>
5561
<property>Amazon.PaymentCryptography.Model.GetParametersForExportResponse.SigningKeyCertificate</property>
@@ -65,7 +71,7 @@
6571
</property-value-rule>
6672
<property-value-rule>
6773
<property>Amazon.PaymentCryptography.Model.GetParametersForImportResponse.ImportToken</property>
68-
<pattern>import-token-[0-9a-zA-Z]{16,64}</pattern>
74+
<pattern>(import-token-[0-9a-zA-Z]{16,64})?</pattern>
6975
</property-value-rule>
7076
<property-value-rule>
7177
<property>Amazon.PaymentCryptography.Model.GetParametersForImportResponse.WrappingKeyCertificate</property>
@@ -154,6 +160,12 @@
154160
<min>1</min>
155161
<max>8192</max>
156162
</property-value-rule>
163+
<property-value-rule>
164+
<property>Amazon.PaymentCryptography.Model.RemoveKeyReplicationRegionsRequest.KeyIdentifier</property>
165+
<min>7</min>
166+
<max>322</max>
167+
<pattern>arn:aws:payment-cryptography:[a-z]{2}-[a-z]{1,16}-[0-9]+:[0-9]{12}:(key/[0-9a-zA-Z]{16,64}|alias/[a-zA-Z0-9/_-]+)$|^alias/[a-zA-Z0-9/_-]+</pattern>
168+
</property-value-rule>
157169
<property-value-rule>
158170
<property>Amazon.PaymentCryptography.Model.RestoreKeyRequest.KeyIdentifier</property>
159171
<min>7</min>
@@ -264,7 +276,7 @@
264276
</property-value-rule>
265277
<property-value-rule>
266278
<property>Amazon.PaymentCryptography.Model.ExportTr34KeyBlock.ExportToken</property>
267-
<pattern>export-token-[0-9a-zA-Z]{16,64}</pattern>
279+
<pattern>(export-token-[0-9a-zA-Z]{16,64})?</pattern>
268280
</property-value-rule>
269281
<property-value-rule>
270282
<property>Amazon.PaymentCryptography.Model.ExportTr34KeyBlock.RandomNonce</property>
@@ -300,11 +312,11 @@
300312
<property>Amazon.PaymentCryptography.Model.ImportDiffieHellmanTr31KeyBlock.WrappedKeyBlock</property>
301313
<min>56</min>
302314
<max>9984</max>
303-
<pattern>[0-9A-Z]+</pattern>
315+
<pattern>[0-9a-zA-Z]+</pattern>
304316
</property-value-rule>
305317
<property-value-rule>
306318
<property>Amazon.PaymentCryptography.Model.ImportKeyCryptogram.ImportToken</property>
307-
<pattern>import-token-[0-9a-zA-Z]{16,64}</pattern>
319+
<pattern>(import-token-[0-9a-zA-Z]{16,64})?</pattern>
308320
</property-value-rule>
309321
<property-value-rule>
310322
<property>Amazon.PaymentCryptography.Model.ImportKeyCryptogram.WrappedKeyCryptogram</property>
@@ -316,7 +328,7 @@
316328
<property>Amazon.PaymentCryptography.Model.ImportTr31KeyBlock.WrappedKeyBlock</property>
317329
<min>56</min>
318330
<max>9984</max>
319-
<pattern>[0-9A-Z]+</pattern>
331+
<pattern>[0-9a-zA-Z]+</pattern>
320332
</property-value-rule>
321333
<property-value-rule>
322334
<property>Amazon.PaymentCryptography.Model.ImportTr31KeyBlock.WrappingKeyIdentifier</property>
@@ -332,7 +344,7 @@
332344
</property-value-rule>
333345
<property-value-rule>
334346
<property>Amazon.PaymentCryptography.Model.ImportTr34KeyBlock.ImportToken</property>
335-
<pattern>import-token-[0-9a-zA-Z]{16,64}</pattern>
347+
<pattern>(import-token-[0-9a-zA-Z]{16,64})?</pattern>
336348
</property-value-rule>
337349
<property-value-rule>
338350
<property>Amazon.PaymentCryptography.Model.ImportTr34KeyBlock.RandomNonce</property>
@@ -364,6 +376,10 @@
364376
<max>16</max>
365377
<pattern>[0-9a-fA-F]+</pattern>
366378
</property-value-rule>
379+
<property-value-rule>
380+
<property>Amazon.PaymentCryptography.Model.Key.PrimaryRegion</property>
381+
<pattern>[a-z]{2}-[a-z]{1,16}-[0-9]+</pattern>
382+
</property-value-rule>
367383
<property-value-rule>
368384
<property>Amazon.PaymentCryptography.Model.KeyBlockHeaders.KeyVersion</property>
369385
<min>2</min>
@@ -381,6 +397,10 @@
381397
<max>16</max>
382398
<pattern>[0-9a-fA-F]+</pattern>
383399
</property-value-rule>
400+
<property-value-rule>
401+
<property>Amazon.PaymentCryptography.Model.KeySummary.PrimaryRegion</property>
402+
<pattern>[a-z]{2}-[a-z]{1,16}-[0-9]+</pattern>
403+
</property-value-rule>
384404
<property-value-rule>
385405
<property>Amazon.PaymentCryptography.Model.RootCertificatePublicKey.PublicKeyCertificate</property>
386406
<min>1</min>

sdk/src/Services/PaymentCryptography/Generated/Model/AccessDeniedException.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@ namespace Amazon.PaymentCryptography.Model
3131
{
3232
/// <summary>
3333
/// You do not have sufficient access to perform this action.
34+
///
35+
///
36+
/// <para>
37+
/// This exception is thrown when the caller lacks the necessary IAM permissions to perform
38+
/// the requested operation. Verify that your IAM policy includes the required permissions
39+
/// for the specific Amazon Web Services Payment Cryptography action you're attempting.
40+
/// </para>
3441
/// </summary>
3542
#if !NETSTANDARD
3643
[Serializable]
Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
/*
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License").
5+
* You may not use this file except in compliance with the License.
6+
* A copy of the License is located at
7+
*
8+
* http://aws.amazon.com/apache2.0
9+
*
10+
* or in the "license" file accompanying this file. This file is distributed
11+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12+
* express or implied. See the License for the specific language governing
13+
* permissions and limitations under the License.
14+
*/
15+
16+
/*
17+
* Do not modify this file. This file is generated from the payment-cryptography-2021-09-14.normal.json service model.
18+
*/
19+
using System;
20+
using System.Collections.Generic;
21+
using System.Xml.Serialization;
22+
using System.Text;
23+
using System.IO;
24+
using System.Net;
25+
26+
using Amazon.Runtime;
27+
using Amazon.Runtime.Internal;
28+
29+
#pragma warning disable CS0612,CS0618,CS1570
30+
namespace Amazon.PaymentCryptography.Model
31+
{
32+
/// <summary>
33+
/// Container for the parameters to the AddKeyReplicationRegions operation.
34+
/// Adds replication Amazon Web Services Regions to an existing Amazon Web Services Payment
35+
/// Cryptography key, enabling the key to be used for cryptographic operations in additional
36+
/// Amazon Web Services Regions.
37+
///
38+
///
39+
/// <para>
40+
/// Multi-region keys allow you to use the same key material across multiple Amazon Web
41+
/// Services Regions, providing lower latency for applications distributed across regions.
42+
/// When you add Replication Regions, Amazon Web Services Payment Cryptography securely
43+
/// replicates the key material to the specified Amazon Web Services Regions.
44+
/// </para>
45+
///
46+
/// <para>
47+
/// The key must be in an active state to add Replication Regions. You can add multiple
48+
/// regions in a single operation, and the key will be available for use in those regions
49+
/// once replication is complete.
50+
/// </para>
51+
///
52+
/// <para>
53+
/// <b>Cross-account use:</b> This operation can't be used across different Amazon Web
54+
/// Services accounts.
55+
/// </para>
56+
///
57+
/// <para>
58+
/// <b>Related operations:</b>
59+
/// </para>
60+
/// <ul> <li>
61+
/// <para>
62+
/// <a href="https://docs.aws.amazon.com/payment-cryptography/latest/APIReference/API_RemoveKeyReplicationRegions.html">RemoveKeyReplicationRegions</a>
63+
///
64+
/// </para>
65+
/// </li> <li>
66+
/// <para>
67+
/// <a href="https://docs.aws.amazon.com/payment-cryptography/latest/APIReference/API_EnableDefaultKeyReplicationRegions.html">EnableDefaultKeyReplicationRegions</a>
68+
///
69+
/// </para>
70+
/// </li> <li>
71+
/// <para>
72+
/// <a href="https://docs.aws.amazon.com/payment-cryptography/latest/APIReference/API_GetDefaultKeyReplicationRegions.html">GetDefaultKeyReplicationRegions</a>
73+
///
74+
/// </para>
75+
/// </li> </ul>
76+
/// </summary>
77+
public partial class AddKeyReplicationRegionsRequest : AmazonPaymentCryptographyRequest
78+
{
79+
private string _keyIdentifier;
80+
private List<string> _replicationRegions = AWSConfigs.InitializeCollections ? new List<string>() : null;
81+
82+
/// <summary>
83+
/// Gets and sets the property KeyIdentifier.
84+
/// <para>
85+
/// The key identifier (ARN or alias) of the key for which to add replication regions.
86+
/// </para>
87+
///
88+
/// <para>
89+
/// This key must exist and be in a valid state for replication operations.
90+
/// </para>
91+
/// </summary>
92+
[AWSProperty(Required=true, Min=7, Max=322)]
93+
public string KeyIdentifier
94+
{
95+
get { return this._keyIdentifier; }
96+
set { this._keyIdentifier = value; }
97+
}
98+
99+
// Check to see if KeyIdentifier property is set
100+
internal bool IsSetKeyIdentifier()
101+
{
102+
return this._keyIdentifier != null;
103+
}
104+
105+
/// <summary>
106+
/// Gets and sets the property ReplicationRegions.
107+
/// <para>
108+
/// The list of Amazon Web Services Regions to add to the key's replication configuration.
109+
/// </para>
110+
///
111+
/// <para>
112+
/// Each region must be a valid Amazon Web Services Region where Amazon Web Services Payment
113+
/// Cryptography is available. The key will be replicated to these regions, allowing cryptographic
114+
/// operations to be performed closer to your applications.
115+
/// </para>
116+
/// <para />
117+
/// Starting with version 4 of the SDK this property will default to null. If no data for this property is returned
118+
/// from the service the property will also be null. This was changed to improve performance and allow the SDK and caller
119+
/// to distinguish between a property not set or a property being empty to clear out a value. To retain the previous
120+
/// SDK behavior set the AWSConfigs.InitializeCollections static property to true.
121+
/// </summary>
122+
[AWSProperty(Required=true)]
123+
public List<string> ReplicationRegions
124+
{
125+
get { return this._replicationRegions; }
126+
set { this._replicationRegions = value; }
127+
}
128+
129+
// Check to see if ReplicationRegions property is set
130+
internal bool IsSetReplicationRegions()
131+
{
132+
return this._replicationRegions != null && (this._replicationRegions.Count > 0 || !AWSConfigs.InitializeCollections);
133+
}
134+
135+
}
136+
}
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
/*
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License").
5+
* You may not use this file except in compliance with the License.
6+
* A copy of the License is located at
7+
*
8+
* http://aws.amazon.com/apache2.0
9+
*
10+
* or in the "license" file accompanying this file. This file is distributed
11+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12+
* express or implied. See the License for the specific language governing
13+
* permissions and limitations under the License.
14+
*/
15+
16+
/*
17+
* Do not modify this file. This file is generated from the payment-cryptography-2021-09-14.normal.json service model.
18+
*/
19+
using System;
20+
using System.Collections.Generic;
21+
using System.Xml.Serialization;
22+
using System.Text;
23+
using System.IO;
24+
using System.Net;
25+
26+
using Amazon.Runtime;
27+
using Amazon.Runtime.Internal;
28+
29+
#pragma warning disable CS0612,CS0618,CS1570
30+
namespace Amazon.PaymentCryptography.Model
31+
{
32+
/// <summary>
33+
/// Output from adding replication regions to a key.
34+
/// </summary>
35+
public partial class AddKeyReplicationRegionsResponse : AmazonWebServiceResponse
36+
{
37+
private Key _key;
38+
39+
/// <summary>
40+
/// Gets and sets the property Key.
41+
/// <para>
42+
/// The updated key metadata after adding the replication regions.
43+
/// </para>
44+
///
45+
/// <para>
46+
/// This includes the current state of the key and its replication configuration.
47+
/// </para>
48+
/// </summary>
49+
[AWSProperty(Required=true)]
50+
public Key Key
51+
{
52+
get { return this._key; }
53+
set { this._key = value; }
54+
}
55+
56+
// Check to see if Key property is set
57+
internal bool IsSetKey()
58+
{
59+
return this._key != null;
60+
}
61+
62+
}
63+
}

sdk/src/Services/PaymentCryptography/Generated/Model/ConflictException.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@ namespace Amazon.PaymentCryptography.Model
3131
{
3232
/// <summary>
3333
/// This request can cause an inconsistent state for the resource.
34+
///
35+
///
36+
/// <para>
37+
/// The requested operation conflicts with the current state of the resource. For example,
38+
/// attempting to delete a key that is currently being used, or trying to create a resource
39+
/// that already exists.
40+
/// </para>
3441
/// </summary>
3542
#if !NETSTANDARD
3643
[Serializable]

sdk/src/Services/PaymentCryptography/Generated/Model/CreateKeyRequest.cs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ public partial class CreateKeyRequest : AmazonPaymentCryptographyRequest
111111
private bool? _exportable;
112112
private KeyAttributes _keyAttributes;
113113
private KeyCheckValueAlgorithm _keyCheckValueAlgorithm;
114+
private List<string> _replicationRegions = AWSConfigs.InitializeCollections ? new List<string>() : null;
114115
private List<Tag> _tags = AWSConfigs.InitializeCollections ? new List<Tag>() : null;
115116

116117
/// <summary>
@@ -221,6 +222,26 @@ internal bool IsSetKeyCheckValueAlgorithm()
221222
return this._keyCheckValueAlgorithm != null;
222223
}
223224

225+
/// <summary>
226+
/// Gets and sets the property ReplicationRegions.
227+
/// <para />
228+
/// Starting with version 4 of the SDK this property will default to null. If no data for this property is returned
229+
/// from the service the property will also be null. This was changed to improve performance and allow the SDK and caller
230+
/// to distinguish between a property not set or a property being empty to clear out a value. To retain the previous
231+
/// SDK behavior set the AWSConfigs.InitializeCollections static property to true.
232+
/// </summary>
233+
public List<string> ReplicationRegions
234+
{
235+
get { return this._replicationRegions; }
236+
set { this._replicationRegions = value; }
237+
}
238+
239+
// Check to see if ReplicationRegions property is set
240+
internal bool IsSetReplicationRegions()
241+
{
242+
return this._replicationRegions != null && (this._replicationRegions.Count > 0 || !AWSConfigs.InitializeCollections);
243+
}
244+
224245
/// <summary>
225246
/// Gets and sets the property Tags.
226247
/// <para>

0 commit comments

Comments
 (0)