Skip to content

Commit caf674c

Browse files
The DescribeImageScanning API now includes lastInUseAt and InUseCount fields that can be used to prioritize vulnerability remediation for images that are actively being used.
This release 1) adds a new S3DataType Converse for SageMaker training 2)adds C8g R7gd M8g C6in P6 P6e instance type for SageMaker endpoint 3) adds m7i, r7i, c7i instance type for SageMaker Training and Processing. This release of the SDK has the API and documentation for the createcustommodel API. This feature lets you copy a Amazon SageMaker trained Amazon Nova model into Amazon Bedrock for inference. You can now create firewalls using a Transit Gateway instead of a VPC, resulting in a TGW attachment.
1 parent 75d28d5 commit caf674c

File tree

99 files changed

+6642
-1180
lines changed

Some content is hidden

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

99 files changed

+6642
-1180
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.11.588
1+
1.11.589

generated/src/aws-cpp-sdk-bedrock/include/aws/bedrock/BedrockClient.h

Lines changed: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,59 @@ namespace Bedrock
105105
return SubmitAsync(&BedrockClient::BatchDeleteEvaluationJob, request, handler, context);
106106
}
107107

108+
/**
109+
* <p>Creates a new custom model in Amazon Bedrock from an existing SageMaker
110+
* AI-trained Amazon Nova model stored in an Amazon-managed Amazon S3 bucket. After
111+
* the model is active, you can use it for inference.</p> <p>To use the model for
112+
* inference, you must purchase Provisioned Throughput for it. You can't use
113+
* On-demand inference with these custom models. For more information about
114+
* Provisioned Throughput, see <a
115+
* href="https://docs.aws.amazon.com/bedrock/latest/userguide/prov-throughput.html">Provisioned
116+
* Throughput</a>.</p> <p>The model appears in <code>ListCustomModels</code> with a
117+
* <code>customizationType</code> of <code>imported</code>. To track the status of
118+
* the new model, you use the <code>GetCustomModel</code> API operation. The model
119+
* can be in the following states:</p> <ul> <li> <p> <code>Creating</code> -
120+
* Initial state during validation and registration</p> </li> <li> <p>
121+
* <code>Active</code> - Model is ready for use in inference</p> </li> <li> <p>
122+
* <code>Failed</code> - Creation process encountered an error</p> </li> </ul>
123+
* <p>For more information about creating custom models, including specific model
124+
* requirements, see <a
125+
* href="https://docs.aws.amazon.com/bedrock/latest/userguide/create-custom-model-from-existing.html">Import
126+
* a SageMaker AI-trained Amazon Nova model</a> in the Amazon Bedrock User Guide.
127+
* </p> <p>You use the <code>CreateCustomModel</code> API to import only
128+
* SageMaker AI-trained Amazon Nova models. To import open-source models, you use
129+
* the <a
130+
* href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_CreateModelImportJob.html">CreateModelImportJob</a>.
131+
* </p> <p> <b>Related APIs</b> </p> <ul> <li> <p> <a
132+
* href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_GetCustomModel.html">GetCustomModel</a>
133+
* </p> </li> <li> <p> <a
134+
* href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_ListCustomModels.html">ListCustomModels</a>
135+
* </p> </li> <li> <p> <a
136+
* href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_DeleteCustomModel.html">DeleteCustomModel</a>
137+
* </p> </li> </ul><p><h3>See Also:</h3> <a
138+
* href="http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/CreateCustomModel">AWS
139+
* API Reference</a></p>
140+
*/
141+
virtual Model::CreateCustomModelOutcome CreateCustomModel(const Model::CreateCustomModelRequest& request) const;
142+
143+
/**
144+
* A Callable wrapper for CreateCustomModel that returns a future to the operation so that it can be executed in parallel to other requests.
145+
*/
146+
template<typename CreateCustomModelRequestT = Model::CreateCustomModelRequest>
147+
Model::CreateCustomModelOutcomeCallable CreateCustomModelCallable(const CreateCustomModelRequestT& request) const
148+
{
149+
return SubmitCallable(&BedrockClient::CreateCustomModel, request);
150+
}
151+
152+
/**
153+
* An Async wrapper for CreateCustomModel that queues the request into a thread executor and triggers associated callback when operation has finished.
154+
*/
155+
template<typename CreateCustomModelRequestT = Model::CreateCustomModelRequest>
156+
void CreateCustomModelAsync(const CreateCustomModelRequestT& request, const CreateCustomModelResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const
157+
{
158+
return SubmitAsync(&BedrockClient::CreateCustomModel, request, handler, context);
159+
}
160+
108161
/**
109162
* <p>Creates an evaluation job.</p><p><h3>See Also:</h3> <a
110163
* href="http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/CreateEvaluationJob">AWS
@@ -701,7 +754,7 @@ namespace Bedrock
701754

702755
/**
703756
* <p>Get the properties associated with a Amazon Bedrock custom model that you
704-
* have created.For more information, see <a
757+
* have created. For more information, see <a
705758
* href="https://docs.aws.amazon.com/bedrock/latest/userguide/custom-models.html">Custom
706759
* models</a> in the <a
707760
* href="https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html">Amazon

generated/src/aws-cpp-sdk-bedrock/include/aws/bedrock/BedrockServiceClientModel.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
/* Service model headers required in BedrockClient header */
2121
#include <aws/bedrock/model/BatchDeleteEvaluationJobResult.h>
22+
#include <aws/bedrock/model/CreateCustomModelResult.h>
2223
#include <aws/bedrock/model/CreateEvaluationJobResult.h>
2324
#include <aws/bedrock/model/CreateGuardrailResult.h>
2425
#include <aws/bedrock/model/CreateGuardrailVersionResult.h>
@@ -133,6 +134,7 @@ namespace Aws
133134
{
134135
/* Service model forward declarations required in BedrockClient header */
135136
class BatchDeleteEvaluationJobRequest;
137+
class CreateCustomModelRequest;
136138
class CreateEvaluationJobRequest;
137139
class CreateGuardrailRequest;
138140
class CreateGuardrailVersionRequest;
@@ -195,6 +197,7 @@ namespace Aws
195197

196198
/* Service model Outcome class definitions */
197199
typedef Aws::Utils::Outcome<BatchDeleteEvaluationJobResult, BedrockError> BatchDeleteEvaluationJobOutcome;
200+
typedef Aws::Utils::Outcome<CreateCustomModelResult, BedrockError> CreateCustomModelOutcome;
198201
typedef Aws::Utils::Outcome<CreateEvaluationJobResult, BedrockError> CreateEvaluationJobOutcome;
199202
typedef Aws::Utils::Outcome<CreateGuardrailResult, BedrockError> CreateGuardrailOutcome;
200203
typedef Aws::Utils::Outcome<CreateGuardrailVersionResult, BedrockError> CreateGuardrailVersionOutcome;
@@ -257,6 +260,7 @@ namespace Aws
257260

258261
/* Service model Outcome callable definitions */
259262
typedef std::future<BatchDeleteEvaluationJobOutcome> BatchDeleteEvaluationJobOutcomeCallable;
263+
typedef std::future<CreateCustomModelOutcome> CreateCustomModelOutcomeCallable;
260264
typedef std::future<CreateEvaluationJobOutcome> CreateEvaluationJobOutcomeCallable;
261265
typedef std::future<CreateGuardrailOutcome> CreateGuardrailOutcomeCallable;
262266
typedef std::future<CreateGuardrailVersionOutcome> CreateGuardrailVersionOutcomeCallable;
@@ -322,6 +326,7 @@ namespace Aws
322326

323327
/* Service model async handlers definitions */
324328
typedef std::function<void(const BedrockClient*, const Model::BatchDeleteEvaluationJobRequest&, const Model::BatchDeleteEvaluationJobOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > BatchDeleteEvaluationJobResponseReceivedHandler;
329+
typedef std::function<void(const BedrockClient*, const Model::CreateCustomModelRequest&, const Model::CreateCustomModelOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > CreateCustomModelResponseReceivedHandler;
325330
typedef std::function<void(const BedrockClient*, const Model::CreateEvaluationJobRequest&, const Model::CreateEvaluationJobOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > CreateEvaluationJobResponseReceivedHandler;
326331
typedef std::function<void(const BedrockClient*, const Model::CreateGuardrailRequest&, const Model::CreateGuardrailOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > CreateGuardrailResponseReceivedHandler;
327332
typedef std::function<void(const BedrockClient*, const Model::CreateGuardrailVersionRequest&, const Model::CreateGuardrailVersionOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > CreateGuardrailVersionResponseReceivedHandler;
Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
/**
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
* SPDX-License-Identifier: Apache-2.0.
4+
*/
5+
6+
#pragma once
7+
#include <aws/bedrock/Bedrock_EXPORTS.h>
8+
#include <aws/bedrock/BedrockRequest.h>
9+
#include <aws/core/utils/memory/stl/AWSString.h>
10+
#include <aws/bedrock/model/ModelDataSource.h>
11+
#include <aws/core/utils/memory/stl/AWSVector.h>
12+
#include <aws/bedrock/model/Tag.h>
13+
#include <utility>
14+
#include <aws/core/utils/UUID.h>
15+
16+
namespace Aws
17+
{
18+
namespace Bedrock
19+
{
20+
namespace Model
21+
{
22+
23+
/**
24+
*/
25+
class CreateCustomModelRequest : public BedrockRequest
26+
{
27+
public:
28+
AWS_BEDROCK_API CreateCustomModelRequest() = default;
29+
30+
// Service request name is the Operation name which will send this request out,
31+
// each operation should has unique request name, so that we can get operation's name from this request.
32+
// Note: this is not true for response, multiple operations may have the same response name,
33+
// so we can not get operation's name from response.
34+
inline virtual const char* GetServiceRequestName() const override { return "CreateCustomModel"; }
35+
36+
AWS_BEDROCK_API Aws::String SerializePayload() const override;
37+
38+
39+
///@{
40+
/**
41+
* <p>A unique name for the custom model.</p>
42+
*/
43+
inline const Aws::String& GetModelName() const { return m_modelName; }
44+
inline bool ModelNameHasBeenSet() const { return m_modelNameHasBeenSet; }
45+
template<typename ModelNameT = Aws::String>
46+
void SetModelName(ModelNameT&& value) { m_modelNameHasBeenSet = true; m_modelName = std::forward<ModelNameT>(value); }
47+
template<typename ModelNameT = Aws::String>
48+
CreateCustomModelRequest& WithModelName(ModelNameT&& value) { SetModelName(std::forward<ModelNameT>(value)); return *this;}
49+
///@}
50+
51+
///@{
52+
/**
53+
* <p>The data source for the model. The Amazon S3 URI in the model source must be
54+
* for the Amazon-managed Amazon S3 bucket containing your model artifacts.
55+
* SageMaker AI creates this bucket when you run your first SageMaker AI training
56+
* job.</p>
57+
*/
58+
inline const ModelDataSource& GetModelSourceConfig() const { return m_modelSourceConfig; }
59+
inline bool ModelSourceConfigHasBeenSet() const { return m_modelSourceConfigHasBeenSet; }
60+
template<typename ModelSourceConfigT = ModelDataSource>
61+
void SetModelSourceConfig(ModelSourceConfigT&& value) { m_modelSourceConfigHasBeenSet = true; m_modelSourceConfig = std::forward<ModelSourceConfigT>(value); }
62+
template<typename ModelSourceConfigT = ModelDataSource>
63+
CreateCustomModelRequest& WithModelSourceConfig(ModelSourceConfigT&& value) { SetModelSourceConfig(std::forward<ModelSourceConfigT>(value)); return *this;}
64+
///@}
65+
66+
///@{
67+
/**
68+
* <p>The Amazon Resource Name (ARN) of the customer managed KMS key to encrypt the
69+
* custom model. If you don't provide a KMS key, Amazon Bedrock uses an Amazon Web
70+
* Services-managed KMS key to encrypt the model. </p> <p>If you provide a customer
71+
* managed KMS key, your Amazon Bedrock service role must have permissions to use
72+
* it. For more information see <a
73+
* href="https://docs.aws.amazon.com/bedrock/latest/userguide/encryption-import-model.html">Encryption
74+
* of imported models</a>. </p>
75+
*/
76+
inline const Aws::String& GetModelKmsKeyArn() const { return m_modelKmsKeyArn; }
77+
inline bool ModelKmsKeyArnHasBeenSet() const { return m_modelKmsKeyArnHasBeenSet; }
78+
template<typename ModelKmsKeyArnT = Aws::String>
79+
void SetModelKmsKeyArn(ModelKmsKeyArnT&& value) { m_modelKmsKeyArnHasBeenSet = true; m_modelKmsKeyArn = std::forward<ModelKmsKeyArnT>(value); }
80+
template<typename ModelKmsKeyArnT = Aws::String>
81+
CreateCustomModelRequest& WithModelKmsKeyArn(ModelKmsKeyArnT&& value) { SetModelKmsKeyArn(std::forward<ModelKmsKeyArnT>(value)); return *this;}
82+
///@}
83+
84+
///@{
85+
/**
86+
* <p>The Amazon Resource Name (ARN) of an IAM service role that Amazon Bedrock
87+
* assumes to perform tasks on your behalf. This role must have permissions to
88+
* access the Amazon S3 bucket containing your model artifacts and the KMS key (if
89+
* specified). For more information, see <a
90+
* href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-import-iam-role.html">Setting
91+
* up an IAM service role for importing models</a> in the Amazon Bedrock User
92+
* Guide.</p>
93+
*/
94+
inline const Aws::String& GetRoleArn() const { return m_roleArn; }
95+
inline bool RoleArnHasBeenSet() const { return m_roleArnHasBeenSet; }
96+
template<typename RoleArnT = Aws::String>
97+
void SetRoleArn(RoleArnT&& value) { m_roleArnHasBeenSet = true; m_roleArn = std::forward<RoleArnT>(value); }
98+
template<typename RoleArnT = Aws::String>
99+
CreateCustomModelRequest& WithRoleArn(RoleArnT&& value) { SetRoleArn(std::forward<RoleArnT>(value)); return *this;}
100+
///@}
101+
102+
///@{
103+
/**
104+
* <p>A list of key-value pairs to associate with the custom model resource. You
105+
* can use these tags to organize and identify your resources.</p> <p>For more
106+
* information, see <a
107+
* href="https://docs.aws.amazon.com/bedrock/latest/userguide/tagging.html">Tagging
108+
* resources</a> in the <a
109+
* href="https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html">Amazon
110+
* Bedrock User Guide</a>.</p>
111+
*/
112+
inline const Aws::Vector<Tag>& GetModelTags() const { return m_modelTags; }
113+
inline bool ModelTagsHasBeenSet() const { return m_modelTagsHasBeenSet; }
114+
template<typename ModelTagsT = Aws::Vector<Tag>>
115+
void SetModelTags(ModelTagsT&& value) { m_modelTagsHasBeenSet = true; m_modelTags = std::forward<ModelTagsT>(value); }
116+
template<typename ModelTagsT = Aws::Vector<Tag>>
117+
CreateCustomModelRequest& WithModelTags(ModelTagsT&& value) { SetModelTags(std::forward<ModelTagsT>(value)); return *this;}
118+
template<typename ModelTagsT = Tag>
119+
CreateCustomModelRequest& AddModelTags(ModelTagsT&& value) { m_modelTagsHasBeenSet = true; m_modelTags.emplace_back(std::forward<ModelTagsT>(value)); return *this; }
120+
///@}
121+
122+
///@{
123+
/**
124+
* <p>A unique, case-sensitive identifier to ensure that the API request completes
125+
* no more than one time. If this token matches a previous request, Amazon Bedrock
126+
* ignores the request, but does not return an error. For more information, see <a
127+
* href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring
128+
* idempotency</a>.</p>
129+
*/
130+
inline const Aws::String& GetClientRequestToken() const { return m_clientRequestToken; }
131+
inline bool ClientRequestTokenHasBeenSet() const { return m_clientRequestTokenHasBeenSet; }
132+
template<typename ClientRequestTokenT = Aws::String>
133+
void SetClientRequestToken(ClientRequestTokenT&& value) { m_clientRequestTokenHasBeenSet = true; m_clientRequestToken = std::forward<ClientRequestTokenT>(value); }
134+
template<typename ClientRequestTokenT = Aws::String>
135+
CreateCustomModelRequest& WithClientRequestToken(ClientRequestTokenT&& value) { SetClientRequestToken(std::forward<ClientRequestTokenT>(value)); return *this;}
136+
///@}
137+
private:
138+
139+
Aws::String m_modelName;
140+
bool m_modelNameHasBeenSet = false;
141+
142+
ModelDataSource m_modelSourceConfig;
143+
bool m_modelSourceConfigHasBeenSet = false;
144+
145+
Aws::String m_modelKmsKeyArn;
146+
bool m_modelKmsKeyArnHasBeenSet = false;
147+
148+
Aws::String m_roleArn;
149+
bool m_roleArnHasBeenSet = false;
150+
151+
Aws::Vector<Tag> m_modelTags;
152+
bool m_modelTagsHasBeenSet = false;
153+
154+
Aws::String m_clientRequestToken{Aws::Utils::UUID::PseudoRandomUUID()};
155+
bool m_clientRequestTokenHasBeenSet = true;
156+
};
157+
158+
} // namespace Model
159+
} // namespace Bedrock
160+
} // namespace Aws
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
/**
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
* SPDX-License-Identifier: Apache-2.0.
4+
*/
5+
6+
#pragma once
7+
#include <aws/bedrock/Bedrock_EXPORTS.h>
8+
#include <aws/core/utils/memory/stl/AWSString.h>
9+
#include <utility>
10+
11+
namespace Aws
12+
{
13+
template<typename RESULT_TYPE>
14+
class AmazonWebServiceResult;
15+
16+
namespace Utils
17+
{
18+
namespace Json
19+
{
20+
class JsonValue;
21+
} // namespace Json
22+
} // namespace Utils
23+
namespace Bedrock
24+
{
25+
namespace Model
26+
{
27+
class CreateCustomModelResult
28+
{
29+
public:
30+
AWS_BEDROCK_API CreateCustomModelResult() = default;
31+
AWS_BEDROCK_API CreateCustomModelResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
32+
AWS_BEDROCK_API CreateCustomModelResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
33+
34+
35+
///@{
36+
/**
37+
* <p>The Amazon Resource Name (ARN) of the new custom model.</p>
38+
*/
39+
inline const Aws::String& GetModelArn() const { return m_modelArn; }
40+
template<typename ModelArnT = Aws::String>
41+
void SetModelArn(ModelArnT&& value) { m_modelArnHasBeenSet = true; m_modelArn = std::forward<ModelArnT>(value); }
42+
template<typename ModelArnT = Aws::String>
43+
CreateCustomModelResult& WithModelArn(ModelArnT&& value) { SetModelArn(std::forward<ModelArnT>(value)); return *this;}
44+
///@}
45+
46+
///@{
47+
48+
inline const Aws::String& GetRequestId() const { return m_requestId; }
49+
template<typename RequestIdT = Aws::String>
50+
void SetRequestId(RequestIdT&& value) { m_requestIdHasBeenSet = true; m_requestId = std::forward<RequestIdT>(value); }
51+
template<typename RequestIdT = Aws::String>
52+
CreateCustomModelResult& WithRequestId(RequestIdT&& value) { SetRequestId(std::forward<RequestIdT>(value)); return *this;}
53+
///@}
54+
private:
55+
56+
Aws::String m_modelArn;
57+
bool m_modelArnHasBeenSet = false;
58+
59+
Aws::String m_requestId;
60+
bool m_requestIdHasBeenSet = false;
61+
};
62+
63+
} // namespace Model
64+
} // namespace Bedrock
65+
} // namespace Aws

generated/src/aws-cpp-sdk-bedrock/include/aws/bedrock/model/CustomModelSummary.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <aws/core/utils/memory/stl/AWSString.h>
99
#include <aws/core/utils/DateTime.h>
1010
#include <aws/bedrock/model/CustomizationType.h>
11+
#include <aws/bedrock/model/ModelStatus.h>
1112
#include <utility>
1213

1314
namespace Aws
@@ -123,6 +124,20 @@ namespace Model
123124
template<typename OwnerAccountIdT = Aws::String>
124125
CustomModelSummary& WithOwnerAccountId(OwnerAccountIdT&& value) { SetOwnerAccountId(std::forward<OwnerAccountIdT>(value)); return *this;}
125126
///@}
127+
128+
///@{
129+
/**
130+
* <p>The current status of the custom model. Possible values include:</p> <ul>
131+
* <li> <p> <code>Creating</code> - The model is being created and validated.</p>
132+
* </li> <li> <p> <code>Active</code> - The model has been successfully created and
133+
* is ready for use.</p> </li> <li> <p> <code>Failed</code> - The model creation
134+
* process failed.</p> </li> </ul>
135+
*/
136+
inline ModelStatus GetModelStatus() const { return m_modelStatus; }
137+
inline bool ModelStatusHasBeenSet() const { return m_modelStatusHasBeenSet; }
138+
inline void SetModelStatus(ModelStatus value) { m_modelStatusHasBeenSet = true; m_modelStatus = value; }
139+
inline CustomModelSummary& WithModelStatus(ModelStatus value) { SetModelStatus(value); return *this;}
140+
///@}
126141
private:
127142

128143
Aws::String m_modelArn;
@@ -145,6 +160,9 @@ namespace Model
145160

146161
Aws::String m_ownerAccountId;
147162
bool m_ownerAccountIdHasBeenSet = false;
163+
164+
ModelStatus m_modelStatus{ModelStatus::NOT_SET};
165+
bool m_modelStatusHasBeenSet = false;
148166
};
149167

150168
} // namespace Model

generated/src/aws-cpp-sdk-bedrock/include/aws/bedrock/model/CustomizationType.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ namespace Model
1818
NOT_SET,
1919
FINE_TUNING,
2020
CONTINUED_PRE_TRAINING,
21-
DISTILLATION
21+
DISTILLATION,
22+
IMPORTED
2223
};
2324

2425
namespace CustomizationTypeMapper

0 commit comments

Comments
 (0)