Skip to content

Commit

Permalink
Updating note for enabling streams for UpdateTable.
Browse files Browse the repository at this point in the history
This release adds support for Multi-Region Replication with provisioned tables, and Keyspaces auto scaling APIs
  • Loading branch information
aws-sdk-cpp-automation committed Jan 17, 2024
1 parent 3a03b6e commit 9a45f62
Show file tree
Hide file tree
Showing 37 changed files with 3,311 additions and 188 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.11.244
1.11.245
Original file line number Diff line number Diff line change
Expand Up @@ -402,49 +402,49 @@ namespace Model

/**
* <p>Represents the DynamoDB Streams configuration for the table.</p>
* <p>You receive a <code>ResourceInUseException</code> if you try to enable a
* stream on a table that already has a stream, or if you try to disable a stream
* on a table that doesn't have a stream.</p>
* <p>You receive a <code>ValidationException</code> if you try to enable a stream
* on a table that already has a stream, or if you try to disable a stream on a
* table that doesn't have a stream.</p>
*/
inline const StreamSpecification& GetStreamSpecification() const{ return m_streamSpecification; }

/**
* <p>Represents the DynamoDB Streams configuration for the table.</p>
* <p>You receive a <code>ResourceInUseException</code> if you try to enable a
* stream on a table that already has a stream, or if you try to disable a stream
* on a table that doesn't have a stream.</p>
* <p>You receive a <code>ValidationException</code> if you try to enable a stream
* on a table that already has a stream, or if you try to disable a stream on a
* table that doesn't have a stream.</p>
*/
inline bool StreamSpecificationHasBeenSet() const { return m_streamSpecificationHasBeenSet; }

/**
* <p>Represents the DynamoDB Streams configuration for the table.</p>
* <p>You receive a <code>ResourceInUseException</code> if you try to enable a
* stream on a table that already has a stream, or if you try to disable a stream
* on a table that doesn't have a stream.</p>
* <p>You receive a <code>ValidationException</code> if you try to enable a stream
* on a table that already has a stream, or if you try to disable a stream on a
* table that doesn't have a stream.</p>
*/
inline void SetStreamSpecification(const StreamSpecification& value) { m_streamSpecificationHasBeenSet = true; m_streamSpecification = value; }

/**
* <p>Represents the DynamoDB Streams configuration for the table.</p>
* <p>You receive a <code>ResourceInUseException</code> if you try to enable a
* stream on a table that already has a stream, or if you try to disable a stream
* on a table that doesn't have a stream.</p>
* <p>You receive a <code>ValidationException</code> if you try to enable a stream
* on a table that already has a stream, or if you try to disable a stream on a
* table that doesn't have a stream.</p>
*/
inline void SetStreamSpecification(StreamSpecification&& value) { m_streamSpecificationHasBeenSet = true; m_streamSpecification = std::move(value); }

/**
* <p>Represents the DynamoDB Streams configuration for the table.</p>
* <p>You receive a <code>ResourceInUseException</code> if you try to enable a
* stream on a table that already has a stream, or if you try to disable a stream
* on a table that doesn't have a stream.</p>
* <p>You receive a <code>ValidationException</code> if you try to enable a stream
* on a table that already has a stream, or if you try to disable a stream on a
* table that doesn't have a stream.</p>
*/
inline UpdateTableRequest& WithStreamSpecification(const StreamSpecification& value) { SetStreamSpecification(value); return *this;}

/**
* <p>Represents the DynamoDB Streams configuration for the table.</p>
* <p>You receive a <code>ResourceInUseException</code> if you try to enable a
* stream on a table that already has a stream, or if you try to disable a stream
* on a table that doesn't have a stream.</p>
* <p>You receive a <code>ValidationException</code> if you try to enable a stream
* on a table that already has a stream, or if you try to disable a stream on a
* table that doesn't have a stream.</p>
*/
inline UpdateTableRequest& WithStreamSpecification(StreamSpecification&& value) { SetStreamSpecification(std::move(value)); return *this;}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,39 @@ namespace Keyspaces
return SubmitAsync(&KeyspacesClient::GetTable, request, handler, context);
}

/**
* <p>Returns auto scaling related settings of the specified table in JSON format.
* If the table is a multi-Region table, the Amazon Web Services Region specific
* auto scaling settings of the table are included.</p> <p>Amazon Keyspaces auto
* scaling helps you provision throughput capacity for variable workloads
* efficiently by increasing and decreasing your table's read and write capacity
* automatically in response to application traffic. For more information, see <a
* href="https://docs.aws.amazon.com/keyspaces/latest/devguide/autoscaling.html">Managing
* throughput capacity automatically with Amazon Keyspaces auto scaling</a> in the
* <i>Amazon Keyspaces Developer Guide</i>.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/keyspaces-2022-02-10/GetTableAutoScalingSettings">AWS
* API Reference</a></p>
*/
virtual Model::GetTableAutoScalingSettingsOutcome GetTableAutoScalingSettings(const Model::GetTableAutoScalingSettingsRequest& request) const;

/**
* A Callable wrapper for GetTableAutoScalingSettings that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template<typename GetTableAutoScalingSettingsRequestT = Model::GetTableAutoScalingSettingsRequest>
Model::GetTableAutoScalingSettingsOutcomeCallable GetTableAutoScalingSettingsCallable(const GetTableAutoScalingSettingsRequestT& request) const
{
return SubmitCallable(&KeyspacesClient::GetTableAutoScalingSettings, request);
}

/**
* An Async wrapper for GetTableAutoScalingSettings that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template<typename GetTableAutoScalingSettingsRequestT = Model::GetTableAutoScalingSettingsRequest>
void GetTableAutoScalingSettingsAsync(const GetTableAutoScalingSettingsRequestT& request, const GetTableAutoScalingSettingsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const
{
return SubmitAsync(&KeyspacesClient::GetTableAutoScalingSettings, request, handler, context);
}

/**
* <p>Returns a list of keyspaces.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/keyspaces-2022-02-10/ListKeyspaces">AWS
Expand Down Expand Up @@ -357,7 +390,7 @@ namespace Keyspaces
}

/**
* <p>Restores the specified table to the specified point in time within the
* <p>Restores the table to the specified point in time within the
* <code>earliest_restorable_timestamp</code> and the current time. For more
* information about restore points, see <a
* href="https://docs.aws.amazon.com/keyspaces/latest/devguide/PointInTimeRecovery_HowItWorks.html#howitworks_backup_window">
Expand All @@ -368,22 +401,22 @@ namespace Keyspaces
* the state based on the selected timestamp <code>(day:hour:minute:second)</code>
* to a new table. The Time to Live (TTL) settings are also restored to the state
* based on the selected timestamp.</p> <p>In addition to the table's schema, data,
* and TTL settings, <code>RestoreTable</code> restores the capacity mode,
* encryption, and point-in-time recovery settings from the source table. Unlike
* the table's schema data and TTL settings, which are restored based on the
* selected timestamp, these settings are always restored based on the table's
* settings as of the current time or when the table was deleted.</p> <p>You can
* also overwrite these settings during restore:</p> <ul> <li> <p>Read/write
* capacity mode</p> </li> <li> <p>Provisioned throughput capacity settings</p>
* </li> <li> <p>Point-in-time (PITR) settings</p> </li> <li> <p>Tags</p> </li>
* </ul> <p>For more information, see <a
* and TTL settings, <code>RestoreTable</code> restores the capacity mode, auto
* scaling settings, encryption settings, and point-in-time recovery settings from
* the source table. Unlike the table's schema data and TTL settings, which are
* restored based on the selected timestamp, these settings are always restored
* based on the table's settings as of the current time or when the table was
* deleted.</p> <p>You can also overwrite these settings during restore:</p> <ul>
* <li> <p>Read/write capacity mode</p> </li> <li> <p>Provisioned throughput
* capacity units</p> </li> <li> <p>Auto scaling settings</p> </li> <li>
* <p>Point-in-time (PITR) settings</p> </li> <li> <p>Tags</p> </li> </ul> <p>For
* more information, see <a
* href="https://docs.aws.amazon.com/keyspaces/latest/devguide/PointInTimeRecovery_HowItWorks.html#howitworks_backup_settings">PITR
* restore settings</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p> <p>Note
* that the following settings are not restored, and you must configure them
* manually for the new table:</p> <ul> <li> <p>Automatic scaling policies (for
* tables that use provisioned capacity mode)</p> </li> <li> <p>Identity and Access
* Management (IAM) policies</p> </li> <li> <p>Amazon CloudWatch metrics and
* alarms</p> </li> </ul><p><h3>See Also:</h3> <a
* manually for the new table:</p> <ul> <li> <p>Identity and Access Management
* (IAM) policies</p> </li> <li> <p>Amazon CloudWatch metrics and alarms</p> </li>
* </ul><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/keyspaces-2022-02-10/RestoreTable">AWS
* API Reference</a></p>
*/
Expand Down Expand Up @@ -469,8 +502,8 @@ namespace Keyspaces

/**
* <p>Adds new columns to the table or updates one of the table's settings, for
* example capacity mode, encryption, point-in-time recovery, or ttl settings. Note
* that you can only update one specific table setting per update
* example capacity mode, auto scaling, encryption, point-in-time recovery, or ttl
* settings. Note that you can only update one specific table setting per update
* operation.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/keyspaces-2022-02-10/UpdateTable">AWS
* API Reference</a></p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <aws/keyspaces/model/DeleteTableResult.h>
#include <aws/keyspaces/model/GetKeyspaceResult.h>
#include <aws/keyspaces/model/GetTableResult.h>
#include <aws/keyspaces/model/GetTableAutoScalingSettingsResult.h>
#include <aws/keyspaces/model/ListKeyspacesResult.h>
#include <aws/keyspaces/model/ListTablesResult.h>
#include <aws/keyspaces/model/ListTagsForResourceResult.h>
Expand Down Expand Up @@ -77,6 +78,7 @@ namespace Aws
class DeleteTableRequest;
class GetKeyspaceRequest;
class GetTableRequest;
class GetTableAutoScalingSettingsRequest;
class ListKeyspacesRequest;
class ListTablesRequest;
class ListTagsForResourceRequest;
Expand All @@ -93,6 +95,7 @@ namespace Aws
typedef Aws::Utils::Outcome<DeleteTableResult, KeyspacesError> DeleteTableOutcome;
typedef Aws::Utils::Outcome<GetKeyspaceResult, KeyspacesError> GetKeyspaceOutcome;
typedef Aws::Utils::Outcome<GetTableResult, KeyspacesError> GetTableOutcome;
typedef Aws::Utils::Outcome<GetTableAutoScalingSettingsResult, KeyspacesError> GetTableAutoScalingSettingsOutcome;
typedef Aws::Utils::Outcome<ListKeyspacesResult, KeyspacesError> ListKeyspacesOutcome;
typedef Aws::Utils::Outcome<ListTablesResult, KeyspacesError> ListTablesOutcome;
typedef Aws::Utils::Outcome<ListTagsForResourceResult, KeyspacesError> ListTagsForResourceOutcome;
Expand All @@ -109,6 +112,7 @@ namespace Aws
typedef std::future<DeleteTableOutcome> DeleteTableOutcomeCallable;
typedef std::future<GetKeyspaceOutcome> GetKeyspaceOutcomeCallable;
typedef std::future<GetTableOutcome> GetTableOutcomeCallable;
typedef std::future<GetTableAutoScalingSettingsOutcome> GetTableAutoScalingSettingsOutcomeCallable;
typedef std::future<ListKeyspacesOutcome> ListKeyspacesOutcomeCallable;
typedef std::future<ListTablesOutcome> ListTablesOutcomeCallable;
typedef std::future<ListTagsForResourceOutcome> ListTagsForResourceOutcomeCallable;
Expand All @@ -128,6 +132,7 @@ namespace Aws
typedef std::function<void(const KeyspacesClient*, const Model::DeleteTableRequest&, const Model::DeleteTableOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > DeleteTableResponseReceivedHandler;
typedef std::function<void(const KeyspacesClient*, const Model::GetKeyspaceRequest&, const Model::GetKeyspaceOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > GetKeyspaceResponseReceivedHandler;
typedef std::function<void(const KeyspacesClient*, const Model::GetTableRequest&, const Model::GetTableOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > GetTableResponseReceivedHandler;
typedef std::function<void(const KeyspacesClient*, const Model::GetTableAutoScalingSettingsRequest&, const Model::GetTableAutoScalingSettingsOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > GetTableAutoScalingSettingsResponseReceivedHandler;
typedef std::function<void(const KeyspacesClient*, const Model::ListKeyspacesRequest&, const Model::ListKeyspacesOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > ListKeyspacesResponseReceivedHandler;
typedef std::function<void(const KeyspacesClient*, const Model::ListTablesRequest&, const Model::ListTablesOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > ListTablesResponseReceivedHandler;
typedef std::function<void(const KeyspacesClient*, const Model::ListTagsForResourceRequest&, const Model::ListTagsForResourceOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > ListTagsForResourceResponseReceivedHandler;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/

#pragma once
#include <aws/keyspaces/Keyspaces_EXPORTS.h>
#include <aws/keyspaces/model/TargetTrackingScalingPolicyConfiguration.h>
#include <utility>

namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace Keyspaces
{
namespace Model
{

/**
* <p>Amazon Keyspaces supports the <code>target tracking</code> auto scaling
* policy. With this policy, Amazon Keyspaces auto scaling ensures that the table's
* ratio of consumed to provisioned capacity stays at or near the target value that
* you specify. You define the target value as a percentage between 20 and
* 90.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/keyspaces-2022-02-10/AutoScalingPolicy">AWS
* API Reference</a></p>
*/
class AutoScalingPolicy
{
public:
AWS_KEYSPACES_API AutoScalingPolicy();
AWS_KEYSPACES_API AutoScalingPolicy(Aws::Utils::Json::JsonView jsonValue);
AWS_KEYSPACES_API AutoScalingPolicy& operator=(Aws::Utils::Json::JsonView jsonValue);
AWS_KEYSPACES_API Aws::Utils::Json::JsonValue Jsonize() const;


/**
* <p>Auto scaling scales up capacity automatically when traffic exceeds this
* target utilization rate, and then back down when it falls below the target. A
* <code>double</code> between 20 and 90.</p>
*/
inline const TargetTrackingScalingPolicyConfiguration& GetTargetTrackingScalingPolicyConfiguration() const{ return m_targetTrackingScalingPolicyConfiguration; }

/**
* <p>Auto scaling scales up capacity automatically when traffic exceeds this
* target utilization rate, and then back down when it falls below the target. A
* <code>double</code> between 20 and 90.</p>
*/
inline bool TargetTrackingScalingPolicyConfigurationHasBeenSet() const { return m_targetTrackingScalingPolicyConfigurationHasBeenSet; }

/**
* <p>Auto scaling scales up capacity automatically when traffic exceeds this
* target utilization rate, and then back down when it falls below the target. A
* <code>double</code> between 20 and 90.</p>
*/
inline void SetTargetTrackingScalingPolicyConfiguration(const TargetTrackingScalingPolicyConfiguration& value) { m_targetTrackingScalingPolicyConfigurationHasBeenSet = true; m_targetTrackingScalingPolicyConfiguration = value; }

/**
* <p>Auto scaling scales up capacity automatically when traffic exceeds this
* target utilization rate, and then back down when it falls below the target. A
* <code>double</code> between 20 and 90.</p>
*/
inline void SetTargetTrackingScalingPolicyConfiguration(TargetTrackingScalingPolicyConfiguration&& value) { m_targetTrackingScalingPolicyConfigurationHasBeenSet = true; m_targetTrackingScalingPolicyConfiguration = std::move(value); }

/**
* <p>Auto scaling scales up capacity automatically when traffic exceeds this
* target utilization rate, and then back down when it falls below the target. A
* <code>double</code> between 20 and 90.</p>
*/
inline AutoScalingPolicy& WithTargetTrackingScalingPolicyConfiguration(const TargetTrackingScalingPolicyConfiguration& value) { SetTargetTrackingScalingPolicyConfiguration(value); return *this;}

/**
* <p>Auto scaling scales up capacity automatically when traffic exceeds this
* target utilization rate, and then back down when it falls below the target. A
* <code>double</code> between 20 and 90.</p>
*/
inline AutoScalingPolicy& WithTargetTrackingScalingPolicyConfiguration(TargetTrackingScalingPolicyConfiguration&& value) { SetTargetTrackingScalingPolicyConfiguration(std::move(value)); return *this;}

private:

TargetTrackingScalingPolicyConfiguration m_targetTrackingScalingPolicyConfiguration;
bool m_targetTrackingScalingPolicyConfigurationHasBeenSet = false;
};

} // namespace Model
} // namespace Keyspaces
} // namespace Aws
Loading

0 comments on commit 9a45f62

Please sign in to comment.