agent-claw: automated task changes

This commit is contained in:
daniel
2026-05-06 18:55:16 -05:00
parent 38905bb1e9
commit 732b00fb66
8494 changed files with 2018127 additions and 4 deletions

View File

@@ -0,0 +1,771 @@
import type { Construct } from 'constructs';
import type * as ec2 from '../../../aws-ec2';
import type * as ecr from '../../../aws-ecr';
import type { DockerImageAssetProps } from '../../../aws-ecr-assets';
import * as iam from '../../../aws-iam';
import type * as kms from '../../../aws-kms';
import type * as s3 from '../../../aws-s3';
import * as sfn from '../../../aws-stepfunctions';
import type { Duration, Size } from '../../../core';
/**
* Task to train a machine learning model using Amazon SageMaker
*/
export interface ISageMakerTask extends iam.IGrantable {
}
/**
* Specify the training algorithm and algorithm-specific metadata
*/
export interface AlgorithmSpecification {
/**
* Name of the algorithm resource to use for the training job.
* This must be an algorithm resource that you created or subscribe to on AWS Marketplace.
* If you specify a value for this parameter, you can't specify a value for TrainingImage.
*
* @default - No algorithm is specified
*/
readonly algorithmName?: string;
/**
* List of metric definition objects. Each object specifies the metric name and regular expressions used to parse algorithm logs.
*
* @default - No metrics
*/
readonly metricDefinitions?: MetricDefinition[];
/**
* Registry path of the Docker image that contains the training algorithm.
*
* @default - No Docker image is specified
*/
readonly trainingImage?: DockerImage;
/**
* Input mode that the algorithm supports.
*
* @default 'File' mode
*/
readonly trainingInputMode?: InputMode;
}
/**
* Describes the training, validation or test dataset and the Amazon S3 location where it is stored.
*
*/
export interface Channel {
/**
* Name of the channel
*/
readonly channelName: string;
/**
* Compression type if training data is compressed
*
* @default - None
*/
readonly compressionType?: CompressionType;
/**
* The MIME type of the data.
*
* @default - None
*/
readonly contentType?: string;
/**
* Location of the channel data.
*/
readonly dataSource: DataSource;
/**
* Input mode to use for the data channel in a training job.
*
* @default - None
*/
readonly inputMode?: InputMode;
/**
* Specify RecordIO as the value when input data is in raw format but the training algorithm requires the RecordIO format.
* In this case, Amazon SageMaker wraps each individual S3 object in a RecordIO record.
* If the input data is already in RecordIO format, you don't need to set this attribute.
*
* @default - None
*/
readonly recordWrapperType?: RecordWrapperType;
/**
* Shuffle config option for input data in a channel.
*
* @default - None
*/
readonly shuffleConfig?: ShuffleConfig;
}
/**
* Configuration for a shuffle option for input data in a channel.
*
*/
export interface ShuffleConfig {
/**
* Determines the shuffling order.
*/
readonly seed: number;
}
/**
* Location of the channel data.
*
*/
export interface DataSource {
/**
* S3 location of the data source that is associated with a channel.
*/
readonly s3DataSource: S3DataSource;
}
/**
* S3 location of the channel data.
*
* @see https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_S3DataSource.html
*
*/
export interface S3DataSource {
/**
* List of one or more attribute names to use that are found in a specified augmented manifest file.
*
* @default - No attribute names
*/
readonly attributeNames?: string[];
/**
* S3 Data Distribution Type
*
* @default - None
*/
readonly s3DataDistributionType?: S3DataDistributionType;
/**
* S3 Data Type
*
* @default S3_PREFIX
*/
readonly s3DataType?: S3DataType;
/**
* S3 Uri
*/
readonly s3Location: S3Location;
}
/**
* Configures the S3 bucket where SageMaker will save the result of model training
*/
export interface OutputDataConfig {
/**
* Optional KMS encryption key that Amazon SageMaker uses to encrypt the model artifacts at rest using Amazon S3 server-side encryption.
*
* @default - Amazon SageMaker uses the default KMS key for Amazon S3 for your role's account
*/
readonly encryptionKey?: kms.IKey;
/**
* Identifies the S3 path where you want Amazon SageMaker to store the model artifacts.
*/
readonly s3OutputLocation: S3Location;
}
/**
* Specifies a limit to how long a model training job can run.
* When the job reaches the time limit, Amazon SageMaker ends the training job.
*
*/
export interface StoppingCondition {
/**
* The maximum length of time, in seconds, that the training or compilation job can run.
*
* @default - 1 hour
*/
readonly maxRuntime?: Duration;
}
/**
* Specifies the resources, ML compute instances, and ML storage volumes to deploy for model training.
*
*/
export interface ResourceConfig {
/**
* The number of ML compute instances to use.
*
* @default 1 instance.
*/
readonly instanceCount: number;
/**
* ML compute instance type.
*
* To provide an instance type from the task input, supply an instance type in the following way
* where the value in the task input is an EC2 instance type prepended with "ml.":
*
* ```ts
* new ec2.InstanceType(sfn.JsonPath.stringAt('$.path.to.instanceType'));
* ```
* @see https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ResourceConfig.html#sagemaker-Type-ResourceConfig-InstanceType
*
* @default ec2.InstanceType(ec2.InstanceClass.M4, ec2.InstanceType.XLARGE)
*/
readonly instanceType: ec2.InstanceType;
/**
* KMS key that Amazon SageMaker uses to encrypt data on the storage volume attached to the ML compute instance(s) that run the training job.
*
* @default - Amazon SageMaker uses the default KMS key for Amazon S3 for your role's account
*/
readonly volumeEncryptionKey?: kms.IKey;
/**
* Size of the ML storage volume that you want to provision.
*
* @default 10 GB EBS volume.
*/
readonly volumeSize: Size;
}
/**
* Specifies the VPC that you want your Amazon SageMaker training job to connect to.
*
*/
export interface VpcConfig {
/**
* VPC
*/
readonly vpc: ec2.IVpc;
/**
* VPC subnets.
*
* @default - Private Subnets are selected
*/
readonly subnets?: ec2.SubnetSelection;
}
/**
* Specifies the metric name and regular expressions used to parse algorithm logs.
*
*/
export interface MetricDefinition {
/**
* Name of the metric.
*/
readonly name: string;
/**
* Regular expression that searches the output of a training job and gets the value of the metric.
*/
readonly regex: string;
}
/**
* Stores information about the location of an object in Amazon S3
*
*/
export interface S3LocationConfig {
/**
* Uniquely identifies the resource in Amazon S3
*/
readonly uri: string;
}
/**
* Constructs `IS3Location` objects.
*
*/
export declare abstract class S3Location {
/**
* An `IS3Location` built with a determined bucket and key prefix.
*
* @param bucket is the bucket where the objects are to be stored.
* @param keyPrefix is the key prefix used by the location.
*/
static fromBucket(bucket: s3.IBucket, keyPrefix: string): S3Location;
/**
* An `IS3Location` determined fully by a JSONata expression or JSON Path from the task input.
*
* Due to the dynamic nature of those locations, the IAM grants that will be set by `grantRead` and `grantWrite`
* apply to the `*` resource.
*
* @param expression the JSON expression resolving to an S3 location URI.
*/
static fromJsonExpression(expression: string): S3Location;
/**
* Called when the S3Location is bound to a StepFunctions task.
*/
abstract bind(task: ISageMakerTask, opts: S3LocationBindOptions): S3LocationConfig;
}
/**
* Options for binding an S3 Location.
*
*/
export interface S3LocationBindOptions {
/**
* Allow reading from the S3 Location.
*
* @default false
*/
readonly forReading?: boolean;
/**
* Allow writing to the S3 Location.
*
* @default false
*/
readonly forWriting?: boolean;
}
/**
* Configuration for a using Docker image.
*
*/
export interface DockerImageConfig {
/**
* The fully qualified URI of the Docker image.
*/
readonly imageUri: string;
}
/**
* Creates `IDockerImage` instances.
*
*/
export declare abstract class DockerImage {
/**
* Reference a Docker image stored in an ECR repository.
*
* @param repository the ECR repository where the image is hosted.
* @param tagOrDigest an optional tag or digest (digests must start with `sha256:`)
*/
static fromEcrRepository(repository: ecr.IRepository, tagOrDigest?: string): DockerImage;
/**
* Reference a Docker image which URI is obtained from the task's input.
*
* @param expression the JSONata or JSON path expression with the task input.
* @param allowAnyEcrImagePull whether ECR access should be permitted (set to `false` if the image will never be in ECR).
*/
static fromJsonExpression(expression: string, allowAnyEcrImagePull?: boolean): DockerImage;
/**
* Reference a Docker image by it's URI.
*
* When referencing ECR images, prefer using `inEcr`.
*
* @param imageUri the URI to the docker image.
*/
static fromRegistry(imageUri: string): DockerImage;
/**
* Reference a Docker image that is provided as an Asset in the current app.
*
* @param scope the scope in which to create the Asset.
* @param id the ID for the asset in the construct tree.
* @param props the configuration props of the asset.
*/
static fromAsset(scope: Construct, id: string, props: DockerImageAssetProps): DockerImage;
/**
* Called when the image is used by a SageMaker task.
*/
abstract bind(task: ISageMakerTask): DockerImageConfig;
}
/**
* S3 Data Type.
*
*/
export declare enum S3DataType {
/**
* Manifest File Data Type
*/
MANIFEST_FILE = "ManifestFile",
/**
* S3 Prefix Data Type
*/
S3_PREFIX = "S3Prefix",
/**
* Augmented Manifest File Data Type
*/
AUGMENTED_MANIFEST_FILE = "AugmentedManifestFile"
}
/**
* S3 Data Distribution Type.
*
*/
export declare enum S3DataDistributionType {
/**
* Fully replicated S3 Data Distribution Type
*/
FULLY_REPLICATED = "FullyReplicated",
/**
* Sharded By S3 Key Data Distribution Type
*/
SHARDED_BY_S3_KEY = "ShardedByS3Key"
}
/**
* Define the format of the input data.
*
*/
export declare enum RecordWrapperType {
/**
* None record wrapper type
*/
NONE = "None",
/**
* RecordIO record wrapper type
*/
RECORD_IO = "RecordIO"
}
/**
* Input mode that the algorithm supports.
*
*/
export declare enum InputMode {
/**
* Pipe mode
*/
PIPE = "Pipe",
/**
* File mode.
*/
FILE = "File",
/**
* FastFile mode.
*/
FAST_FILE = "FastFile"
}
/**
* Compression type of the data.
*
*/
export declare enum CompressionType {
/**
* None compression type
*/
NONE = "None",
/**
* Gzip compression type
*/
GZIP = "Gzip"
}
/**
* Configures the timeout and maximum number of retries for processing a transform job invocation.
*
*/
export interface ModelClientOptions {
/**
* The maximum number of retries when invocation requests are failing.
*
* @default 0
*/
readonly invocationsMaxRetries?: number;
/**
* The timeout duration for an invocation request.
*
* @default Duration.minutes(1)
*/
readonly invocationsTimeout?: Duration;
}
/**
* Dataset to be transformed and the Amazon S3 location where it is stored.
*
*/
export interface TransformInput {
/**
* The compression type of the transform data.
*
* @default NONE
*/
readonly compressionType?: CompressionType;
/**
* Multipurpose internet mail extension (MIME) type of the data.
*
* @default - None
*/
readonly contentType?: string;
/**
* S3 location of the channel data
*/
readonly transformDataSource: TransformDataSource;
/**
* Method to use to split the transform job's data files into smaller batches.
*
* @default NONE
*/
readonly splitType?: SplitType;
}
/**
* S3 location of the input data that the model can consume.
*
*/
export interface TransformDataSource {
/**
* S3 location of the input data
*/
readonly s3DataSource: TransformS3DataSource;
}
/**
* Location of the channel data.
*
*/
export interface TransformS3DataSource {
/**
* S3 Data Type
*
* @default 'S3Prefix'
*/
readonly s3DataType?: S3DataType;
/**
* Identifies either a key name prefix or a manifest.
*/
readonly s3Uri: string;
}
/**
* S3 location where you want Amazon SageMaker to save the results from the transform job.
*
*/
export interface TransformOutput {
/**
* MIME type used to specify the output data.
*
* @default - None
*/
readonly accept?: string;
/**
* Defines how to assemble the results of the transform job as a single S3 object.
*
* @default - None
*/
readonly assembleWith?: AssembleWith;
/**
* AWS KMS key that Amazon SageMaker uses to encrypt the model artifacts at rest using Amazon S3 server-side encryption.
*
* @default - default KMS key for Amazon S3 for your role's account.
*/
readonly encryptionKey?: kms.IKeyRef;
/**
* S3 path where you want Amazon SageMaker to store the results of the transform job.
*/
readonly s3OutputPath: string;
}
/**
* ML compute instances for the transform job.
*
*/
export interface TransformResources {
/**
* Number of ML compute instances to use in the transform job
*/
readonly instanceCount: number;
/**
* ML compute instance type for the transform job.
*/
readonly instanceType: ec2.InstanceType;
/**
* AWS KMS key that Amazon SageMaker uses to encrypt data on the storage volume attached to the ML compute instance(s).
*
* @default - None
*/
readonly volumeEncryptionKey?: kms.IKeyRef;
}
/**
* Properties to define a ContainerDefinition
*
* @see https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ContainerDefinition.html
*/
export interface ContainerDefinitionOptions {
/**
* The Amazon EC2 Container Registry (Amazon ECR) path where inference code is stored.
*
* @default - None
*/
readonly image?: DockerImage;
/**
* The environment variables to set in the Docker container
*
* @default - No variables
*/
readonly environmentVariables?: sfn.TaskInput;
/**
* The name or Amazon Resource Name (ARN) of the model package to use to create the model.
*
* @default - None
*/
readonly modelPackageName?: string;
/**
* Defines how many models the container hosts
*
* @default - Mode.SINGLE_MODEL
*/
readonly mode?: Mode;
/**
* This parameter is ignored for models that contain only a PrimaryContainer.
* When a ContainerDefinition is part of an inference pipeline,
* the value of the parameter uniquely identifies the container for the purposes of logging and metrics.
*
* @default - None
*/
readonly containerHostName?: string;
/**
* The S3 path where the model artifacts, which result from model training, are stored.
* This path must point to a single gzip compressed tar archive (.tar.gz suffix).
* The S3 path is required for Amazon SageMaker built-in algorithms, but not if you use your own algorithms.
*
* @default - None
*/
readonly modelS3Location?: S3Location;
}
/**
* Describes the container, as part of model definition.
*
* @see https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ContainerDefinition.html
*/
export declare class ContainerDefinition implements IContainerDefinition {
private readonly options;
constructor(options: ContainerDefinitionOptions);
/**
* Called when the ContainerDefinition type configured on Sagemaker Task
*/
bind(task: ISageMakerTask): ContainerDefinitionConfig;
}
/**
* Configuration of the container used to host the model
*
* @see https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ContainerDefinition.html
*/
export interface IContainerDefinition {
/**
* Called when the ContainerDefinition is used by a SageMaker task.
*/
bind(task: ISageMakerTask): ContainerDefinitionConfig;
}
/**
* Configuration options for the ContainerDefinition
*/
export interface ContainerDefinitionConfig {
/**
* Additional parameters to pass to the base task
*
* @default - No additional parameters passed
*/
readonly parameters?: {
[key: string]: any;
};
}
/**
* Specifies how many models the container hosts
*
*/
export declare enum Mode {
/**
* Container hosts a single model
*/
SINGLE_MODEL = "SingleModel",
/**
* Container hosts multiple models
*
* @see https://docs.aws.amazon.com/sagemaker/latest/dg/multi-model-endpoints.html
*/
MULTI_MODEL = "MultiModel"
}
/**
* Identifies a model that you want to host and the resources to deploy for hosting it.
*
* @see https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ProductionVariant.html
*/
export interface ProductionVariant {
/**
* The size of the Elastic Inference (EI) instance to use for the production variant.
*
* @default - None
*/
readonly acceleratorType?: AcceleratorType;
/**
* Number of instances to launch initially.
*
* @default - 1
*/
readonly initialInstanceCount?: number;
/**
* Determines initial traffic distribution among all of the models that you specify in the endpoint configuration.
*
* @default - 1.0
*/
readonly initialVariantWeight?: number;
/**
* The ML compute instance type
*/
readonly instanceType: ec2.InstanceType;
/**
* The name of the production variant.
*/
readonly variantName: string;
/**
* The name of the model that you want to host. This is the name that you specified when creating the model.
*/
readonly modelName: string;
}
/**
* The generation of Elastic Inference (EI) instance
*
* @see https://docs.aws.amazon.com/sagemaker/latest/dg/ei.html
*/
export declare class AcceleratorClass {
readonly version: string;
/**
* Elastic Inference accelerator 1st generation
*/
static readonly EIA1: AcceleratorClass;
/**
* Elastic Inference accelerator 2nd generation
*/
static readonly EIA2: AcceleratorClass;
/**
* Custom AcceleratorType
* @param version - Elastic Inference accelerator generation
*/
static of(version: string): AcceleratorClass;
/**
* @param version - Elastic Inference accelerator generation
*/
private constructor();
}
/**
* The size of the Elastic Inference (EI) instance to use for the production variant.
* EI instances provide on-demand GPU computing for inference
*
* @see https://docs.aws.amazon.com/sagemaker/latest/dg/ei.html
*/
export declare class AcceleratorType {
private readonly instanceTypeIdentifier;
/**
* AcceleratorType
*
* This class takes a combination of a class and size.
*/
static of(acceleratorClass: AcceleratorClass, instanceSize: ec2.InstanceSize): AcceleratorType;
constructor(instanceTypeIdentifier: string);
/**
* Return the accelerator type as a dotted string
*/
toString(): string;
}
/**
* Specifies the number of records to include in a mini-batch for an HTTP inference request.
*
*/
export declare enum BatchStrategy {
/**
* Fits multiple records in a mini-batch.
*/
MULTI_RECORD = "MultiRecord",
/**
* Use a single record when making an invocation request.
*/
SINGLE_RECORD = "SingleRecord"
}
/**
* Method to use to split the transform job's data files into smaller batches.
*
*/
export declare enum SplitType {
/**
* Input data files are not split,
*/
NONE = "None",
/**
* Split records on a newline character boundary.
*/
LINE = "Line",
/**
* Split using MXNet RecordIO format.
*/
RECORD_IO = "RecordIO",
/**
* Split using TensorFlow TFRecord format.
*/
TF_RECORD = "TFRecord"
}
/**
* How to assemble the results of the transform job as a single S3 object.
*
*/
export declare enum AssembleWith {
/**
* Concatenate the results in binary format.
*/
NONE = "None",
/**
* Add a newline character at the end of every transformed record.
*/
LINE = "Line"
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,88 @@
import type { Construct } from 'constructs';
import type { ProductionVariant } from './base-types';
import * as iam from '../../../aws-iam';
import type * as kms from '../../../aws-kms';
import * as sfn from '../../../aws-stepfunctions';
interface SageMakerCreateEndpointConfigOptions {
/**
* The name of the endpoint configuration.
*/
readonly endpointConfigName: string;
/**
* AWS Key Management Service key that Amazon SageMaker
* uses to encrypt data on the storage volume attached to the ML compute instance that hosts the endpoint.
*
* @default - None
*/
readonly kmsKey?: kms.IKeyRef;
/**
* An list of ProductionVariant objects, one for each model that you want to host at this endpoint.
* Identifies a model that you want to host and the resources to deploy for hosting it.
* If you are deploying multiple models, tell Amazon SageMaker how to distribute traffic among the models by specifying variant weights.
*/
readonly productionVariants: ProductionVariant[];
/**
* Tags to be applied to the endpoint configuration.
*
* @default - No tags
*/
readonly tags?: sfn.TaskInput;
}
/**
* Properties for creating an Amazon SageMaker endpoint configuration using JSONPath
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-sagemaker.html
*/
export interface SageMakerCreateEndpointConfigJsonPathProps extends sfn.TaskStateJsonPathBaseProps, SageMakerCreateEndpointConfigOptions {
}
/**
* Properties for creating an Amazon SageMaker endpoint configuration using JSONata
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-sagemaker.html
*/
export interface SageMakerCreateEndpointConfigJsonataProps extends sfn.TaskStateJsonataBaseProps, SageMakerCreateEndpointConfigOptions {
}
/**
* Properties for creating an Amazon SageMaker endpoint configuration
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-sagemaker.html
*/
export interface SageMakerCreateEndpointConfigProps extends sfn.TaskStateBaseProps, SageMakerCreateEndpointConfigOptions {
}
/**
* A Step Functions Task to create a SageMaker endpoint configuration
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-sagemaker.html
*/
export declare class SageMakerCreateEndpointConfig extends sfn.TaskStateBase {
private readonly props;
/**
* Uniquely identifies this class.
*/
static readonly PROPERTY_INJECTION_ID: string;
/**
* A Step Functions Task using JSONPath to create a SageMaker endpoint configuration
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-sagemaker.html
*/
static jsonPath(scope: Construct, id: string, props: SageMakerCreateEndpointConfigJsonPathProps): SageMakerCreateEndpointConfig;
/**
* A Step Functions Task using JSONata to create a SageMaker endpoint configuration
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-sagemaker.html
*/
static jsonata(scope: Construct, id: string, props: SageMakerCreateEndpointConfigJsonataProps): SageMakerCreateEndpointConfig;
private static readonly SUPPORTED_INTEGRATION_PATTERNS;
protected readonly taskMetrics?: sfn.TaskMetricsConfig;
protected readonly taskPolicies?: iam.PolicyStatement[];
private readonly integrationPattern;
constructor(scope: Construct, id: string, props: SageMakerCreateEndpointConfigProps);
/**
* @internal
*/
protected _renderTask(topLevelQueryLanguage?: sfn.QueryLanguage): any;
private renderParameters;
private makePolicyStatements;
private validateProductionVariants;
}
export {};

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,72 @@
import type { Construct } from 'constructs';
import * as iam from '../../../aws-iam';
import * as sfn from '../../../aws-stepfunctions';
interface SageMakerCreateEndpointOptions {
/**
* The name of an endpoint configuration.
*/
readonly endpointConfigName: string;
/**
* The name of the endpoint. The name must be unique within an AWS Region in your AWS account.
*/
readonly endpointName: string;
/**
* Tags to be applied to the endpoint.
*
* @default - No tags
*/
readonly tags?: sfn.TaskInput;
}
/**
* Properties for creating an Amazon SageMaker endpoint using JSONPath
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-sagemaker.html
*/
export interface SageMakerCreateEndpointJsonPathProps extends sfn.TaskStateJsonPathBaseProps, SageMakerCreateEndpointOptions {
}
/**
* Properties for creating an Amazon SageMaker endpoint using JSONata
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-sagemaker.html
*/
export interface SageMakerCreateEndpointJsonataProps extends sfn.TaskStateJsonataBaseProps, SageMakerCreateEndpointOptions {
}
/**
* Properties for creating an Amazon SageMaker endpoint
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-sagemaker.html
*/
export interface SageMakerCreateEndpointProps extends sfn.TaskStateBaseProps, SageMakerCreateEndpointOptions {
}
/**
* A Step Functions Task to create a SageMaker endpoint
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-sagemaker.html
*/
export declare class SageMakerCreateEndpoint extends sfn.TaskStateBase {
private readonly props;
/**
* A Step Functions Task using JSONPath to create a SageMaker endpoint
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-sagemaker.html
*/
static jsonPath(scope: Construct, id: string, props: SageMakerCreateEndpointJsonPathProps): SageMakerCreateEndpoint;
/**
* A Step Functions Task using JSONata to create a SageMaker endpoint
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-sagemaker.html
*/
static jsonata(scope: Construct, id: string, props: SageMakerCreateEndpointJsonataProps): SageMakerCreateEndpoint;
private static readonly SUPPORTED_INTEGRATION_PATTERNS;
protected readonly taskMetrics?: sfn.TaskMetricsConfig;
protected readonly taskPolicies?: iam.PolicyStatement[];
private readonly integrationPattern;
constructor(scope: Construct, id: string, props: SageMakerCreateEndpointProps);
/**
* @internal
*/
protected _renderTask(topLevelQueryLanguage?: sfn.QueryLanguage): any;
private renderParameters;
private makePolicyStatements;
}
export {};

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SageMakerCreateEndpoint=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var iam=()=>{var tmp=require("../../../aws-iam");return iam=()=>tmp,tmp},sfn=()=>{var tmp=require("../../../aws-stepfunctions");return sfn=()=>tmp,tmp},cdk=()=>{var tmp=require("../../../core");return cdk=()=>tmp,tmp},task_utils_1=()=>{var tmp=require("../private/task-utils");return task_utils_1=()=>tmp,tmp};class SageMakerCreateEndpoint extends sfn().TaskStateBase{props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_stepfunctions_tasks.SageMakerCreateEndpoint",version:"2.252.0"};static jsonPath(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_SageMakerCreateEndpointJsonPathProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.jsonPath),error}return new SageMakerCreateEndpoint(scope,id,props)}static jsonata(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_SageMakerCreateEndpointJsonataProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.jsonata),error}return new SageMakerCreateEndpoint(scope,id,{...props,queryLanguage:sfn().QueryLanguage.JSONATA})}static SUPPORTED_INTEGRATION_PATTERNS=[sfn().IntegrationPattern.REQUEST_RESPONSE];taskMetrics;taskPolicies;integrationPattern;constructor(scope,id,props){super(scope,id,props),this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_SageMakerCreateEndpointProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,SageMakerCreateEndpoint),error}this.integrationPattern=props.integrationPattern||sfn().IntegrationPattern.REQUEST_RESPONSE,(0,task_utils_1().validatePatternSupported)(this.integrationPattern,SageMakerCreateEndpoint.SUPPORTED_INTEGRATION_PATTERNS),this.taskPolicies=this.makePolicyStatements()}_renderTask(topLevelQueryLanguage){const queryLanguage=sfn()._getActualQueryLanguage(topLevelQueryLanguage,this.props.queryLanguage);return{Resource:(0,task_utils_1().integrationResourceArn)("sagemaker","createEndpoint",this.integrationPattern),...this._renderParametersOrArguments(this.renderParameters(),queryLanguage)}}renderParameters(){return{EndpointConfigName:this.props.endpointConfigName,EndpointName:this.props.endpointName,Tags:this.props.tags?.value}}makePolicyStatements(){const stack=cdk().Stack.of(this);return[new(iam()).PolicyStatement({actions:["sagemaker:createEndpoint"],resources:[stack.formatArn({service:"sagemaker",resource:"endpoint",resourceName:(0,task_utils_1().isJsonPathOrJsonataExpression)(this.props.endpointName)?"*":`${this.props.endpointName.toLowerCase()}`}),stack.formatArn({service:"sagemaker",resource:"endpoint-config",resourceName:(0,task_utils_1().isJsonPathOrJsonataExpression)(this.props.endpointConfigName)?"*":`${this.props.endpointConfigName.toLowerCase()}`})]}),new(iam()).PolicyStatement({actions:["sagemaker:ListTags"],resources:["*"]})]}}exports.SageMakerCreateEndpoint=SageMakerCreateEndpoint;

View File

@@ -0,0 +1,132 @@
import type { Construct } from 'constructs';
import type { IContainerDefinition } from './base-types';
import * as ec2 from '../../../aws-ec2';
import * as iam from '../../../aws-iam';
import * as sfn from '../../../aws-stepfunctions';
interface SageMakerCreateModelOptions {
/**
* An execution role that you can pass in a CreateModel API request
*
* @default - a role will be created.
*/
readonly role?: iam.IRole;
/**
* The name of the new model.
*/
readonly modelName: string;
/**
* The definition of the primary docker image containing inference code, associated artifacts,
* and custom environment map that the inference code uses when the model is deployed for predictions.
*/
readonly primaryContainer: IContainerDefinition;
/**
* Specifies the containers in the inference pipeline.
*
* @default - None
*/
readonly containers?: IContainerDefinition[];
/**
* Isolates the model container. No inbound or outbound network calls can be made to or from the model container.
*
* @default false
*/
readonly enableNetworkIsolation?: boolean;
/**
* The VPC that is accessible by the hosted model
*
* @default - None
*/
readonly vpc?: ec2.IVpc;
/**
* The subnets of the VPC to which the hosted model is connected
* (Note this parameter is only used when VPC is provided)
*
* @default - Private Subnets are selected
*/
readonly subnetSelection?: ec2.SubnetSelection;
/**
* Tags to be applied to the model.
*
* @default - No tags
*/
readonly tags?: sfn.TaskInput;
}
/**
* Properties for creating an Amazon SageMaker model using JSONPath
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-sagemaker.html
*/
export interface SageMakerCreateModelJsonPathProps extends sfn.TaskStateJsonPathBaseProps, SageMakerCreateModelOptions {
}
/**
* Properties for creating an Amazon SageMaker model using JSONata
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-sagemaker.html
*/
export interface SageMakerCreateModelJsonataProps extends sfn.TaskStateJsonataBaseProps, SageMakerCreateModelOptions {
}
/**
* Properties for creating an Amazon SageMaker model
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-sagemaker.html
*/
export interface SageMakerCreateModelProps extends sfn.TaskStateBaseProps, SageMakerCreateModelOptions {
}
/**
* A Step Functions Task to create a SageMaker model
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-sagemaker.html
*/
export declare class SageMakerCreateModel extends sfn.TaskStateBase implements iam.IGrantable, ec2.IConnectable {
private readonly props;
/**
* Uniquely identifies this class.
*/
static readonly PROPERTY_INJECTION_ID: string;
/**
* A Step Functions Task using JSONPath to create a SageMaker model
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-sagemaker.html
*/
static jsonPath(scope: Construct, id: string, props: SageMakerCreateModelJsonPathProps): SageMakerCreateModel;
/**
* A Step Functions Task using JSONata to create a SageMaker model
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-sagemaker.html
*/
static jsonata(scope: Construct, id: string, props: SageMakerCreateModelJsonataProps): SageMakerCreateModel;
private static readonly SUPPORTED_INTEGRATION_PATTERNS;
/**
* Allows specify security group connections for instances of this fleet.
*/
readonly connections: ec2.Connections;
/**
* The execution role for the Sagemaker Create Model API.
*/
readonly role: iam.IRole;
readonly grantPrincipal: iam.IPrincipal;
protected readonly taskMetrics?: sfn.TaskMetricsConfig;
protected readonly taskPolicies?: iam.PolicyStatement[];
private readonly vpc?;
private securityGroup?;
private readonly _securityGroups;
private readonly subnets?;
private readonly integrationPattern;
constructor(scope: Construct, id: string, props: SageMakerCreateModelProps);
/**
* Add the security group to all instances via the launch configuration
* security groups array.
*
* @param securityGroup: The security group to add
*/
addSecurityGroup(securityGroup: ec2.ISecurityGroup): void;
/**
* @internal
*/
protected _renderTask(topLevelQueryLanguage?: sfn.QueryLanguage): any;
private renderParameters;
private makePolicyStatements;
private createSagemakerRole;
private renderVpcConfig;
}
export {};

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,177 @@
import type { Construct } from 'constructs';
import type { AlgorithmSpecification, Channel, OutputDataConfig, ResourceConfig, StoppingCondition, VpcConfig } from './base-types';
import * as ec2 from '../../../aws-ec2';
import * as iam from '../../../aws-iam';
import * as sfn from '../../../aws-stepfunctions';
interface SageMakerCreateTrainingJobOptions {
/**
* Training Job Name.
*/
readonly trainingJobName: string;
/**
* Role for the Training Job. The role must be granted all necessary permissions for the SageMaker training job to
* be able to operate.
*
* See https://docs.aws.amazon.com/fr_fr/sagemaker/latest/dg/sagemaker-roles.html#sagemaker-roles-createtrainingjob-perms
*
* @default - a role will be created.
*/
readonly role?: iam.IRole;
/**
* Identifies the training algorithm to use.
*/
readonly algorithmSpecification: AlgorithmSpecification;
/**
* Isolates the training container. No inbound or outbound network calls can be made to or from the training container.
*
* @default false
*/
readonly enableNetworkIsolation?: boolean;
/**
* Algorithm-specific parameters that influence the quality of the model. Set hyperparameters before you start the learning process.
* For a list of hyperparameters provided by Amazon SageMaker
* @see https://docs.aws.amazon.com/sagemaker/latest/dg/algos.html
*
* @default - No hyperparameters
*/
readonly hyperparameters?: {
[key: string]: any;
};
/**
* Describes the various datasets (e.g. train, validation, test) and the Amazon S3 location where stored.
*
* @default - No inputDataConfig
*/
readonly inputDataConfig?: Channel[];
/**
* Tags to be applied to the train job.
*
* @default - No tags
*/
readonly tags?: {
[key: string]: string;
};
/**
* Identifies the Amazon S3 location where you want Amazon SageMaker to save the results of model training.
*/
readonly outputDataConfig: OutputDataConfig;
/**
* Specifies the resources, ML compute instances, and ML storage volumes to deploy for model training.
*
* @default - 1 instance of EC2 `M4.XLarge` with `10GB` volume
*/
readonly resourceConfig?: ResourceConfig;
/**
* Sets a time limit for training.
*
* @default - max runtime of 1 hour
*/
readonly stoppingCondition?: StoppingCondition;
/**
* Specifies the VPC that you want your training job to connect to.
*
* @default - No VPC
*/
readonly vpcConfig?: VpcConfig;
/**
* Environment variables to set in the Docker container.
*
* @default - No environment variables
*/
readonly environment?: {
[key: string]: string;
};
}
/**
* Properties for creating an Amazon SageMaker training job using JSONPath
*/
export interface SageMakerCreateTrainingJobJsonPathProps extends sfn.TaskStateJsonPathBaseProps, SageMakerCreateTrainingJobOptions {
}
/**
* Properties for creating an Amazon SageMaker training job using JSONata
*/
export interface SageMakerCreateTrainingJobJsonataProps extends sfn.TaskStateJsonataBaseProps, SageMakerCreateTrainingJobOptions {
}
/**
* Properties for creating an Amazon SageMaker training job
*/
export interface SageMakerCreateTrainingJobProps extends sfn.TaskStateBaseProps, SageMakerCreateTrainingJobOptions {
}
/**
* Class representing the SageMaker Create Training Job task.
*/
export declare class SageMakerCreateTrainingJob extends sfn.TaskStateBase implements iam.IGrantable, ec2.IConnectable {
private readonly props;
/**
* Uniquely identifies this class.
*/
static readonly PROPERTY_INJECTION_ID: string;
/**
* A Step Functions Task using JSONPath to create a SageMaker training job.
*/
static jsonPath(scope: Construct, id: string, props: SageMakerCreateTrainingJobJsonPathProps): SageMakerCreateTrainingJob;
/**
* A Step Functions Task using JSONata to create a SageMaker training job.
*/
static jsonata(scope: Construct, id: string, props: SageMakerCreateTrainingJobJsonataProps): SageMakerCreateTrainingJob;
private static readonly SUPPORTED_INTEGRATION_PATTERNS;
/**
* Allows specify security group connections for instances of this fleet.
*/
readonly connections: ec2.Connections;
protected readonly taskPolicies?: iam.PolicyStatement[];
protected readonly taskMetrics?: sfn.TaskMetricsConfig;
/**
* The Algorithm Specification
*/
private readonly algorithmSpecification;
/**
* The Input Data Config.
*/
private readonly inputDataConfig?;
/**
* The resource config for the task.
*/
private readonly resourceConfig;
/**
* The resource config for the task.
*/
private readonly stoppingCondition;
private readonly vpc?;
private securityGroup?;
private readonly _securityGroups;
private readonly subnets?;
private readonly integrationPattern;
private _role?;
private _grantPrincipal?;
constructor(scope: Construct, id: string, props: SageMakerCreateTrainingJobProps);
/**
* The execution role for the Sagemaker training job.
*
* Only available after task has been added to a state machine.
*/
get role(): iam.IRole;
get grantPrincipal(): iam.IPrincipal;
/**
* Add the security group to all instances via the launch configuration
* security groups array.
*
* @param securityGroup: The security group to add
*/
addSecurityGroup(securityGroup: ec2.ISecurityGroup): void;
/**
* @internal
*/
protected _renderTask(topLevelQueryLanguage?: sfn.QueryLanguage): any;
private renderParameters;
private renderAlgorithmSpecification;
private renderInputDataConfig;
private renderOutputDataConfig;
private renderResourceConfig;
private renderStoppingCondition;
private renderHyperparameters;
private renderVpcConfig;
private validateAlgorithmName;
private makePolicyStatements;
}
export {};

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,136 @@
import type { Construct } from 'constructs';
import type { BatchStrategy, ModelClientOptions, TransformInput, TransformOutput, TransformResources } from './base-types';
import * as iam from '../../../aws-iam';
import * as sfn from '../../../aws-stepfunctions';
import type { Size } from '../../../core';
interface SageMakerCreateTransformJobOptions {
/**
* Transform Job Name.
*/
readonly transformJobName: string;
/**
* Role for the Transform Job.
*
* @default - A role is created with `AmazonSageMakerFullAccess` managed policy
*/
readonly role?: iam.IRole;
/**
* Number of records to include in a mini-batch for an HTTP inference request.
*
* @default - No batch strategy
*/
readonly batchStrategy?: BatchStrategy;
/**
* Environment variables to set in the Docker container.
*
* @default - No environment variables
*/
readonly environment?: {
[key: string]: string;
};
/**
* Maximum number of parallel requests that can be sent to each instance in a transform job.
*
* @default - Amazon SageMaker checks the optional execution-parameters to determine the settings for your chosen algorithm.
* If the execution-parameters endpoint is not enabled, the default value is 1.
*/
readonly maxConcurrentTransforms?: number;
/**
* Maximum allowed size of the payload, in MB.
*
* @default 6
*/
readonly maxPayload?: Size;
/**
* Name of the model that you want to use for the transform job.
*/
readonly modelName: string;
/**
* Configures the timeout and maximum number of retries for processing a transform job invocation.
*
* @default - 0 retries and 60 seconds of timeout
*/
readonly modelClientOptions?: ModelClientOptions;
/**
* Tags to be applied to the train job.
*
* @default - No tags
*/
readonly tags?: {
[key: string]: string;
};
/**
* Dataset to be transformed and the Amazon S3 location where it is stored.
*/
readonly transformInput: TransformInput;
/**
* S3 location where you want Amazon SageMaker to save the results from the transform job.
*/
readonly transformOutput: TransformOutput;
/**
* ML compute instances for the transform job.
*
* @default - 1 instance of type M4.XLarge
*/
readonly transformResources?: TransformResources;
}
/**
* Properties for creating an Amazon SageMaker transform job task using JSONPath
*/
export interface SageMakerCreateTransformJobJsonPathProps extends sfn.TaskStateJsonPathBaseProps, SageMakerCreateTransformJobOptions {
}
/**
* Properties for creating an Amazon SageMaker transform job task using JSONata
*/
export interface SageMakerCreateTransformJobJsonataProps extends sfn.TaskStateJsonataBaseProps, SageMakerCreateTransformJobOptions {
}
/**
* Properties for creating an Amazon SageMaker transform job task
*/
export interface SageMakerCreateTransformJobProps extends sfn.TaskStateBaseProps, SageMakerCreateTransformJobOptions {
}
/**
* Class representing the SageMaker Create Transform Job task.
*/
export declare class SageMakerCreateTransformJob extends sfn.TaskStateBase {
private readonly props;
/**
* Class representing the SageMaker Create Transform Job task using JSONPath.
*/
static jsonPath(scope: Construct, id: string, props: SageMakerCreateTransformJobJsonPathProps): SageMakerCreateTransformJob;
/**
* Class representing the SageMaker Create Transform Job task using JSONata.
*/
static jsonata(scope: Construct, id: string, props: SageMakerCreateTransformJobJsonataProps): SageMakerCreateTransformJob;
private static readonly SUPPORTED_INTEGRATION_PATTERNS;
protected readonly taskPolicies?: iam.PolicyStatement[];
protected readonly taskMetrics?: sfn.TaskMetricsConfig;
/**
* Dataset to be transformed and the Amazon S3 location where it is stored.
*/
private readonly transformInput;
/**
* ML compute instances for the transform job.
*/
private readonly transformResources;
private readonly integrationPattern;
private _role?;
constructor(scope: Construct, id: string, props: SageMakerCreateTransformJobProps);
/**
* @internal
*/
protected _renderTask(topLevelQueryLanguage?: sfn.QueryLanguage): any;
/**
* The execution role for the Sagemaker transform job.
*
* Only available after task has been added to a state machine.
*/
get role(): iam.IRole;
private renderParameters;
private renderModelClientOptions;
private renderTransformInput;
private renderTransformOutput;
private renderTransformResources;
private makePolicyStatements;
}
export {};

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,10 @@
export declare function renderTags(tags: {
[key: string]: any;
} | undefined): {
[key: string]: any;
};
export declare function renderEnvironment(environment: {
[key: string]: any;
} | undefined): {
[key: string]: any;
};

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.renderTags=renderTags,exports.renderEnvironment=renderEnvironment;function renderTags(tags){return tags?{Tags:Object.keys(tags).map(key=>({Key:key,Value:tags[key]}))}:{}}function renderEnvironment(environment){return environment?{Environment:environment}:{}}

View File

@@ -0,0 +1,66 @@
import type { Construct } from 'constructs';
import * as iam from '../../../aws-iam';
import * as sfn from '../../../aws-stepfunctions';
interface SageMakerUpdateEndpointOptions {
/**
* The name of the new endpoint configuration
*/
readonly endpointConfigName: string;
/**
* The name of the endpoint whose configuration you want to update.
*/
readonly endpointName: string;
}
/**
* Properties for updating Amazon SageMaker endpoint using JSONPath
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-sagemaker.html
*/
export interface SageMakerUpdateEndpointJsonPathProps extends sfn.TaskStateJsonPathBaseProps, SageMakerUpdateEndpointOptions {
}
/**
* Properties for updating Amazon SageMaker endpoint using JSONata
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-sagemaker.html
*/
export interface SageMakerUpdateEndpointJsonataProps extends sfn.TaskStateJsonataBaseProps, SageMakerUpdateEndpointOptions {
}
/**
* Properties for updating Amazon SageMaker endpoint
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-sagemaker.html
*/
export interface SageMakerUpdateEndpointProps extends sfn.TaskStateBaseProps, SageMakerUpdateEndpointOptions {
}
/**
* A Step Functions Task to update a SageMaker endpoint
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-sagemaker.html
*/
export declare class SageMakerUpdateEndpoint extends sfn.TaskStateBase {
private readonly props;
/**
* A Step Functions Task using JSONPath to update a SageMaker endpoint
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-sagemaker.html
*/
static jsonPath(scope: Construct, id: string, props: SageMakerUpdateEndpointJsonPathProps): SageMakerUpdateEndpoint;
/**
* A Step Functions Task using JSONata to update a SageMaker endpoint
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-sagemaker.html
*/
static jsonata(scope: Construct, id: string, props: SageMakerUpdateEndpointJsonataProps): SageMakerUpdateEndpoint;
private static readonly SUPPORTED_INTEGRATION_PATTERNS;
protected readonly taskMetrics?: sfn.TaskMetricsConfig;
protected readonly taskPolicies?: iam.PolicyStatement[];
private readonly integrationPattern;
constructor(scope: Construct, id: string, props: SageMakerUpdateEndpointProps);
/**
* @internal
*/
protected _renderTask(topLevelQueryLanguage?: sfn.QueryLanguage): any;
private renderParameters;
private makePolicyStatements;
}
export {};

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SageMakerUpdateEndpoint=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var iam=()=>{var tmp=require("../../../aws-iam");return iam=()=>tmp,tmp},sfn=()=>{var tmp=require("../../../aws-stepfunctions");return sfn=()=>tmp,tmp},cdk=()=>{var tmp=require("../../../core");return cdk=()=>tmp,tmp},task_utils_1=()=>{var tmp=require("../private/task-utils");return task_utils_1=()=>tmp,tmp};class SageMakerUpdateEndpoint extends sfn().TaskStateBase{props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_stepfunctions_tasks.SageMakerUpdateEndpoint",version:"2.252.0"};static jsonPath(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_SageMakerUpdateEndpointJsonPathProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.jsonPath),error}return new SageMakerUpdateEndpoint(scope,id,props)}static jsonata(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_SageMakerUpdateEndpointJsonataProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.jsonata),error}return new SageMakerUpdateEndpoint(scope,id,{...props,queryLanguage:sfn().QueryLanguage.JSONATA})}static SUPPORTED_INTEGRATION_PATTERNS=[sfn().IntegrationPattern.REQUEST_RESPONSE];taskMetrics;taskPolicies;integrationPattern;constructor(scope,id,props){super(scope,id,props),this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_SageMakerUpdateEndpointProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,SageMakerUpdateEndpoint),error}this.integrationPattern=props.integrationPattern||sfn().IntegrationPattern.REQUEST_RESPONSE,(0,task_utils_1().validatePatternSupported)(this.integrationPattern,SageMakerUpdateEndpoint.SUPPORTED_INTEGRATION_PATTERNS),this.taskPolicies=this.makePolicyStatements()}_renderTask(topLevelQueryLanguage){const queryLanguage=sfn()._getActualQueryLanguage(topLevelQueryLanguage,this.props.queryLanguage);return{Resource:(0,task_utils_1().integrationResourceArn)("sagemaker","updateEndpoint",this.integrationPattern),...this._renderParametersOrArguments(this.renderParameters(),queryLanguage)}}renderParameters(){return{EndpointConfigName:this.props.endpointConfigName,EndpointName:this.props.endpointName}}makePolicyStatements(){const stack=cdk().Stack.of(this);return[new(iam()).PolicyStatement({actions:["sagemaker:updateEndpoint"],resources:[stack.formatArn({service:"sagemaker",resource:"endpoint",resourceName:(0,task_utils_1().isJsonPathOrJsonataExpression)(this.props.endpointName)?"*":`${this.props.endpointName.toLowerCase()}`}),stack.formatArn({service:"sagemaker",resource:"endpoint-config",resourceName:(0,task_utils_1().isJsonPathOrJsonataExpression)(this.props.endpointConfigName)?"*":`${this.props.endpointConfigName.toLowerCase()}`})]})]}}exports.SageMakerUpdateEndpoint=SageMakerUpdateEndpoint;