Skip to content

Commit

Permalink
This release makes Amazon DynamoDB point-in-time-recovery (PITR) to b…
Browse files Browse the repository at this point in the history
…e configurable. You can set PITR recovery period for each table individually to between 1 and 35 days.
  • Loading branch information
aws-sdk-dotnet-automation committed Jan 7, 2025
1 parent 51a7f51 commit 11509b0
Show file tree
Hide file tree
Showing 20 changed files with 170 additions and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,9 @@
"properties": {
"authSchemes": [
{
"signingRegion": "us-east-1",
"name": "sigv4",
"signingName": "dynamodb",
"name": "sigv4"
"signingRegion": "us-east-1"
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2974,6 +2974,7 @@
"type":"structure",
"members":{
"PointInTimeRecoveryStatus":{"shape":"PointInTimeRecoveryStatus"},
"RecoveryPeriodInDays":{"shape":"RecoveryPeriodInDays"},
"EarliestRestorableDateTime":{"shape":"Date"},
"LatestRestorableDateTime":{"shape":"Date"}
}
Expand All @@ -2982,7 +2983,8 @@
"type":"structure",
"required":["PointInTimeRecoveryEnabled"],
"members":{
"PointInTimeRecoveryEnabled":{"shape":"BooleanObject"}
"PointInTimeRecoveryEnabled":{"shape":"BooleanObject"},
"RecoveryPeriodInDays":{"shape":"RecoveryPeriodInDays"}
}
},
"PointInTimeRecoveryStatus":{
Expand Down Expand Up @@ -3185,6 +3187,11 @@
"ConsumedCapacity":{"shape":"ConsumedCapacity"}
}
},
"RecoveryPeriodInDays":{
"type":"integer",
"max":35,
"min":1
},
"RegionName":{"type":"string"},
"Replica":{
"type":"structure",
Expand Down
13 changes: 10 additions & 3 deletions generator/ServiceModels/dynamodb/dynamodb-2012-08-10.docs.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,9 @@
"properties": {
"authSchemes": [
{
"signingRegion": "us-east-1",
"name": "sigv4",
"signingName": "dynamodb",
"name": "sigv4"
"signingRegion": "us-east-1"
}
]
},
Expand Down
19 changes: 16 additions & 3 deletions generator/ServiceModels/dynamodb/dynamodb-2012-08-10.normal.json
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@
{"shape":"TableNotFoundException"},
{"shape":"InternalServerError"}
],
"documentation":"<p>Checks the status of continuous backups and point in time recovery on the specified table. Continuous backups are <code>ENABLED</code> on all tables at table creation. If point in time recovery is enabled, <code>PointInTimeRecoveryStatus</code> will be set to ENABLED.</p> <p> After continuous backups and point in time recovery are enabled, you can restore to any point in time within <code>EarliestRestorableDateTime</code> and <code>LatestRestorableDateTime</code>. </p> <p> <code>LatestRestorableDateTime</code> is typically 5 minutes before the current time. You can restore your table to any point in time during the last 35 days. </p> <p>You can call <code>DescribeContinuousBackups</code> at a maximum rate of 10 times per second.</p>",
"documentation":"<p>Checks the status of continuous backups and point in time recovery on the specified table. Continuous backups are <code>ENABLED</code> on all tables at table creation. If point in time recovery is enabled, <code>PointInTimeRecoveryStatus</code> will be set to ENABLED.</p> <p> After continuous backups and point in time recovery are enabled, you can restore to any point in time within <code>EarliestRestorableDateTime</code> and <code>LatestRestorableDateTime</code>. </p> <p> <code>LatestRestorableDateTime</code> is typically 5 minutes before the current time. You can restore your table to any point in time in the last 35 days. You can set the recovery period to any value between 1 and 35 days. </p> <p>You can call <code>DescribeContinuousBackups</code> at a maximum rate of 10 times per second.</p>",
"endpointdiscovery":{
}
},
Expand Down Expand Up @@ -733,7 +733,7 @@
{"shape":"PointInTimeRecoveryUnavailableException"},
{"shape":"InternalServerError"}
],
"documentation":"<p>Restores the specified table to the specified point in time within <code>EarliestRestorableDateTime</code> and <code>LatestRestorableDateTime</code>. You can restore your table to any point in time during the last 35 days. Any number of users can execute up to 50 concurrent restores (any type of restore) in a given account. </p> <p>When you restore using point in time recovery, DynamoDB restores your table data to the state based on the selected date and time (day:hour:minute:second) to a new table. </p> <p>Along with data, the following are also included on the new restored table using point in time recovery: </p> <ul> <li> <p>Global secondary indexes (GSIs)</p> </li> <li> <p>Local secondary indexes (LSIs)</p> </li> <li> <p>Provisioned read and write capacity</p> </li> <li> <p>Encryption settings</p> <important> <p> All these settings come from the current settings of the source table at the time of restore. </p> </important> </li> </ul> <p>You must manually set up the following on the restored table:</p> <ul> <li> <p>Auto scaling policies</p> </li> <li> <p>IAM policies</p> </li> <li> <p>Amazon CloudWatch metrics and alarms</p> </li> <li> <p>Tags</p> </li> <li> <p>Stream settings</p> </li> <li> <p>Time to Live (TTL) settings</p> </li> <li> <p>Point in time recovery settings</p> </li> </ul>",
"documentation":"<p>Restores the specified table to the specified point in time within <code>EarliestRestorableDateTime</code> and <code>LatestRestorableDateTime</code>. You can restore your table to any point in time in the last 35 days. You can set the recovery period to any value between 1 and 35 days. Any number of users can execute up to 50 concurrent restores (any type of restore) in a given account. </p> <p>When you restore using point in time recovery, DynamoDB restores your table data to the state based on the selected date and time (day:hour:minute:second) to a new table. </p> <p>Along with data, the following are also included on the new restored table using point in time recovery: </p> <ul> <li> <p>Global secondary indexes (GSIs)</p> </li> <li> <p>Local secondary indexes (LSIs)</p> </li> <li> <p>Provisioned read and write capacity</p> </li> <li> <p>Encryption settings</p> <important> <p> All these settings come from the current settings of the source table at the time of restore. </p> </important> </li> </ul> <p>You must manually set up the following on the restored table:</p> <ul> <li> <p>Auto scaling policies</p> </li> <li> <p>IAM policies</p> </li> <li> <p>Amazon CloudWatch metrics and alarms</p> </li> <li> <p>Tags</p> </li> <li> <p>Stream settings</p> </li> <li> <p>Time to Live (TTL) settings</p> </li> <li> <p>Point in time recovery settings</p> </li> </ul>",
"endpointdiscovery":{
}
},
Expand Down Expand Up @@ -842,7 +842,7 @@
{"shape":"ContinuousBackupsUnavailableException"},
{"shape":"InternalServerError"}
],
"documentation":"<p> <code>UpdateContinuousBackups</code> enables or disables point in time recovery for the specified table. A successful <code>UpdateContinuousBackups</code> call returns the current <code>ContinuousBackupsDescription</code>. Continuous backups are <code>ENABLED</code> on all tables at table creation. If point in time recovery is enabled, <code>PointInTimeRecoveryStatus</code> will be set to ENABLED.</p> <p> Once continuous backups and point in time recovery are enabled, you can restore to any point in time within <code>EarliestRestorableDateTime</code> and <code>LatestRestorableDateTime</code>. </p> <p> <code>LatestRestorableDateTime</code> is typically 5 minutes before the current time. You can restore your table to any point in time during the last 35 days. </p>",
"documentation":"<p> <code>UpdateContinuousBackups</code> enables or disables point in time recovery for the specified table. A successful <code>UpdateContinuousBackups</code> call returns the current <code>ContinuousBackupsDescription</code>. Continuous backups are <code>ENABLED</code> on all tables at table creation. If point in time recovery is enabled, <code>PointInTimeRecoveryStatus</code> will be set to ENABLED.</p> <p> Once continuous backups and point in time recovery are enabled, you can restore to any point in time within <code>EarliestRestorableDateTime</code> and <code>LatestRestorableDateTime</code>. </p> <p> <code>LatestRestorableDateTime</code> is typically 5 minutes before the current time. You can restore your table to any point in time in the last 35 days. You can set the recovery period to any value between 1 and 35 days.</p>",
"endpointdiscovery":{
}
},
Expand Down Expand Up @@ -4451,6 +4451,10 @@
"shape":"PointInTimeRecoveryStatus",
"documentation":"<p>The current state of point in time recovery:</p> <ul> <li> <p> <code>ENABLED</code> - Point in time recovery is enabled.</p> </li> <li> <p> <code>DISABLED</code> - Point in time recovery is disabled.</p> </li> </ul>"
},
"RecoveryPeriodInDays":{
"shape":"RecoveryPeriodInDays",
"documentation":"<p>The number of preceding days for which continuous backups are taken and maintained. Your table data is only recoverable to any point-in-time from within the configured recovery period. This parameter is optional. If no value is provided, the value will default to 35.</p>"
},
"EarliestRestorableDateTime":{
"shape":"Date",
"documentation":"<p>Specifies the earliest point in time you can restore your table to. You can restore your table to any point in time during the last 35 days. </p>"
Expand All @@ -4469,6 +4473,10 @@
"PointInTimeRecoveryEnabled":{
"shape":"BooleanObject",
"documentation":"<p>Indicates whether point in time recovery is enabled (true) or disabled (false) on the table.</p>"
},
"RecoveryPeriodInDays":{
"shape":"RecoveryPeriodInDays",
"documentation":"<p>The number of preceding days for which continuous backups are taken and maintained. Your table data is only recoverable to any point-in-time from within the configured recovery period. This parameter is optional. If no value is provided, the value will default to 35.</p>"
}
},
"documentation":"<p>Represents the settings used to enable point in time recovery.</p>"
Expand Down Expand Up @@ -4857,6 +4865,11 @@
},
"documentation":"<p>Represents the output of a <code>Query</code> operation.</p>"
},
"RecoveryPeriodInDays":{
"type":"integer",
"max":35,
"min":1
},
"RegionName":{"type":"string"},
"Replica":{
"type":"structure",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -893,6 +893,16 @@
<min>1</min>
<max>8192</max>
</property-value-rule>
<property-value-rule>
<property>Amazon.DynamoDBv2.Model.PointInTimeRecoveryDescription.RecoveryPeriodInDays</property>
<min>1</min>
<max>35</max>
</property-value-rule>
<property-value-rule>
<property>Amazon.DynamoDBv2.Model.PointInTimeRecoverySpecification.RecoveryPeriodInDays</property>
<min>1</min>
<max>35</max>
</property-value-rule>
<property-value-rule>
<property>Amazon.DynamoDBv2.Model.ProvisionedThroughput.ReadCapacityUnits</property>
<min>1</min>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public Endpoint ResolveEndpoint(EndpointParameters parameters)
{
throw new AmazonClientException("Invalid Configuration: Dualstack and local endpoint are not supported");
}
return new Endpoint("http://localhost:8000", InterpolateJson(@"{""authSchemes"":[{""signingRegion"":""us-east-1"",""signingName"":""dynamodb"",""name"":""sigv4""}]}", refs), InterpolateJson(@"", refs));
return new Endpoint("http://localhost:8000", InterpolateJson(@"{""authSchemes"":[{""name"":""sigv4"",""signingName"":""dynamodb"",""signingRegion"":""us-east-1""}]}", refs), InterpolateJson(@"", refs));
}
if (IsSet(refs["AccountIdEndpointMode"]) && Equals(refs["AccountIdEndpointMode"], "required") && !IsSet(refs["AccountId"]))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ namespace Amazon.DynamoDBv2.Model
///
/// <para>
/// <c>LatestRestorableDateTime</c> is typically 5 minutes before the current time. You
/// can restore your table to any point in time during the last 35 days.
/// can restore your table to any point in time in the last 35 days. You can set the recovery
/// period to any value between 1 and 35 days.
/// </para>
///
/// <para>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ public PointInTimeRecoveryDescription Unmarshall(JsonUnmarshallerContext context
unmarshalledObject.PointInTimeRecoveryStatus = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("RecoveryPeriodInDays", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.RecoveryPeriodInDays = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ public void Marshall(PointInTimeRecoverySpecification requestObject, JsonMarshal
context.Writer.Write(requestObject.PointInTimeRecoveryEnabled);
}

if(requestObject.IsSetRecoveryPeriodInDays())
{
context.Writer.WritePropertyName("RecoveryPeriodInDays");
context.Writer.Write(requestObject.RecoveryPeriodInDays);
}

}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public partial class PointInTimeRecoveryDescription
private DateTime? _earliestRestorableDateTime;
private DateTime? _latestRestorableDateTime;
private PointInTimeRecoveryStatus _pointInTimeRecoveryStatus;
private int? _recoveryPeriodInDays;

/// <summary>
/// Gets and sets the property EarliestRestorableDateTime.
Expand Down Expand Up @@ -102,5 +103,27 @@ internal bool IsSetPointInTimeRecoveryStatus()
return this._pointInTimeRecoveryStatus != null;
}

/// <summary>
/// Gets and sets the property RecoveryPeriodInDays.
/// <para>
/// The number of preceding days for which continuous backups are taken and maintained.
/// Your table data is only recoverable to any point-in-time from within the configured
/// recovery period. This parameter is optional. If no value is provided, the value will
/// default to 35.
/// </para>
/// </summary>
[AWSProperty(Min=1, Max=35)]
public int RecoveryPeriodInDays
{
get { return this._recoveryPeriodInDays.GetValueOrDefault(); }
set { this._recoveryPeriodInDays = value; }
}

// Check to see if RecoveryPeriodInDays property is set
internal bool IsSetRecoveryPeriodInDays()
{
return this._recoveryPeriodInDays.HasValue;
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ namespace Amazon.DynamoDBv2.Model
public partial class PointInTimeRecoverySpecification
{
private bool? _pointInTimeRecoveryEnabled;
private int? _recoveryPeriodInDays;

/// <summary>
/// Gets and sets the property PointInTimeRecoveryEnabled.
Expand All @@ -56,5 +57,27 @@ internal bool IsSetPointInTimeRecoveryEnabled()
return this._pointInTimeRecoveryEnabled.HasValue;
}

/// <summary>
/// Gets and sets the property RecoveryPeriodInDays.
/// <para>
/// The number of preceding days for which continuous backups are taken and maintained.
/// Your table data is only recoverable to any point-in-time from within the configured
/// recovery period. This parameter is optional. If no value is provided, the value will
/// default to 35.
/// </para>
/// </summary>
[AWSProperty(Min=1, Max=35)]
public int RecoveryPeriodInDays
{
get { return this._recoveryPeriodInDays.GetValueOrDefault(); }
set { this._recoveryPeriodInDays = value; }
}

// Check to see if RecoveryPeriodInDays property is set
internal bool IsSetRecoveryPeriodInDays()
{
return this._recoveryPeriodInDays.HasValue;
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ namespace Amazon.DynamoDBv2.Model
/// Container for the parameters to the RestoreTableToPointInTime operation.
/// Restores the specified table to the specified point in time within <c>EarliestRestorableDateTime</c>
/// and <c>LatestRestorableDateTime</c>. You can restore your table to any point in time
/// during the last 35 days. Any number of users can execute up to 50 concurrent restores
/// (any type of restore) in a given account.
/// in the last 35 days. You can set the recovery period to any value between 1 and 35
/// days. Any number of users can execute up to 50 concurrent restores (any type of restore)
/// in a given account.
///
///
/// <para>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ namespace Amazon.DynamoDBv2.Model
///
/// <para>
/// <c>LatestRestorableDateTime</c> is typically 5 minutes before the current time. You
/// can restore your table to any point in time during the last 35 days.
/// can restore your table to any point in time in the last 35 days. You can set the recovery
/// period to any value between 1 and 35 days.
/// </para>
/// </summary>
public partial class UpdateContinuousBackupsRequest : AmazonDynamoDBRequest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2534,7 +2534,8 @@ public virtual DescribeBackupResponse EndDescribeBackup(IAsyncResult asyncResult
///
/// <para>
/// <c>LatestRestorableDateTime</c> is typically 5 minutes before the current time. You
/// can restore your table to any point in time during the last 35 days.
/// can restore your table to any point in time in the last 35 days. You can set the recovery
/// period to any value between 1 and 35 days.
/// </para>
///
/// <para>
Expand Down Expand Up @@ -6139,8 +6140,9 @@ public virtual RestoreTableFromBackupResponse EndRestoreTableFromBackup(IAsyncRe
/// <summary>
/// Restores the specified table to the specified point in time within <c>EarliestRestorableDateTime</c>
/// and <c>LatestRestorableDateTime</c>. You can restore your table to any point in time
/// during the last 35 days. Any number of users can execute up to 50 concurrent restores
/// (any type of restore) in a given account.
/// in the last 35 days. You can set the recovery period to any value between 1 and 35
/// days. Any number of users can execute up to 50 concurrent restores (any type of restore)
/// in a given account.
///
///
/// <para>
Expand Down Expand Up @@ -7846,7 +7848,8 @@ public virtual UntagResourceResponse EndUntagResource(IAsyncResult asyncResult)
///
/// <para>
/// <c>LatestRestorableDateTime</c> is typically 5 minutes before the current time. You
/// can restore your table to any point in time during the last 35 days.
/// can restore your table to any point in time in the last 35 days. You can set the recovery
/// period to any value between 1 and 35 days.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the UpdateContinuousBackups service method.</param>
Expand Down
Loading

0 comments on commit 11509b0

Please sign in to comment.