Skip to content

Commit

Permalink
feat(client-sagemaker): This release adds support for C7g, C6g, C6gd,…
Browse files Browse the repository at this point in the history
… C6gn, M6g, M6gd, R6g, and R6gn Graviton instance types in Amazon SageMaker Inference.
  • Loading branch information
awstools committed Oct 17, 2022
1 parent e37a76d commit 92e9095
Show file tree
Hide file tree
Showing 276 changed files with 6,201 additions and 264 deletions.
1 change: 1 addition & 0 deletions clients/client-sagemaker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"@aws-sdk/hash-node": "*",
"@aws-sdk/invalid-dependency": "*",
"@aws-sdk/middleware-content-length": "*",
"@aws-sdk/middleware-endpoint": "*",
"@aws-sdk/middleware-host-header": "*",
"@aws-sdk/middleware-logger": "*",
"@aws-sdk/middleware-recursion-detection": "*",
Expand Down
22 changes: 16 additions & 6 deletions clients/client-sagemaker/src/SageMaker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2303,6 +2303,16 @@ export class SageMaker extends SageMakerClient {
* and values for hyperparameters within ranges that you specify. It then chooses the
* hyperparameter values that result in a model that performs the best, as measured by an
* objective metric that you choose.</p>
* <p>A hyperparameter tuning job automatically creates Amazon SageMaker experiments, trials, and
* trial components for each training job that it runs. You can view these entities in
* Amazon SageMaker Studio. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/experiments-view-compare.html#experiments-view">View
* Experiments, Trials, and Trial Components</a>.</p>
* <important>
* <p>Do not include any security-sensitive information including account access
* IDs, secrets or tokens in any hyperparameter field. If the use of
* security-sensitive credentials are detected, SageMaker will reject your training
* job request and return an exception error.</p>
* </important>
*/
public createHyperParameterTuningJob(
args: CreateHyperParameterTuningJobCommandInput,
Expand Down Expand Up @@ -3120,11 +3130,10 @@ export class SageMaker extends SageMakerClient {
* be tuned to optimize this learning process. For a list of hyperparameters for
* each training algorithm provided by SageMaker, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/algos.html">Algorithms</a>. </p>
* <important>
* <p>You must not include any security-sensitive information, such as account
* access IDs, secrets, and tokens, in the dictionary for configuring
* hyperparameters. SageMaker rejects the training job request and returns an
* exception error for detected credentials, if such user input is
* found.</p>
* <p>Do not include any security-sensitive information including account access
* IDs, secrets or tokens in any hyperparameter field. If the use of
* security-sensitive credentials are detected, SageMaker will reject your training
* job request and return an exception error.</p>
* </important>
* </li>
* <li>
Expand Down Expand Up @@ -10233,7 +10242,8 @@ export class SageMaker extends SageMakerClient {
}

/**
* <p>Update a model training job to request a new Debugger profiling configuration or to change warm pool retention length.</p>
* <p>Update a model training job to request a new Debugger profiling configuration or to
* change warm pool retention length.</p>
*/
public updateTrainingJob(
args: UpdateTrainingJobCommandInput,
Expand Down
51 changes: 24 additions & 27 deletions clients/client-sagemaker/src/SageMakerClient.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
// smithy-typescript generated code
import {
EndpointsInputConfig,
EndpointsResolvedConfig,
RegionInputConfig,
RegionResolvedConfig,
resolveEndpointsConfig,
resolveRegionConfig,
} from "@aws-sdk/config-resolver";
import { RegionInputConfig, RegionResolvedConfig, resolveRegionConfig } from "@aws-sdk/config-resolver";
import { getContentLengthPlugin } from "@aws-sdk/middleware-content-length";
import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@aws-sdk/middleware-endpoint";
import {
getHostHeaderPlugin,
HostHeaderInputConfig,
Expand Down Expand Up @@ -41,13 +35,13 @@ import {
Credentials as __Credentials,
Decoder as __Decoder,
Encoder as __Encoder,
EndpointV2 as __EndpointV2,
Hash as __Hash,
HashConstructor as __HashConstructor,
HttpHandlerOptions as __HttpHandlerOptions,
Logger as __Logger,
Provider as __Provider,
Provider,
RegionInfoProvider,
StreamCollector as __StreamCollector,
UrlParser as __UrlParser,
UserAgent as __UserAgent,
Expand Down Expand Up @@ -721,6 +715,12 @@ import {
import { UpdateUserProfileCommandInput, UpdateUserProfileCommandOutput } from "./commands/UpdateUserProfileCommand";
import { UpdateWorkforceCommandInput, UpdateWorkforceCommandOutput } from "./commands/UpdateWorkforceCommand";
import { UpdateWorkteamCommandInput, UpdateWorkteamCommandOutput } from "./commands/UpdateWorkteamCommand";
import {
ClientInputEndpointParameters,
ClientResolvedEndpointParameters,
EndpointParameters,
resolveClientEndpointParameters,
} from "./endpoint/EndpointParameters";
import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";

export type ServiceInputTypes =
Expand Down Expand Up @@ -1362,12 +1362,6 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
*/
credentialDefaultProvider?: (input: any) => __Provider<__Credentials>;

/**
* Fetch related hostname, signing name or signing region with given region.
* @internal
*/
regionInfoProvider?: RegionInfoProvider;

/**
* The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header
* @internal
Expand All @@ -1383,11 +1377,12 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
type SageMakerClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> &
ClientDefaults &
RegionInputConfig &
EndpointsInputConfig &
EndpointInputConfig<EndpointParameters> &
RetryInputConfig &
HostHeaderInputConfig &
AwsAuthInputConfig &
UserAgentInputConfig;
UserAgentInputConfig &
ClientInputEndpointParameters;
/**
* The configuration interface of SageMakerClient class constructor that set the region, credentials and other options.
*/
Expand All @@ -1396,11 +1391,12 @@ export interface SageMakerClientConfig extends SageMakerClientConfigType {}
type SageMakerClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> &
Required<ClientDefaults> &
RegionResolvedConfig &
EndpointsResolvedConfig &
EndpointResolvedConfig<EndpointParameters> &
RetryResolvedConfig &
HostHeaderResolvedConfig &
AwsAuthResolvedConfig &
UserAgentResolvedConfig;
UserAgentResolvedConfig &
ClientResolvedEndpointParameters;
/**
* The resolved configuration interface of SageMakerClient class. This is resolved and normalized from the {@link SageMakerClientConfig | constructor configuration interface}.
*/
Expand Down Expand Up @@ -1437,14 +1433,15 @@ export class SageMakerClient extends __Client<

constructor(configuration: SageMakerClientConfig) {
const _config_0 = __getRuntimeConfig(configuration);
const _config_1 = resolveRegionConfig(_config_0);
const _config_2 = resolveEndpointsConfig(_config_1);
const _config_3 = resolveRetryConfig(_config_2);
const _config_4 = resolveHostHeaderConfig(_config_3);
const _config_5 = resolveAwsAuthConfig(_config_4);
const _config_6 = resolveUserAgentConfig(_config_5);
super(_config_6);
this.config = _config_6;
const _config_1 = resolveClientEndpointParameters(_config_0);
const _config_2 = resolveRegionConfig(_config_1);
const _config_3 = resolveEndpointConfig(_config_2);
const _config_4 = resolveRetryConfig(_config_3);
const _config_5 = resolveHostHeaderConfig(_config_4);
const _config_6 = resolveAwsAuthConfig(_config_5);
const _config_7 = resolveUserAgentConfig(_config_6);
super(_config_7);
this.config = _config_7;
this.middlewareStack.use(getRetryPlugin(this.config));
this.middlewareStack.use(getContentLengthPlugin(this.config));
this.middlewareStack.use(getHostHeaderPlugin(this.config));
Expand Down
13 changes: 13 additions & 0 deletions clients/client-sagemaker/src/commands/AddAssociationCommand.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// smithy-typescript generated code
import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
import { Command as $Command } from "@aws-sdk/smithy-client";
Expand Down Expand Up @@ -56,6 +57,15 @@ export class AddAssociationCommand extends $Command<
// Start section: command_properties
// End section: command_properties

public static getEndpointParameterInstructions(): EndpointParameterInstructions {
return {
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
Endpoint: { type: "builtInParams", name: "Endpoint" },
Region: { type: "builtInParams", name: "region" },
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
};
}

constructor(readonly input: AddAssociationCommandInput) {
// Start section: command_constructor
super();
Expand All @@ -71,6 +81,9 @@ export class AddAssociationCommand extends $Command<
options?: __HttpHandlerOptions
): Handler<AddAssociationCommandInput, AddAssociationCommandOutput> {
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
this.middlewareStack.use(
getEndpointPlugin(configuration, AddAssociationCommand.getEndpointParameterInstructions())
);

const stack = clientStack.concat(this.middlewareStack);

Expand Down
11 changes: 11 additions & 0 deletions clients/client-sagemaker/src/commands/AddTagsCommand.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// smithy-typescript generated code
import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
import { Command as $Command } from "@aws-sdk/smithy-client";
Expand Down Expand Up @@ -69,6 +70,15 @@ export class AddTagsCommand extends $Command<AddTagsCommandInput, AddTagsCommand
// Start section: command_properties
// End section: command_properties

public static getEndpointParameterInstructions(): EndpointParameterInstructions {
return {
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
Endpoint: { type: "builtInParams", name: "Endpoint" },
Region: { type: "builtInParams", name: "region" },
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
};
}

constructor(readonly input: AddTagsCommandInput) {
// Start section: command_constructor
super();
Expand All @@ -84,6 +94,7 @@ export class AddTagsCommand extends $Command<AddTagsCommandInput, AddTagsCommand
options?: __HttpHandlerOptions
): Handler<AddTagsCommandInput, AddTagsCommandOutput> {
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
this.middlewareStack.use(getEndpointPlugin(configuration, AddTagsCommand.getEndpointParameterInstructions()));

const stack = clientStack.concat(this.middlewareStack);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// smithy-typescript generated code
import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
import { Command as $Command } from "@aws-sdk/smithy-client";
Expand Down Expand Up @@ -53,6 +54,15 @@ export class AssociateTrialComponentCommand extends $Command<
// Start section: command_properties
// End section: command_properties

public static getEndpointParameterInstructions(): EndpointParameterInstructions {
return {
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
Endpoint: { type: "builtInParams", name: "Endpoint" },
Region: { type: "builtInParams", name: "region" },
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
};
}

constructor(readonly input: AssociateTrialComponentCommandInput) {
// Start section: command_constructor
super();
Expand All @@ -68,6 +78,9 @@ export class AssociateTrialComponentCommand extends $Command<
options?: __HttpHandlerOptions
): Handler<AssociateTrialComponentCommandInput, AssociateTrialComponentCommandOutput> {
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
this.middlewareStack.use(
getEndpointPlugin(configuration, AssociateTrialComponentCommand.getEndpointParameterInstructions())
);

const stack = clientStack.concat(this.middlewareStack);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// smithy-typescript generated code
import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
import { Command as $Command } from "@aws-sdk/smithy-client";
Expand Down Expand Up @@ -52,6 +53,15 @@ export class BatchDescribeModelPackageCommand extends $Command<
// Start section: command_properties
// End section: command_properties

public static getEndpointParameterInstructions(): EndpointParameterInstructions {
return {
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
Endpoint: { type: "builtInParams", name: "Endpoint" },
Region: { type: "builtInParams", name: "region" },
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
};
}

constructor(readonly input: BatchDescribeModelPackageCommandInput) {
// Start section: command_constructor
super();
Expand All @@ -67,6 +77,9 @@ export class BatchDescribeModelPackageCommand extends $Command<
options?: __HttpHandlerOptions
): Handler<BatchDescribeModelPackageCommandInput, BatchDescribeModelPackageCommandOutput> {
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
this.middlewareStack.use(
getEndpointPlugin(configuration, BatchDescribeModelPackageCommand.getEndpointParameterInstructions())
);

const stack = clientStack.concat(this.middlewareStack);

Expand Down
11 changes: 11 additions & 0 deletions clients/client-sagemaker/src/commands/CreateActionCommand.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// smithy-typescript generated code
import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
import { Command as $Command } from "@aws-sdk/smithy-client";
Expand Down Expand Up @@ -56,6 +57,15 @@ export class CreateActionCommand extends $Command<
// Start section: command_properties
// End section: command_properties

public static getEndpointParameterInstructions(): EndpointParameterInstructions {
return {
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
Endpoint: { type: "builtInParams", name: "Endpoint" },
Region: { type: "builtInParams", name: "region" },
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
};
}

constructor(readonly input: CreateActionCommandInput) {
// Start section: command_constructor
super();
Expand All @@ -71,6 +81,7 @@ export class CreateActionCommand extends $Command<
options?: __HttpHandlerOptions
): Handler<CreateActionCommandInput, CreateActionCommandOutput> {
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
this.middlewareStack.use(getEndpointPlugin(configuration, CreateActionCommand.getEndpointParameterInstructions()));

const stack = clientStack.concat(this.middlewareStack);

Expand Down
13 changes: 13 additions & 0 deletions clients/client-sagemaker/src/commands/CreateAlgorithmCommand.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// smithy-typescript generated code
import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
import { Command as $Command } from "@aws-sdk/smithy-client";
Expand Down Expand Up @@ -52,6 +53,15 @@ export class CreateAlgorithmCommand extends $Command<
// Start section: command_properties
// End section: command_properties

public static getEndpointParameterInstructions(): EndpointParameterInstructions {
return {
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
Endpoint: { type: "builtInParams", name: "Endpoint" },
Region: { type: "builtInParams", name: "region" },
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
};
}

constructor(readonly input: CreateAlgorithmCommandInput) {
// Start section: command_constructor
super();
Expand All @@ -67,6 +77,9 @@ export class CreateAlgorithmCommand extends $Command<
options?: __HttpHandlerOptions
): Handler<CreateAlgorithmCommandInput, CreateAlgorithmCommandOutput> {
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
this.middlewareStack.use(
getEndpointPlugin(configuration, CreateAlgorithmCommand.getEndpointParameterInstructions())
);

const stack = clientStack.concat(this.middlewareStack);

Expand Down
11 changes: 11 additions & 0 deletions clients/client-sagemaker/src/commands/CreateAppCommand.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// smithy-typescript generated code
import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
import { Command as $Command } from "@aws-sdk/smithy-client";
Expand Down Expand Up @@ -51,6 +52,15 @@ export class CreateAppCommand extends $Command<
// Start section: command_properties
// End section: command_properties

public static getEndpointParameterInstructions(): EndpointParameterInstructions {
return {
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
Endpoint: { type: "builtInParams", name: "Endpoint" },
Region: { type: "builtInParams", name: "region" },
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
};
}

constructor(readonly input: CreateAppCommandInput) {
// Start section: command_constructor
super();
Expand All @@ -66,6 +76,7 @@ export class CreateAppCommand extends $Command<
options?: __HttpHandlerOptions
): Handler<CreateAppCommandInput, CreateAppCommandOutput> {
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
this.middlewareStack.use(getEndpointPlugin(configuration, CreateAppCommand.getEndpointParameterInstructions()));

const stack = clientStack.concat(this.middlewareStack);

Expand Down
Loading

0 comments on commit 92e9095

Please sign in to comment.