Skip to content

Commit

Permalink
feat(client-sagemaker): There needs to be a user identity to specify …
Browse files Browse the repository at this point in the history
…the SageMaker user who perform each action regarding the entity. However, these is a not a unified concept of user identity across SageMaker service that could be used today.
  • Loading branch information
awstools committed Mar 8, 2023
1 parent ab22b63 commit 392879f
Show file tree
Hide file tree
Showing 12 changed files with 371 additions and 274 deletions.
2 changes: 1 addition & 1 deletion clients/client-sagemaker/src/SageMaker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11699,7 +11699,7 @@ export class SageMaker extends SageMakerClient {
* range of IP addresses, workers who attempt to access tasks using any IP address outside
* the specified range are denied and get a <code>Not Found</code> error message on
* the worker portal.</p>
* <p>To restrict access to all the workers in public internet, add the <code>SourceIpConfig</code> CIDR value as "0.0.0.0/0".</p>
* <p>To restrict access to all the workers in public internet, add the <code>SourceIpConfig</code> CIDR value as "10.0.0.0/16".</p>
* <important>
* <p>Amazon SageMaker does not support Source Ip restriction for worker portals in VPC.</p>
* </important>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@ import {
SerdeContext as __SerdeContext,
} from "@aws-sdk/types";

import { DeleteWorkteamRequest, DeleteWorkteamRequestFilterSensitiveLog } from "../models/models_1";
import { DeleteWorkteamResponse, DeleteWorkteamResponseFilterSensitiveLog } from "../models/models_2";
import {
DeleteWorkteamRequest,
DeleteWorkteamRequestFilterSensitiveLog,
DeleteWorkteamResponse,
DeleteWorkteamResponseFilterSensitiveLog,
} from "../models/models_2";
import {
deserializeAws_json1_1DeleteWorkteamCommand,
serializeAws_json1_1DeleteWorkteamCommand,
Expand Down
8 changes: 6 additions & 2 deletions clients/client-sagemaker/src/commands/ListAliasesCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@ import {
SerdeContext as __SerdeContext,
} from "@aws-sdk/types";

import { ListAliasesRequest, ListAliasesRequestFilterSensitiveLog } from "../models/models_2";
import { ListAliasesResponse, ListAliasesResponseFilterSensitiveLog } from "../models/models_3";
import {
ListAliasesRequest,
ListAliasesRequestFilterSensitiveLog,
ListAliasesResponse,
ListAliasesResponseFilterSensitiveLog,
} from "../models/models_3";
import {
deserializeAws_json1_1ListAliasesCommand,
serializeAws_json1_1ListAliasesCommand,
Expand Down
8 changes: 6 additions & 2 deletions clients/client-sagemaker/src/commands/UpdateDomainCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@ import {
SerdeContext as __SerdeContext,
} from "@aws-sdk/types";

import { UpdateDomainRequest, UpdateDomainRequestFilterSensitiveLog } from "../models/models_3";
import { UpdateDomainResponse, UpdateDomainResponseFilterSensitiveLog } from "../models/models_4";
import {
UpdateDomainRequest,
UpdateDomainRequestFilterSensitiveLog,
UpdateDomainResponse,
UpdateDomainResponseFilterSensitiveLog,
} from "../models/models_4";
import {
deserializeAws_json1_1UpdateDomainCommand,
serializeAws_json1_1UpdateDomainCommand,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export interface UpdateWorkforceCommandOutput extends UpdateWorkforceResponse, _
* range of IP addresses, workers who attempt to access tasks using any IP address outside
* the specified range are denied and get a <code>Not Found</code> error message on
* the worker portal.</p>
* <p>To restrict access to all the workers in public internet, add the <code>SourceIpConfig</code> CIDR value as "0.0.0.0/0".</p>
* <p>To restrict access to all the workers in public internet, add the <code>SourceIpConfig</code> CIDR value as "10.0.0.0/16".</p>
* <important>
* <p>Amazon SageMaker does not support Source Ip restriction for worker portals in VPC.</p>
* </important>
Expand Down
117 changes: 34 additions & 83 deletions clients/client-sagemaker/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3689,6 +3689,27 @@ export interface AssociateTrialComponentResponse {
TrialArn?: string;
}

/**
* <p>The IAM Identity details associated with the user. These details are
* associated with model package groups, model packages and project entities only.</p>
*/
export interface IamIdentity {
/**
* <p>The Amazon Resource Name (ARN) of the IAM identity.</p>
*/
Arn?: string;

/**
* <p>The ID of the principal that assumes the IAM identity.</p>
*/
PrincipalId?: string;

/**
* <p>The person or application which assumes the IAM identity.</p>
*/
SourceIdentity?: string;
}

/**
* <p>Information about the user who created or modified an experiment, trial, trial
* component, lineage group, project, or model card.</p>
Expand All @@ -3708,6 +3729,12 @@ export interface UserContext {
* <p>The domain associated with the user.</p>
*/
DomainId?: string;

/**
* <p>The IAM Identity details associated with the user. These details are
* associated with model package groups, model packages, and project entities only.</p>
*/
IamIdentity?: IamIdentity;
}

/**
Expand Down Expand Up @@ -9381,82 +9408,6 @@ export interface ProductionVariantServerlessConfig {
MaxConcurrency: number | undefined;
}

/**
* <p>Identifies a model that you want to host and the resources chosen to deploy for
* hosting it. If you are deploying multiple models, tell SageMaker how to distribute traffic
* among the models by specifying variant weights. </p>
*/
export interface ProductionVariant {
/**
* <p>The name of the production variant.</p>
*/
VariantName: string | undefined;

/**
* <p>The name of the model that you want to host. This is the name that you specified
* when creating the model.</p>
*/
ModelName: string | undefined;

/**
* <p>Number of instances to launch initially.</p>
*/
InitialInstanceCount?: number;

/**
* <p>The ML compute instance type.</p>
*/
InstanceType?: ProductionVariantInstanceType | string;

/**
* <p>Determines initial traffic distribution among all of the models that you specify in
* the endpoint configuration. The traffic to a production variant is determined by the
* ratio of the <code>VariantWeight</code> to the sum of all <code>VariantWeight</code>
* values across all ProductionVariants. If unspecified, it defaults to 1.0.
* </p>
*/
InitialVariantWeight?: number;

/**
* <p>The size of the Elastic Inference (EI) instance to use for the production variant. EI
* instances provide on-demand GPU computing for inference. For more information, see
* <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/ei.html">Using Elastic
* Inference in Amazon SageMaker</a>.</p>
*/
AcceleratorType?: ProductionVariantAcceleratorType | string;

/**
* <p>Specifies configuration for a core dump from the model container when the process
* crashes.</p>
*/
CoreDumpConfig?: ProductionVariantCoreDumpConfig;

/**
* <p>The serverless configuration for an endpoint. Specifies a serverless endpoint configuration instead of an instance-based endpoint configuration.</p>
*/
ServerlessConfig?: ProductionVariantServerlessConfig;

/**
* <p>The size, in GB, of the ML storage volume attached to individual inference instance
* associated with the production variant. Currently only Amazon EBS gp2 storage volumes are
* supported.</p>
*/
VolumeSizeInGB?: number;

/**
* <p>The timeout value, in seconds, to download and extract the model that you want to host
* from Amazon S3 to the individual inference instance associated with this production
* variant.</p>
*/
ModelDataDownloadTimeoutInSeconds?: number;

/**
* <p>The timeout value, in seconds, for your inference container to pass health check by
* SageMaker Hosting. For more information about health check, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/your-algorithms-inference-code.html#your-algorithms-inference-algo-ping-requests">How Your Container Should Respond to Health Check (Ping) Requests</a>.</p>
*/
ContainerStartupHealthCheckTimeoutInSeconds?: number;
}

/**
* @internal
*/
Expand Down Expand Up @@ -9802,6 +9753,13 @@ export const AssociateTrialComponentResponseFilterSensitiveLog = (obj: Associate
...obj,
});

/**
* @internal
*/
export const IamIdentityFilterSensitiveLog = (obj: IamIdentity): any => ({
...obj,
});

/**
* @internal
*/
Expand Down Expand Up @@ -10915,10 +10873,3 @@ export const ProductionVariantCoreDumpConfigFilterSensitiveLog = (obj: Productio
export const ProductionVariantServerlessConfigFilterSensitiveLog = (obj: ProductionVariantServerlessConfig): any => ({
...obj,
});

/**
* @internal
*/
export const ProductionVariantFilterSensitiveLog = (obj: ProductionVariant): any => ({
...obj,
});
99 changes: 85 additions & 14 deletions clients/client-sagemaker/src/models/models_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,10 @@ import {
ProcessingS3DataDistributionType,
ProcessingS3InputMode,
ProcessingS3UploadMode,
ProductionVariant,
ProductionVariantAcceleratorType,
ProductionVariantCoreDumpConfig,
ProductionVariantInstanceType,
ProductionVariantServerlessConfig,
ResourceConfig,
StoppingCondition,
Tag,
Expand All @@ -67,6 +69,82 @@ import {
VpcConfig,
} from "./models_0";

/**
* <p>Identifies a model that you want to host and the resources chosen to deploy for
* hosting it. If you are deploying multiple models, tell SageMaker how to distribute traffic
* among the models by specifying variant weights. </p>
*/
export interface ProductionVariant {
/**
* <p>The name of the production variant.</p>
*/
VariantName: string | undefined;

/**
* <p>The name of the model that you want to host. This is the name that you specified
* when creating the model.</p>
*/
ModelName: string | undefined;

/**
* <p>Number of instances to launch initially.</p>
*/
InitialInstanceCount?: number;

/**
* <p>The ML compute instance type.</p>
*/
InstanceType?: ProductionVariantInstanceType | string;

/**
* <p>Determines initial traffic distribution among all of the models that you specify in
* the endpoint configuration. The traffic to a production variant is determined by the
* ratio of the <code>VariantWeight</code> to the sum of all <code>VariantWeight</code>
* values across all ProductionVariants. If unspecified, it defaults to 1.0.
* </p>
*/
InitialVariantWeight?: number;

/**
* <p>The size of the Elastic Inference (EI) instance to use for the production variant. EI
* instances provide on-demand GPU computing for inference. For more information, see
* <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/ei.html">Using Elastic
* Inference in Amazon SageMaker</a>.</p>
*/
AcceleratorType?: ProductionVariantAcceleratorType | string;

/**
* <p>Specifies configuration for a core dump from the model container when the process
* crashes.</p>
*/
CoreDumpConfig?: ProductionVariantCoreDumpConfig;

/**
* <p>The serverless configuration for an endpoint. Specifies a serverless endpoint configuration instead of an instance-based endpoint configuration.</p>
*/
ServerlessConfig?: ProductionVariantServerlessConfig;

/**
* <p>The size, in GB, of the ML storage volume attached to individual inference instance
* associated with the production variant. Currently only Amazon EBS gp2 storage volumes are
* supported.</p>
*/
VolumeSizeInGB?: number;

/**
* <p>The timeout value, in seconds, to download and extract the model that you want to host
* from Amazon S3 to the individual inference instance associated with this production
* variant.</p>
*/
ModelDataDownloadTimeoutInSeconds?: number;

/**
* <p>The timeout value, in seconds, for your inference container to pass health check by
* SageMaker Hosting. For more information about health check, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/your-algorithms-inference-code.html#your-algorithms-inference-algo-ping-requests">How Your Container Should Respond to Health Check (Ping) Requests</a>.</p>
*/
ContainerStartupHealthCheckTimeoutInSeconds?: number;
}

export interface CreateEndpointConfigInput {
/**
* <p>The name of the endpoint configuration. You specify this name in a <a>CreateEndpoint</a> request. </p>
Expand Down Expand Up @@ -9272,12 +9350,12 @@ export interface DeleteWorkforceRequest {

export interface DeleteWorkforceResponse {}

export interface DeleteWorkteamRequest {
/**
* <p>The name of the work team to delete.</p>
*/
WorkteamName: string | undefined;
}
/**
* @internal
*/
export const ProductionVariantFilterSensitiveLog = (obj: ProductionVariant): any => ({
...obj,
});

/**
* @internal
Expand Down Expand Up @@ -11215,10 +11293,3 @@ export const DeleteWorkforceRequestFilterSensitiveLog = (obj: DeleteWorkforceReq
export const DeleteWorkforceResponseFilterSensitiveLog = (obj: DeleteWorkforceResponse): any => ({
...obj,
});

/**
* @internal
*/
export const DeleteWorkteamRequestFilterSensitiveLog = (obj: DeleteWorkteamRequest): any => ({
...obj,
});
Loading

0 comments on commit 392879f

Please sign in to comment.