Skip to content

Commit

Permalink
Added AttributesToGet parameter to Glue GetDatabases, allowing caller…
Browse files Browse the repository at this point in the history
… to limit output to include only the database name.

Added 3 new APIs to support backup sharing: GetResourcePolicy, PutResourcePolicy, and DeleteResourcePolicy. Added BackupArn to the output of the DescribeBackups API. Added support for BackupArn in the CreateCluster API.
Noting that the filter db.sql.db_id isn't available for RDS for SQL Server DB instances.
Added support for Red Hat Enterprise Linux 8 on Amazon WorkSpaces Personal.
This release removes support for enabling or disabling Natural Language Query Processing feature for Amazon OpenSearch Service domains.
Added CCPC_LEVEL_1_OR_HIGHER KeyStorageSecurityStandard and SM2 KeyAlgorithm and SM3WITHSM2 SigningAlgorithm for China regions.
This release provides the support for new allocation strategies i.e. CAPACITY_OPTIMIZED_PRIORITIZED for Spot and PRIORITIZED for On-Demand by taking input of priority value for each instance type for instance fleet clusters.
Support for Flink 1.19 in Managed Service for Apache Flink
This release supports showing PreferredAgentRouting step via DescribeContact API.
  • Loading branch information
aws-sdk-cpp-automation committed Jun 28, 2024
1 parent 359b63c commit 726f667
Show file tree
Hide file tree
Showing 164 changed files with 2,483 additions and 1,559 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.11.358
1.11.359
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ namespace Model
RSA_2048,
RSA_4096,
EC_prime256v1,
EC_secp384r1
EC_secp384r1,
SM2
};

namespace KeyAlgorithmMapper
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ namespace Model
{
NOT_SET,
FIPS_140_2_LEVEL_2_OR_HIGHER,
FIPS_140_2_LEVEL_3_OR_HIGHER
FIPS_140_2_LEVEL_3_OR_HIGHER,
CCPC_LEVEL_1_OR_HIGHER
};

namespace KeyStorageSecurityStandardMapper
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ namespace Model
SHA512WITHECDSA,
SHA256WITHRSA,
SHA384WITHRSA,
SHA512WITHRSA
SHA512WITHRSA,
SM3WITHSM2
};

namespace SigningAlgorithmMapper
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ namespace Aws
static const int RSA_4096_HASH = HashingUtils::HashString("RSA_4096");
static const int EC_prime256v1_HASH = HashingUtils::HashString("EC_prime256v1");
static const int EC_secp384r1_HASH = HashingUtils::HashString("EC_secp384r1");
static const int SM2_HASH = HashingUtils::HashString("SM2");


KeyAlgorithm GetKeyAlgorithmForName(const Aws::String& name)
Expand All @@ -45,6 +46,10 @@ namespace Aws
{
return KeyAlgorithm::EC_secp384r1;
}
else if (hashCode == SM2_HASH)
{
return KeyAlgorithm::SM2;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
Expand All @@ -69,6 +74,8 @@ namespace Aws
return "EC_prime256v1";
case KeyAlgorithm::EC_secp384r1:
return "EC_secp384r1";
case KeyAlgorithm::SM2:
return "SM2";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ namespace Aws

static const int FIPS_140_2_LEVEL_2_OR_HIGHER_HASH = HashingUtils::HashString("FIPS_140_2_LEVEL_2_OR_HIGHER");
static const int FIPS_140_2_LEVEL_3_OR_HIGHER_HASH = HashingUtils::HashString("FIPS_140_2_LEVEL_3_OR_HIGHER");
static const int CCPC_LEVEL_1_OR_HIGHER_HASH = HashingUtils::HashString("CCPC_LEVEL_1_OR_HIGHER");


KeyStorageSecurityStandard GetKeyStorageSecurityStandardForName(const Aws::String& name)
Expand All @@ -35,6 +36,10 @@ namespace Aws
{
return KeyStorageSecurityStandard::FIPS_140_2_LEVEL_3_OR_HIGHER;
}
else if (hashCode == CCPC_LEVEL_1_OR_HIGHER_HASH)
{
return KeyStorageSecurityStandard::CCPC_LEVEL_1_OR_HIGHER;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
Expand All @@ -55,6 +60,8 @@ namespace Aws
return "FIPS_140_2_LEVEL_2_OR_HIGHER";
case KeyStorageSecurityStandard::FIPS_140_2_LEVEL_3_OR_HIGHER:
return "FIPS_140_2_LEVEL_3_OR_HIGHER";
case KeyStorageSecurityStandard::CCPC_LEVEL_1_OR_HIGHER:
return "CCPC_LEVEL_1_OR_HIGHER";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ namespace Aws
static const int SHA256WITHRSA_HASH = HashingUtils::HashString("SHA256WITHRSA");
static const int SHA384WITHRSA_HASH = HashingUtils::HashString("SHA384WITHRSA");
static const int SHA512WITHRSA_HASH = HashingUtils::HashString("SHA512WITHRSA");
static const int SM3WITHSM2_HASH = HashingUtils::HashString("SM3WITHSM2");


SigningAlgorithm GetSigningAlgorithmForName(const Aws::String& name)
Expand Down Expand Up @@ -55,6 +56,10 @@ namespace Aws
{
return SigningAlgorithm::SHA512WITHRSA;
}
else if (hashCode == SM3WITHSM2_HASH)
{
return SigningAlgorithm::SM3WITHSM2;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
Expand Down Expand Up @@ -83,6 +88,8 @@ namespace Aws
return "SHA384WITHRSA";
case SigningAlgorithm::SHA512WITHRSA:
return "SHA512WITHRSA";
case SigningAlgorithm::SM3WITHSM2:
return "SM3WITHSM2";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ namespace Model
class InvokeAgentHandler : public Aws::Utils::Event::EventStreamHandler
{
typedef std::function<void(const InvokeAgentInitialResponse&)> InvokeAgentInitialResponseCallback;
typedef std::function<void(const InvokeAgentInitialResponse&, const Utils::Event::InitialResponseType)> InvokeAgentInitialResponseCallbackEx;
typedef std::function<void(const PayloadPart&)> PayloadPartCallback;
typedef std::function<void(const ReturnControlPayload&)> ReturnControlPayloadCallback;
typedef std::function<void(const TracePart&)> TracePartCallback;
Expand All @@ -44,18 +45,35 @@ namespace Model

AWS_BEDROCKAGENTRUNTIME_API virtual void OnEvent() override;

inline void SetInitialResponseCallback(const InvokeAgentInitialResponseCallback& callback) { m_onInitialResponse = callback; }
///@{
/**
* Sets an initial response callback. This callback gets called on the initial InvokeAgent Operation response.
* This can be either "initial-response" decoded event frame or decoded HTTP headers received on connection.
* This callback may get called more than once (i.e. on connection headers received and then on the initial-response event received).
* @param callback
*/
inline void SetInitialResponseCallbackEx(const InvokeAgentInitialResponseCallbackEx& callback) { m_onInitialResponse = callback; }
/**
* Sets an initial response callback (a legacy one that does not distinguish whether response originates from headers or from the event).
*/
inline void SetInitialResponseCallback(const InvokeAgentInitialResponseCallback& noArgCallback)
{
m_onInitialResponse = [noArgCallback](const InvokeAgentInitialResponse& rs, const Utils::Event::InitialResponseType) { return noArgCallback(rs); };
}
///@}
inline void SetPayloadPartCallback(const PayloadPartCallback& callback) { m_onPayloadPart = callback; }
inline void SetReturnControlPayloadCallback(const ReturnControlPayloadCallback& callback) { m_onReturnControlPayload = callback; }
inline void SetTracePartCallback(const TracePartCallback& callback) { m_onTracePart = callback; }
inline void SetOnErrorCallback(const ErrorCallback& callback) { m_onError = callback; }

inline InvokeAgentInitialResponseCallbackEx& GetInitialResponseCallbackEx() { return m_onInitialResponse; }

private:
AWS_BEDROCKAGENTRUNTIME_API void HandleEventInMessage();
AWS_BEDROCKAGENTRUNTIME_API void HandleErrorInMessage();
AWS_BEDROCKAGENTRUNTIME_API void MarshallError(const Aws::String& errorCode, const Aws::String& errorMessage);

InvokeAgentInitialResponseCallback m_onInitialResponse;
InvokeAgentInitialResponseCallbackEx m_onInitialResponse;
PayloadPartCallback m_onPayloadPart;
ReturnControlPayloadCallback m_onReturnControlPayload;
TracePartCallback m_onTracePart;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#pragma once
#include <aws/bedrock-agent-runtime/BedrockAgentRuntime_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/http/HttpTypes.h>
#include <utility>

namespace Aws
Expand All @@ -29,6 +30,7 @@ namespace Model
AWS_BEDROCKAGENTRUNTIME_API InvokeAgentInitialResponse();
AWS_BEDROCKAGENTRUNTIME_API InvokeAgentInitialResponse(Aws::Utils::Json::JsonView jsonValue);
AWS_BEDROCKAGENTRUNTIME_API InvokeAgentInitialResponse& operator=(Aws::Utils::Json::JsonView jsonValue);
AWS_BEDROCKAGENTRUNTIME_API InvokeAgentInitialResponse(const Http::HeaderValueCollection& responseHeaders);
AWS_BEDROCKAGENTRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const;


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@ namespace Model

InvokeAgentHandler::InvokeAgentHandler() : EventStreamHandler()
{
m_onInitialResponse = [&](const InvokeAgentInitialResponse&)
m_onInitialResponse = [&](const InvokeAgentInitialResponse&, const Utils::Event::InitialResponseType eventType)
{
AWS_LOGSTREAM_TRACE(INVOKEAGENT_HANDLER_CLASS_TAG,
"InvokeAgent initial response received.");
"InvokeAgent initial response received from "
<< (eventType == Utils::Event::InitialResponseType::ON_EVENT ? "event" : "http headers"));
};

m_onPayloadPart = [&](const PayloadPart&)
Expand Down Expand Up @@ -104,18 +105,11 @@ namespace Model
}
switch (InvokeAgentEventMapper::GetInvokeAgentEventTypeForName(eventTypeHeaderIter->second.GetEventHeaderValueAsString()))
{

case InvokeAgentEventType::INITIAL_RESPONSE:
{
JsonValue json(GetEventPayloadAsString());
if (!json.WasParseSuccessful())
{
AWS_LOGSTREAM_WARN(INVOKEAGENT_HANDLER_CLASS_TAG, "Unable to generate a proper InvokeAgentInitialResponse object from the response in JSON format.");
break;
}

InvokeAgentInitialResponse event(json.View());
m_onInitialResponse(event);
case InvokeAgentEventType::INITIAL_RESPONSE:
{
InvokeAgentInitialResponse event(GetEventHeadersAsHttpHeaders());
m_onInitialResponse(event, Utils::Event::InitialResponseType::ON_EVENT);
break;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

#include <aws/bedrock-agent-runtime/model/InvokeAgentInitialResponse.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>

#include <utility>
Expand Down Expand Up @@ -37,6 +39,22 @@ InvokeAgentInitialResponse& InvokeAgentInitialResponse::operator =(JsonView json
return *this;
}

InvokeAgentInitialResponse::InvokeAgentInitialResponse(const Http::HeaderValueCollection& headers) : InvokeAgentInitialResponse()
{
const auto& sessionIdIter = headers.find("x-amz-bedrock-agent-session-id");
if(sessionIdIter != headers.end())
{
m_sessionId = sessionIdIter->second;
}

const auto& contentTypeIter = headers.find("x-amzn-bedrock-agent-content-type");
if(contentTypeIter != headers.end())
{
m_contentType = contentTypeIter->second;
}

}

JsonValue InvokeAgentInitialResponse::Jsonize() const
{
JsonValue payload;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ namespace Model
class ConverseStreamHandler : public Aws::Utils::Event::EventStreamHandler
{
typedef std::function<void(const ConverseStreamInitialResponse&)> ConverseStreamInitialResponseCallback;
typedef std::function<void(const ConverseStreamInitialResponse&, const Utils::Event::InitialResponseType)> ConverseStreamInitialResponseCallbackEx;
typedef std::function<void(const MessageStartEvent&)> MessageStartEventCallback;
typedef std::function<void(const ContentBlockStartEvent&)> ContentBlockStartEventCallback;
typedef std::function<void(const ContentBlockDeltaEvent&)> ContentBlockDeltaEventCallback;
Expand All @@ -53,7 +54,22 @@ namespace Model

AWS_BEDROCKRUNTIME_API virtual void OnEvent() override;

inline void SetInitialResponseCallback(const ConverseStreamInitialResponseCallback& callback) { m_onInitialResponse = callback; }
///@{
/**
* Sets an initial response callback. This callback gets called on the initial ConverseStream Operation response.
* This can be either "initial-response" decoded event frame or decoded HTTP headers received on connection.
* This callback may get called more than once (i.e. on connection headers received and then on the initial-response event received).
* @param callback
*/
inline void SetInitialResponseCallbackEx(const ConverseStreamInitialResponseCallbackEx& callback) { m_onInitialResponse = callback; }
/**
* Sets an initial response callback (a legacy one that does not distinguish whether response originates from headers or from the event).
*/
inline void SetInitialResponseCallback(const ConverseStreamInitialResponseCallback& noArgCallback)
{
m_onInitialResponse = [noArgCallback](const ConverseStreamInitialResponse& rs, const Utils::Event::InitialResponseType) { return noArgCallback(rs); };
}
///@}
inline void SetMessageStartEventCallback(const MessageStartEventCallback& callback) { m_onMessageStartEvent = callback; }
inline void SetContentBlockStartEventCallback(const ContentBlockStartEventCallback& callback) { m_onContentBlockStartEvent = callback; }
inline void SetContentBlockDeltaEventCallback(const ContentBlockDeltaEventCallback& callback) { m_onContentBlockDeltaEvent = callback; }
Expand All @@ -62,12 +78,14 @@ namespace Model
inline void SetConverseStreamMetadataEventCallback(const ConverseStreamMetadataEventCallback& callback) { m_onConverseStreamMetadataEvent = callback; }
inline void SetOnErrorCallback(const ErrorCallback& callback) { m_onError = callback; }

inline ConverseStreamInitialResponseCallbackEx& GetInitialResponseCallbackEx() { return m_onInitialResponse; }

private:
AWS_BEDROCKRUNTIME_API void HandleEventInMessage();
AWS_BEDROCKRUNTIME_API void HandleErrorInMessage();
AWS_BEDROCKRUNTIME_API void MarshallError(const Aws::String& errorCode, const Aws::String& errorMessage);

ConverseStreamInitialResponseCallback m_onInitialResponse;
ConverseStreamInitialResponseCallbackEx m_onInitialResponse;
MessageStartEventCallback m_onMessageStartEvent;
ContentBlockStartEventCallback m_onContentBlockStartEvent;
ContentBlockDeltaEventCallback m_onContentBlockDeltaEvent;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

#pragma once
#include <aws/bedrock-runtime/BedrockRuntime_EXPORTS.h>
#include <aws/core/http/HttpTypes.h>

namespace Aws
{
Expand All @@ -27,6 +28,7 @@ namespace Model
AWS_BEDROCKRUNTIME_API ConverseStreamInitialResponse();
AWS_BEDROCKRUNTIME_API ConverseStreamInitialResponse(Aws::Utils::Json::JsonView jsonValue);
AWS_BEDROCKRUNTIME_API ConverseStreamInitialResponse& operator=(Aws::Utils::Json::JsonView jsonValue);
AWS_BEDROCKRUNTIME_API ConverseStreamInitialResponse(const Http::HeaderValueCollection& responseHeaders);
AWS_BEDROCKRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const;

};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ namespace Model
class InvokeModelWithResponseStreamHandler : public Aws::Utils::Event::EventStreamHandler
{
typedef std::function<void(const InvokeModelWithResponseStreamInitialResponse&)> InvokeModelWithResponseStreamInitialResponseCallback;
typedef std::function<void(const InvokeModelWithResponseStreamInitialResponse&, const Utils::Event::InitialResponseType)> InvokeModelWithResponseStreamInitialResponseCallbackEx;
typedef std::function<void(const PayloadPart&)> PayloadPartCallback;
typedef std::function<void(const Aws::Client::AWSError<BedrockRuntimeErrors>& error)> ErrorCallback;

Expand All @@ -38,16 +39,33 @@ namespace Model

AWS_BEDROCKRUNTIME_API virtual void OnEvent() override;

inline void SetInitialResponseCallback(const InvokeModelWithResponseStreamInitialResponseCallback& callback) { m_onInitialResponse = callback; }
///@{
/**
* Sets an initial response callback. This callback gets called on the initial InvokeModelWithResponseStream Operation response.
* This can be either "initial-response" decoded event frame or decoded HTTP headers received on connection.
* This callback may get called more than once (i.e. on connection headers received and then on the initial-response event received).
* @param callback
*/
inline void SetInitialResponseCallbackEx(const InvokeModelWithResponseStreamInitialResponseCallbackEx& callback) { m_onInitialResponse = callback; }
/**
* Sets an initial response callback (a legacy one that does not distinguish whether response originates from headers or from the event).
*/
inline void SetInitialResponseCallback(const InvokeModelWithResponseStreamInitialResponseCallback& noArgCallback)
{
m_onInitialResponse = [noArgCallback](const InvokeModelWithResponseStreamInitialResponse& rs, const Utils::Event::InitialResponseType) { return noArgCallback(rs); };
}
///@}
inline void SetPayloadPartCallback(const PayloadPartCallback& callback) { m_onPayloadPart = callback; }
inline void SetOnErrorCallback(const ErrorCallback& callback) { m_onError = callback; }

inline InvokeModelWithResponseStreamInitialResponseCallbackEx& GetInitialResponseCallbackEx() { return m_onInitialResponse; }

private:
AWS_BEDROCKRUNTIME_API void HandleEventInMessage();
AWS_BEDROCKRUNTIME_API void HandleErrorInMessage();
AWS_BEDROCKRUNTIME_API void MarshallError(const Aws::String& errorCode, const Aws::String& errorMessage);

InvokeModelWithResponseStreamInitialResponseCallback m_onInitialResponse;
InvokeModelWithResponseStreamInitialResponseCallbackEx m_onInitialResponse;
PayloadPartCallback m_onPayloadPart;
ErrorCallback m_onError;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#pragma once
#include <aws/bedrock-runtime/BedrockRuntime_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/http/HttpTypes.h>
#include <utility>

namespace Aws
Expand All @@ -29,6 +30,7 @@ namespace Model
AWS_BEDROCKRUNTIME_API InvokeModelWithResponseStreamInitialResponse();
AWS_BEDROCKRUNTIME_API InvokeModelWithResponseStreamInitialResponse(Aws::Utils::Json::JsonView jsonValue);
AWS_BEDROCKRUNTIME_API InvokeModelWithResponseStreamInitialResponse& operator=(Aws::Utils::Json::JsonView jsonValue);
AWS_BEDROCKRUNTIME_API InvokeModelWithResponseStreamInitialResponse(const Http::HeaderValueCollection& responseHeaders);
AWS_BEDROCKRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const;


Expand Down
Loading

0 comments on commit 726f667

Please sign in to comment.