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,13 @@
{
"targets": {
"java": {
"package": "software.amazon.awscdk.services.stepfunctions.tasks"
},
"dotnet": {
"namespace": "Amazon.CDK.AWS.StepFunctions.Tasks"
},
"python": {
"module": "aws_cdk.aws_stepfunctions_tasks"
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1 @@
export * from './lib';

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,78 @@
import type * as sfn from '../../../aws-stepfunctions';
/** Http Methods that API Gateway supports */
export declare enum HttpMethod {
/** Retrieve data from a server at the specified resource */
GET = "GET",
/** Send data to the API endpoint to create or udpate a resource */
POST = "POST",
/** Send data to the API endpoint to update or create a resource */
PUT = "PUT",
/** Delete the resource at the specified endpoint */
DELETE = "DELETE",
/** Apply partial modifications to the resource */
PATCH = "PATCH",
/** Retrieve data from a server at the specified resource without the response body */
HEAD = "HEAD",
/** Return data describing what other methods and operations the server supports */
OPTIONS = "OPTIONS"
}
/**
* The authentication method used to call the endpoint
*/
export declare enum AuthType {
/** Call the API direclty with no authorization method */
NO_AUTH = "NO_AUTH",
/** Use the IAM role associated with the current state machine for authorization */
IAM_ROLE = "IAM_ROLE",
/** Use the resource policy of the API for authorization */
RESOURCE_POLICY = "RESOURCE_POLICY"
}
/**
* Base CallApiGatewayEdnpoint Task Props
*/
export interface CallApiGatewayEndpointBaseOptions {
/**
* Http method for the API
*/
readonly method: HttpMethod;
/**
* HTTP request information that does not relate to contents of the request
* @default - No headers
*/
readonly headers?: sfn.TaskInput;
/**
* Path parameters appended after API endpoint
* @default - No path
*/
readonly apiPath?: string;
/**
* Query strings attached to end of request
* @default - No query parameters
*/
readonly queryParameters?: sfn.TaskInput;
/**
* HTTP Request body
* @default - No request body
*/
readonly requestBody?: sfn.TaskInput;
/**
* Authentication methods
* @default AuthType.NO_AUTH
*/
readonly authType?: AuthType;
}
/**
* Base CallApiGatewayEndpoint Task Props
*/
export interface CallApiGatewayEndpointJsonPathBaseProps extends sfn.TaskStateJsonPathBaseProps, CallApiGatewayEndpointBaseOptions {
}
/**
* Base CallApiGatewayEndpoint Task Props
*/
export interface CallApiGatewayEndpointJsonataBaseProps extends sfn.TaskStateJsonataBaseProps, CallApiGatewayEndpointBaseOptions {
}
/**
* Base CallApiGatewayEndpoint Task Props
*/
export interface CallApiGatewayEndpointBaseProps extends sfn.TaskStateBaseProps, CallApiGatewayEndpointBaseOptions {
}

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.AuthType=exports.HttpMethod=void 0;var HttpMethod;(function(HttpMethod2){HttpMethod2.GET="GET",HttpMethod2.POST="POST",HttpMethod2.PUT="PUT",HttpMethod2.DELETE="DELETE",HttpMethod2.PATCH="PATCH",HttpMethod2.HEAD="HEAD",HttpMethod2.OPTIONS="OPTIONS"})(HttpMethod||(exports.HttpMethod=HttpMethod={}));var AuthType;(function(AuthType2){AuthType2.NO_AUTH="NO_AUTH",AuthType2.IAM_ROLE="IAM_ROLE",AuthType2.RESOURCE_POLICY="RESOURCE_POLICY"})(AuthType||(exports.AuthType=AuthType={}));

View File

@@ -0,0 +1,22 @@
import type { Construct } from 'constructs';
import type { CallApiGatewayEndpointBaseProps } from './base-types';
import * as iam from '../../../aws-iam';
import * as sfn from '../../../aws-stepfunctions';
/**
* Base CallApiGatewayEndpoint Task
* @internal
*/
export declare abstract class CallApiGatewayEndpointBase extends sfn.TaskStateBase {
private static readonly SUPPORTED_INTEGRATION_PATTERNS;
private readonly baseProps;
private readonly integrationPattern;
protected abstract readonly apiEndpoint: string;
protected abstract readonly arnForExecuteApi: string;
protected abstract readonly stageName?: string;
constructor(scope: Construct, id: string, props: CallApiGatewayEndpointBaseProps);
/**
* @internal
*/
protected _renderTask(topLevelQueryLanguage?: sfn.QueryLanguage): any;
protected createPolicyStatements(): iam.PolicyStatement[];
}

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CallApiGatewayEndpointBase=void 0;var base_types_1=()=>{var tmp=require("./base-types");return base_types_1=()=>tmp,tmp},iam=()=>{var tmp=require("../../../aws-iam");return iam=()=>tmp,tmp},sfn=()=>{var tmp=require("../../../aws-stepfunctions");return sfn=()=>tmp,tmp},core_1=()=>{var tmp=require("../../../core");return core_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp},task_utils_1=()=>{var tmp=require("../private/task-utils");return task_utils_1=()=>tmp,tmp};class CallApiGatewayEndpointBase extends sfn().TaskStateBase{static SUPPORTED_INTEGRATION_PATTERNS=[sfn().IntegrationPattern.REQUEST_RESPONSE,sfn().IntegrationPattern.WAIT_FOR_TASK_TOKEN];baseProps;integrationPattern;constructor(scope,id,props){if(super(scope,id,props),this.baseProps=props,this.integrationPattern=props.integrationPattern??sfn().IntegrationPattern.REQUEST_RESPONSE,(0,task_utils_1().validatePatternSupported)(this.integrationPattern,CallApiGatewayEndpointBase.SUPPORTED_INTEGRATION_PATTERNS),this.integrationPattern===sfn().IntegrationPattern.WAIT_FOR_TASK_TOKEN&&!sfn().FieldUtils.containsTaskToken(this.baseProps.headers))throw new(core_1()).ValidationError((0,literal_string_1().lit)`IsRequiredTaskTokenRequired`,"Task Token is required in `headers` for WAIT_FOR_TASK_TOKEN pattern. Use JsonPath.taskToken to set the token.",this)}_renderTask(topLevelQueryLanguage){const queryLanguage=sfn()._getActualQueryLanguage(topLevelQueryLanguage,this.baseProps.queryLanguage);return{Resource:(0,task_utils_1().integrationResourceArn)("apigateway","invoke",this.integrationPattern),...this._renderParametersOrArguments({ApiEndpoint:this.apiEndpoint,Method:this.baseProps.method,Headers:this.baseProps.headers?.value,Stage:this.stageName,Path:this.baseProps.apiPath,QueryParameters:this.baseProps.queryParameters?.value,RequestBody:this.baseProps.requestBody?.value,AuthType:this.baseProps.authType?this.baseProps.authType:"NO_AUTH"},queryLanguage)}}createPolicyStatements(){return this.baseProps.authType===base_types_1().AuthType.NO_AUTH?[]:[new(iam()).PolicyStatement({resources:[this.arnForExecuteApi],actions:["execute-api:Invoke"]})]}}exports.CallApiGatewayEndpointBase=CallApiGatewayEndpointBase;

View File

@@ -0,0 +1,71 @@
import type { Construct } from 'constructs';
import { CallApiGatewayEndpointBase } from './base';
import type { CallApiGatewayEndpointBaseProps, CallApiGatewayEndpointJsonataBaseProps, CallApiGatewayEndpointJsonPathBaseProps } from './base-types';
import type * as iam from '../../../aws-iam';
import * as sfn from '../../../aws-stepfunctions';
import * as cdk from '../../../core';
/**
* Base properties for calling an HTTP API Endpoint
*/
export interface CallApiGatewayHttpApiEndpointOptions {
/**
* The Id of the API to call
*/
readonly apiId: string;
/**
* The Stack in which the API is defined
*/
readonly apiStack: cdk.Stack;
/**
* Name of the stage where the API is deployed to in API Gateway
* @default '$default'
*/
readonly stageName?: string;
}
/**
* Properties for calling an HTTP API Endpoint using JSONPath
*/
export interface CallApiGatewayHttpApiEndpointJsonPathProps extends CallApiGatewayEndpointJsonPathBaseProps, CallApiGatewayHttpApiEndpointOptions {
}
/**
* Properties for calling an HTTP API Endpoint using JSONata
*/
export interface CallApiGatewayHttpApiEndpointJsonataProps extends CallApiGatewayEndpointJsonataBaseProps, CallApiGatewayHttpApiEndpointOptions {
}
/**
* Properties for calling an HTTP API Endpoint
*/
export interface CallApiGatewayHttpApiEndpointProps extends CallApiGatewayEndpointBaseProps, CallApiGatewayHttpApiEndpointOptions {
}
/**
* Call HTTP API endpoint as a Task
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-api-gateway.html
*/
export declare class CallApiGatewayHttpApiEndpoint extends CallApiGatewayEndpointBase {
private readonly props;
/**
* Uniquely identifies this class.
*/
static readonly PROPERTY_INJECTION_ID: string;
/**
* Call HTTP API endpoint as a Task using JSONPath
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-api-gateway.html
*/
static jsonPath(scope: Construct, id: string, props: CallApiGatewayHttpApiEndpointJsonPathProps): CallApiGatewayHttpApiEndpoint;
/**
* Call HTTP API endpoint as a Task using JSONata
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-api-gateway.html
*/
static jsonata(scope: Construct, id: string, props: CallApiGatewayHttpApiEndpointJsonataProps): CallApiGatewayHttpApiEndpoint;
protected readonly taskMetrics?: sfn.TaskMetricsConfig | undefined;
protected readonly taskPolicies?: iam.PolicyStatement[] | undefined;
protected readonly apiEndpoint: string;
protected readonly arnForExecuteApi: string;
protected readonly stageName?: string;
constructor(scope: Construct, id: string, props: CallApiGatewayHttpApiEndpointProps);
private getApiEndpoint;
private getArnForExecuteApi;
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,128 @@
import type { Construct } from 'constructs';
import { CallApiGatewayEndpointBase } from './base';
import type { CallApiGatewayEndpointBaseProps, CallApiGatewayEndpointJsonataBaseProps, CallApiGatewayEndpointJsonPathBaseProps } from './base-types';
import type * as apigateway from '../../../aws-apigateway';
import type * as iam from '../../../aws-iam';
import * as sfn from '../../../aws-stepfunctions';
/**
* Base properties for calling an REST API Endpoint
*/
export interface CallApiGatewayRestApiEndpointOptions {
/**
* API to call
*/
readonly api: apigateway.IRestApi;
/**
* Name of the stage where the API is deployed to in API Gateway
*/
readonly stageName: string;
/**
* Specify a custom Region where the API is deployed, e.g. 'us-east-1'.
*
* @default - Uses the Region of the stack containing the `api`.
*/
readonly region?: string;
}
/**
* Properties for calling an REST API Endpoint using JSONPath
*/
export interface CallApiGatewayRestApiEndpointJsonPathProps extends CallApiGatewayEndpointJsonPathBaseProps, CallApiGatewayRestApiEndpointOptions {
}
/**
* Properties for calling an REST API Endpoint using JSONata
*/
export interface CallApiGatewayRestApiEndpointJsonataProps extends CallApiGatewayEndpointJsonataBaseProps, CallApiGatewayRestApiEndpointOptions {
}
/**
* Properties for calling an REST API Endpoint
*/
export interface CallApiGatewayRestApiEndpointProps extends CallApiGatewayEndpointBaseProps, CallApiGatewayRestApiEndpointOptions {
}
/**
* Call REST API endpoint as a Task
*
* Be aware that the header values must be arrays. When passing the Task Token
* in the headers field `WAIT_FOR_TASK_TOKEN` integration, use
* `JsonPath.array()` to wrap the token in an array:
*
* ```ts
* import * as apigateway from 'aws-cdk-lib/aws-apigateway';
* declare const api: apigateway.RestApi;
*
* new tasks.CallApiGatewayRestApiEndpoint(this, 'Endpoint', {
* api,
* stageName: 'Stage',
* method: tasks.HttpMethod.PUT,
* integrationPattern: sfn.IntegrationPattern.WAIT_FOR_TASK_TOKEN,
* headers: sfn.TaskInput.fromObject({
* TaskToken: sfn.JsonPath.array(sfn.JsonPath.taskToken),
* }),
* });
* ```
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-api-gateway.html
*/
export declare class CallApiGatewayRestApiEndpoint extends CallApiGatewayEndpointBase {
private readonly props;
/**
* Uniquely identifies this class.
*/
static readonly PROPERTY_INJECTION_ID: string;
/**
* Call REST API endpoint as a Task using JSONPath
*
* Be aware that the header values must be arrays. When passing the Task Token
* in the headers field `WAIT_FOR_TASK_TOKEN` integration, use
* `JsonPath.array()` to wrap the token in an array:
*
* ```ts
* import * as apigateway from 'aws-cdk-lib/aws-apigateway';
* declare const api: apigateway.RestApi;
*
* tasks.CallApiGatewayRestApiEndpoint.jsonPath(this, 'Endpoint', {
* api,
* stageName: 'Stage',
* method: tasks.HttpMethod.PUT,
* integrationPattern: sfn.IntegrationPattern.WAIT_FOR_TASK_TOKEN,
* headers: sfn.TaskInput.fromObject({
* TaskToken: sfn.JsonPath.array(sfn.JsonPath.taskToken),
* }),
* });
* ```
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-api-gateway.html
*/
static jsonPath(scope: Construct, id: string, props: CallApiGatewayRestApiEndpointJsonPathProps): CallApiGatewayRestApiEndpoint;
/**
* Call REST API endpoint as a Task using JSONata
*
* Be aware that the header values must be arrays. When passing the Task Token
* in the headers field `WAIT_FOR_TASK_TOKEN` integration, use
* `JsonPath.array()` to wrap the token in an array:
*
* ```ts
* import * as apigateway from 'aws-cdk-lib/aws-apigateway';
* declare const api: apigateway.RestApi;
*
* tasks.CallApiGatewayRestApiEndpoint.jsonata(this, 'Endpoint', {
* api,
* stageName: 'Stage',
* method: tasks.HttpMethod.PUT,
* integrationPattern: sfn.IntegrationPattern.WAIT_FOR_TASK_TOKEN,
* headers: sfn.TaskInput.fromObject({
* TaskToken: '{% States.Array($states.context.taskToken) %}',
* }),
* });
* ```
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-api-gateway.html
*/
static jsonata(scope: Construct, id: string, props: CallApiGatewayRestApiEndpointJsonataProps): CallApiGatewayRestApiEndpoint;
protected readonly taskMetrics?: sfn.TaskMetricsConfig | undefined;
protected readonly taskPolicies?: iam.PolicyStatement[] | undefined;
protected readonly apiEndpoint: string;
protected readonly arnForExecuteApi: string;
protected readonly stageName?: string;
constructor(scope: Construct, id: string, props: CallApiGatewayRestApiEndpointProps);
private getApiEndpoint;
}

View File

@@ -0,0 +1 @@
"use strict";var __esDecorate=exports&&exports.__esDecorate||function(ctor,descriptorIn,decorators,contextIn,initializers,extraInitializers){function accept(f){if(f!==void 0&&typeof f!="function")throw new TypeError("Function expected");return f}for(var kind=contextIn.kind,key=kind==="getter"?"get":kind==="setter"?"set":"value",target=!descriptorIn&&ctor?contextIn.static?ctor:ctor.prototype:null,descriptor=descriptorIn||(target?Object.getOwnPropertyDescriptor(target,contextIn.name):{}),_,done=!1,i=decorators.length-1;i>=0;i--){var context={};for(var p in contextIn)context[p]=p==="access"?{}:contextIn[p];for(var p in contextIn.access)context.access[p]=contextIn.access[p];context.addInitializer=function(f){if(done)throw new TypeError("Cannot add initializers after decoration has completed");extraInitializers.push(accept(f||null))};var result=(0,decorators[i])(kind==="accessor"?{get:descriptor.get,set:descriptor.set}:descriptor[key],context);if(kind==="accessor"){if(result===void 0)continue;if(result===null||typeof result!="object")throw new TypeError("Object expected");(_=accept(result.get))&&(descriptor.get=_),(_=accept(result.set))&&(descriptor.set=_),(_=accept(result.init))&&initializers.unshift(_)}else(_=accept(result))&&(kind==="field"?initializers.unshift(_):descriptor[key]=_)}target&&Object.defineProperty(target,contextIn.name,descriptor),done=!0},__runInitializers=exports&&exports.__runInitializers||function(thisArg,initializers,value){for(var useValue=arguments.length>2,i=0;i<initializers.length;i++)value=useValue?initializers[i].call(thisArg,value):initializers[i].call(thisArg);return useValue?value:void 0};Object.defineProperty(exports,"__esModule",{value:!0}),exports.CallApiGatewayRestApiEndpoint=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var base_1=()=>{var tmp=require("./base");return base_1=()=>tmp,tmp},sfn=()=>{var tmp=require("../../../aws-stepfunctions");return sfn=()=>tmp,tmp},cdk=()=>{var tmp=require("../../../core");return cdk=()=>tmp,tmp},prop_injectable_1=()=>{var tmp=require("../../../core/lib/prop-injectable");return prop_injectable_1=()=>tmp,tmp};let CallApiGatewayRestApiEndpoint=(()=>{let _classDecorators=[prop_injectable_1().propertyInjectable],_classDescriptor,_classExtraInitializers=[],_classThis,_classSuper=base_1().CallApiGatewayEndpointBase;var CallApiGatewayRestApiEndpoint2=class extends _classSuper{static{_classThis=this}static{const _metadata=typeof Symbol=="function"&&Symbol.metadata?Object.create(_classSuper[Symbol.metadata]??null):void 0;__esDecorate(null,_classDescriptor={value:_classThis},_classDecorators,{kind:"class",name:_classThis.name,metadata:_metadata},null,_classExtraInitializers),CallApiGatewayRestApiEndpoint2=_classThis=_classDescriptor.value,_metadata&&Object.defineProperty(_classThis,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:_metadata})}props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_stepfunctions_tasks.CallApiGatewayRestApiEndpoint",version:"2.252.0"};static PROPERTY_INJECTION_ID="aws-cdk-lib.aws-stepfunctions-tasks.CallApiGatewayRestApiEndpoint";static jsonPath(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_CallApiGatewayRestApiEndpointJsonPathProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.jsonPath),error}return new CallApiGatewayRestApiEndpoint2(scope,id,props)}static jsonata(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_CallApiGatewayRestApiEndpointJsonataProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.jsonata),error}return new CallApiGatewayRestApiEndpoint2(scope,id,{...props,queryLanguage:sfn().QueryLanguage.JSONATA})}taskMetrics;taskPolicies;apiEndpoint;arnForExecuteApi;stageName;constructor(scope,id,props){super(scope,id,props),this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_CallApiGatewayRestApiEndpointProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CallApiGatewayRestApiEndpoint2),error}this.apiEndpoint=this.getApiEndpoint(props.region),this.arnForExecuteApi=props.api.arnForExecuteApi(props.method,props.apiPath,props.stageName),this.stageName=props.stageName,this.taskPolicies=this.createPolicyStatements()}getApiEndpoint(region){const apiStack=cdk().Stack.of(this.props.api);return`${this.props.api.restApiId}.execute-api.${region??apiStack.region}.${apiStack.urlSuffix}`}static{__runInitializers(_classThis,_classExtraInitializers)}};return CallApiGatewayRestApiEndpoint2=_classThis})();exports.CallApiGatewayRestApiEndpoint=CallApiGatewayRestApiEndpoint;

View File

@@ -0,0 +1,3 @@
export * from './base-types';
export * from './call-rest-api';
export * from './call-http-api';

View File

@@ -0,0 +1 @@
"use strict";var __createBinding=exports&&exports.__createBinding||(Object.create?(function(o,m,k,k2){k2===void 0&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);(!desc||("get"in desc?!m.__esModule:desc.writable||desc.configurable))&&(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}):(function(o,m,k,k2){k2===void 0&&(k2=k),o[k2]=m[k]})),__exportStar=exports&&exports.__exportStar||function(m,exports2){for(var p in m)p!=="default"&&!Object.prototype.hasOwnProperty.call(exports2,p)&&__createBinding(exports2,m,p)};Object.defineProperty(exports,"__esModule",{value:!0});var _noFold;exports.HttpMethod=void 0,Object.defineProperty(exports,_noFold="HttpMethod",{enumerable:!0,configurable:!0,get:()=>{var value=require("./base-types").HttpMethod;return Object.defineProperty(exports,_noFold="HttpMethod",{enumerable:!0,configurable:!0,value}),value}}),exports.AuthType=void 0,Object.defineProperty(exports,_noFold="AuthType",{enumerable:!0,configurable:!0,get:()=>{var value=require("./base-types").AuthType;return Object.defineProperty(exports,_noFold="AuthType",{enumerable:!0,configurable:!0,value}),value}}),exports.CallApiGatewayRestApiEndpoint=void 0,Object.defineProperty(exports,_noFold="CallApiGatewayRestApiEndpoint",{enumerable:!0,configurable:!0,get:()=>{var value=require("./call-rest-api").CallApiGatewayRestApiEndpoint;return Object.defineProperty(exports,_noFold="CallApiGatewayRestApiEndpoint",{enumerable:!0,configurable:!0,value}),value}}),exports.CallApiGatewayHttpApiEndpoint=void 0,Object.defineProperty(exports,_noFold="CallApiGatewayHttpApiEndpoint",{enumerable:!0,configurable:!0,get:()=>{var value=require("./call-http-api").CallApiGatewayHttpApiEndpoint;return Object.defineProperty(exports,_noFold="CallApiGatewayHttpApiEndpoint",{enumerable:!0,configurable:!0,value}),value}});

View File

@@ -0,0 +1,57 @@
import type { Construct } from 'constructs';
import * as iam from '../../../aws-iam';
import * as sfn from '../../../aws-stepfunctions';
interface AthenaGetQueryExecutionOptions {
/**
* Query that will be retrieved
*
* Example value: `adfsaf-23trf23-f23rt23`
*/
readonly queryExecutionId: string;
}
/**
* Properties for getting a Query Execution using JSONPath
*/
export interface AthenaGetQueryExecutionJsonPathProps extends sfn.TaskStateJsonPathBaseProps, AthenaGetQueryExecutionOptions {
}
/**
* Properties for getting a Query Execution using JSONata
*/
export interface AthenaGetQueryExecutionJsonataProps extends sfn.TaskStateJsonataBaseProps, AthenaGetQueryExecutionOptions {
}
/**
* Properties for getting a Query Execution
*/
export interface AthenaGetQueryExecutionProps extends sfn.TaskStateBaseProps, AthenaGetQueryExecutionOptions {
}
/**
* Get an Athena Query Execution as a Task
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-athena.html
*/
export declare class AthenaGetQueryExecution extends sfn.TaskStateBase {
private readonly props;
/**
* Get an Athena Query Execution as a Task that using JSONPath
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-athena.html
*/
static jsonPath(scope: Construct, id: string, props: AthenaGetQueryExecutionJsonPathProps): AthenaGetQueryExecution;
/**
* Get an Athena Query Execution as a Task that using JSONata
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-athena.html
*/
static jsonata(scope: Construct, id: string, props: AthenaGetQueryExecutionJsonataProps): AthenaGetQueryExecution;
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: AthenaGetQueryExecutionProps);
/**
* Provides the Athena get query execution service integration task configuration
* @internal
*/
protected _renderTask(topLevelQueryLanguage?: sfn.QueryLanguage): any;
}
export {};

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.AthenaGetQueryExecution=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},task_utils_1=()=>{var tmp=require("../private/task-utils");return task_utils_1=()=>tmp,tmp};class AthenaGetQueryExecution extends sfn().TaskStateBase{props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_stepfunctions_tasks.AthenaGetQueryExecution",version:"2.252.0"};static jsonPath(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_AthenaGetQueryExecutionJsonPathProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.jsonPath),error}return new AthenaGetQueryExecution(scope,id,props)}static jsonata(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_AthenaGetQueryExecutionJsonataProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.jsonata),error}return new AthenaGetQueryExecution(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_AthenaGetQueryExecutionProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,AthenaGetQueryExecution),error}this.integrationPattern=props.integrationPattern??sfn().IntegrationPattern.REQUEST_RESPONSE,(0,task_utils_1().validatePatternSupported)(this.integrationPattern,AthenaGetQueryExecution.SUPPORTED_INTEGRATION_PATTERNS),this.taskPolicies=[new(iam()).PolicyStatement({resources:["*"],actions:["athena:getQueryExecution"]})]}_renderTask(topLevelQueryLanguage){const queryLanguage=sfn()._getActualQueryLanguage(topLevelQueryLanguage,this.props.queryLanguage);return{Resource:(0,task_utils_1().integrationResourceArn)("athena","getQueryExecution",this.integrationPattern),...this._renderParametersOrArguments({QueryExecutionId:this.props.queryExecutionId},queryLanguage)}}}exports.AthenaGetQueryExecution=AthenaGetQueryExecution;

View File

@@ -0,0 +1,69 @@
import type { Construct } from 'constructs';
import * as iam from '../../../aws-iam';
import * as sfn from '../../../aws-stepfunctions';
interface AthenaGetQueryResultsOptions {
/**
* Query that will be retrieved
*
* Example value: `adfsaf-23trf23-f23rt23`
*/
readonly queryExecutionId: string;
/**
* Pagination token
*
* @default - No next token
*/
readonly nextToken?: string;
/**
* Max number of results
*
* @default 1000
*/
readonly maxResults?: number;
}
/**
* Properties for getting a Query Results using JSONPath
*/
export interface AthenaGetQueryResultsJsonPathProps extends sfn.TaskStateJsonPathBaseProps, AthenaGetQueryResultsOptions {
}
/**
* Properties for getting a Query Results using JSONata
*/
export interface AthenaGetQueryResultsJsonataProps extends sfn.TaskStateJsonataBaseProps, AthenaGetQueryResultsOptions {
}
/**
* Properties for getting a Query Results
*/
export interface AthenaGetQueryResultsProps extends sfn.TaskStateBaseProps, AthenaGetQueryResultsOptions {
}
/**
* Get an Athena Query Results as a Task
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-athena.html
*/
export declare class AthenaGetQueryResults extends sfn.TaskStateBase {
private readonly props;
/**
* Get an Athena Query Results as a Task that using JSONPath
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-athena.html
*/
static jsonPath(scope: Construct, id: string, props: AthenaGetQueryResultsJsonPathProps): AthenaGetQueryResults;
/**
* Get an Athena Query Results as a Task that using JSONata
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-athena.html
*/
static jsonata(scope: Construct, id: string, props: AthenaGetQueryResultsJsonataProps): AthenaGetQueryResults;
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: AthenaGetQueryResultsProps);
/**
* Provides the Athena get query results service integration task configuration
* @internal
*/
protected _renderTask(topLevelQueryLanguage?: sfn.QueryLanguage): any;
}
export {};

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.AthenaGetQueryResults=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},task_utils_1=()=>{var tmp=require("../private/task-utils");return task_utils_1=()=>tmp,tmp};class AthenaGetQueryResults extends sfn().TaskStateBase{props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_stepfunctions_tasks.AthenaGetQueryResults",version:"2.252.0"};static jsonPath(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_AthenaGetQueryResultsJsonPathProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.jsonPath),error}return new AthenaGetQueryResults(scope,id,props)}static jsonata(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_AthenaGetQueryResultsJsonataProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.jsonata),error}return new AthenaGetQueryResults(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_AthenaGetQueryResultsProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,AthenaGetQueryResults),error}this.integrationPattern=props.integrationPattern??sfn().IntegrationPattern.REQUEST_RESPONSE,(0,task_utils_1().validatePatternSupported)(this.integrationPattern,AthenaGetQueryResults.SUPPORTED_INTEGRATION_PATTERNS);const policyStatements=[new(iam()).PolicyStatement({resources:["*"],actions:["athena:getQueryResults"]})];policyStatements.push(new(iam()).PolicyStatement({actions:["s3:GetObject"],resources:["*"]})),this.taskPolicies=policyStatements}_renderTask(topLevelQueryLanguage){const queryLanguage=sfn()._getActualQueryLanguage(topLevelQueryLanguage,this.props.queryLanguage);return{Resource:(0,task_utils_1().integrationResourceArn)("athena","getQueryResults",this.integrationPattern),...this._renderParametersOrArguments({QueryExecutionId:this.props.queryExecutionId,NextToken:this.props.nextToken,MaxResults:this.props.maxResults},queryLanguage)}}}exports.AthenaGetQueryResults=AthenaGetQueryResults;

View File

@@ -0,0 +1,183 @@
import type { Construct } from 'constructs';
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 * as cdk from '../../../core';
interface AthenaStartQueryExecutionOptions {
/**
* Query that will be started
*/
readonly queryString: string;
/**
* Unique string string to ensure idempotence
*
* @default - No client request token
*/
readonly clientRequestToken?: string;
/**
* Database within which query executes
*
* @default - No query execution context
*/
readonly queryExecutionContext?: QueryExecutionContext;
/**
* Configuration on how and where to save query
*
* @default - No result configuration
*/
readonly resultConfiguration?: ResultConfiguration;
/**
* Configuration on how and where to save query
*
* @default - No work group
*/
readonly workGroup?: string;
/**
* A list of values for the parameters in a query.
*
* The values are applied sequentially to the parameters in the query in the order
* in which the parameters occur.
*
* @default - No parameters
*/
readonly executionParameters?: string[];
/**
* Specifies, in minutes, the maximum age of a previous query result that Athena should consider for reuse.
*
* @default - Query results are not reused
*/
readonly resultReuseConfigurationMaxAge?: cdk.Duration;
}
/**
* Properties for starting a Query Execution using JSONPath
*/
export interface AthenaStartQueryExecutionJsonPathProps extends sfn.TaskStateJsonPathBaseProps, AthenaStartQueryExecutionOptions {
}
/**
* Properties for starting a Query Execution using JSONata
*/
export interface AthenaStartQueryExecutionJsonataProps extends sfn.TaskStateJsonataBaseProps, AthenaStartQueryExecutionOptions {
}
/**
* Properties for starting a Query Execution
*/
export interface AthenaStartQueryExecutionProps extends sfn.TaskStateBaseProps, AthenaStartQueryExecutionOptions {
}
/**
* Start an Athena Query as a Task
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-athena.html
*/
export declare class AthenaStartQueryExecution extends sfn.TaskStateBase {
private readonly props;
/**
* Start an Athena Query as a Task using JSONPath
*/
static jsonPath(scope: Construct, id: string, props: AthenaStartQueryExecutionJsonPathProps): AthenaStartQueryExecution;
/**
* Start an Athena Query as a Task using JSONata
*/
static jsonata(scope: Construct, id: string, props: AthenaStartQueryExecutionJsonataProps): AthenaStartQueryExecution;
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: AthenaStartQueryExecutionProps);
private validateExecutionParameters;
private validateMaxAgeInMinutes;
private createPolicyStatements;
private renderEncryption;
/**
* Provides the Athena start query execution service integration task configuration
*/
/**
* @internal
*/
protected _renderTask(topLevelQueryLanguage?: sfn.QueryLanguage): any;
}
/**
* Location of query result along with S3 bucket configuration
*
* @see https://docs.aws.amazon.com/athena/latest/APIReference/API_ResultConfiguration.html
*/
export interface ResultConfiguration {
/**
* S3 path of query results
*
* Example value: `s3://query-results-bucket/folder/`
*
* @default - Query Result Location set in Athena settings for this workgroup
*/
readonly outputLocation?: s3.Location;
/**
* Encryption option used if enabled in S3
*
* @default - SSE_S3 encryption is enabled with default encryption key
*/
readonly encryptionConfiguration?: EncryptionConfiguration;
}
/**
* Encryption Configuration of the S3 bucket
*
* @see https://docs.aws.amazon.com/athena/latest/APIReference/API_EncryptionConfiguration.html
*/
export interface EncryptionConfiguration {
/**
* Type of S3 server-side encryption enabled
*
* @default EncryptionOption.S3_MANAGED
*/
readonly encryptionOption: EncryptionOption;
/**
* KMS key ARN or ID
*
* @default - No KMS key for Encryption Option SSE_S3 and default master key for Encryption Option SSE_KMS and CSE_KMS
*/
readonly encryptionKey?: kms.IKey;
}
/**
* Encryption Options of the S3 bucket
*
* @see https://docs.aws.amazon.com/athena/latest/APIReference/API_EncryptionConfiguration.html#athena-Type-EncryptionConfiguration-EncryptionOption
*/
export declare enum EncryptionOption {
/**
* Server side encryption (SSE) with an Amazon S3-managed key.
*
* @see https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html
*/
S3_MANAGED = "SSE_S3",
/**
* Server-side encryption (SSE) with an AWS KMS key managed by the account owner.
*
* @see https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html
*/
KMS = "SSE_KMS",
/**
* Client-side encryption (CSE) with an AWS KMS key managed by the account owner.
*
* @see https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingClientSideEncryption.html
*/
CLIENT_SIDE_KMS = "CSE_KMS"
}
/**
* Database and data catalog context in which the query execution occurs
*
* @see https://docs.aws.amazon.com/athena/latest/APIReference/API_QueryExecutionContext.html
*/
export interface QueryExecutionContext {
/**
* Name of catalog used in query execution
*
* @default - No catalog
*/
readonly catalogName?: string;
/**
* Name of database used in query execution
*
* @default - No database
*/
readonly databaseName?: string;
}
export {};

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,53 @@
import type { Construct } from 'constructs';
import * as iam from '../../../aws-iam';
import * as sfn from '../../../aws-stepfunctions';
interface AthenaStopQueryExecutionOptions {
/**
* Query that will be stopped
*/
readonly queryExecutionId: string;
}
/**
* Properties for stopping a Query Execution using JSONPath
*/
export interface AthenaStopQueryExecutionJsonPathProps extends sfn.TaskStateJsonPathBaseProps, AthenaStopQueryExecutionOptions {
}
/**
* Properties for stopping a Query Execution using JSONata
*/
export interface AthenaStopQueryExecutionJsonataProps extends sfn.TaskStateJsonataBaseProps, AthenaStopQueryExecutionOptions {
}
/**
* Properties for stopping a Query Execution
*/
export interface AthenaStopQueryExecutionProps extends sfn.TaskStateBaseProps, AthenaStopQueryExecutionOptions {
}
/**
* Stop an Athena Query Execution as a Task
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-athena.html
*/
export declare class AthenaStopQueryExecution extends sfn.TaskStateBase {
private readonly props;
/**
* Stop an Athena Query Execution as a Task using JSONPath
*/
static jsonPath(scope: Construct, id: string, props: AthenaStopQueryExecutionJsonPathProps): AthenaStopQueryExecution;
/**
* Stop an Athena Query Execution as a Task using JSONata
*/
static jsonata(scope: Construct, id: string, props: AthenaStopQueryExecutionJsonataProps): AthenaStopQueryExecution;
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: AthenaStopQueryExecutionProps);
/**
* Provides the Athena stop query execution service integration task configuration
*/
/**
* @internal
*/
protected _renderTask(topLevelQueryLanguage?: sfn.QueryLanguage): any;
}
export {};

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.AthenaStopQueryExecution=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},task_utils_1=()=>{var tmp=require("../private/task-utils");return task_utils_1=()=>tmp,tmp};class AthenaStopQueryExecution extends sfn().TaskStateBase{props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_stepfunctions_tasks.AthenaStopQueryExecution",version:"2.252.0"};static jsonPath(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_AthenaStopQueryExecutionJsonPathProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.jsonPath),error}return new AthenaStopQueryExecution(scope,id,props)}static jsonata(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_AthenaStopQueryExecutionJsonataProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.jsonata),error}return new AthenaStopQueryExecution(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_AthenaStopQueryExecutionProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,AthenaStopQueryExecution),error}this.integrationPattern=props.integrationPattern??sfn().IntegrationPattern.REQUEST_RESPONSE,(0,task_utils_1().validatePatternSupported)(this.integrationPattern,AthenaStopQueryExecution.SUPPORTED_INTEGRATION_PATTERNS),this.taskPolicies=[new(iam()).PolicyStatement({resources:["*"],actions:["athena:stopQueryExecution"]})]}_renderTask(topLevelQueryLanguage){const queryLanguage=sfn()._getActualQueryLanguage(topLevelQueryLanguage,this.props.queryLanguage);return{Resource:(0,task_utils_1().integrationResourceArn)("athena","stopQueryExecution",this.integrationPattern),...this._renderParametersOrArguments({QueryExecutionId:this.props.queryExecutionId},queryLanguage)}}}exports.AthenaStopQueryExecution=AthenaStopQueryExecution;

View File

@@ -0,0 +1,101 @@
import type { Construct } from 'constructs';
import * as iam from '../../../aws-iam';
import * as sfn from '../../../aws-stepfunctions';
interface CallAwsServiceOptions {
/**
* The AWS service to call.
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/supported-services-awssdk.html
*/
readonly service: string;
/**
* The API action to call.
*
* Use camelCase.
*/
readonly action: string;
/**
* Parameters for the API action call.
*
* Use PascalCase for the parameter names.
*
* @default - no parameters
*/
readonly parameters?: {
[key: string]: any;
};
/**
* The resources for the IAM statement that will be added to the state
* machine role's policy to allow the state machine to make the API call.
*
* By default the action for this IAM statement will be `service:action`.
*/
readonly iamResources: string[];
/**
* The action for the IAM statement that will be added to the state
* machine role's policy to allow the state machine to make the API call.
*
* Use in the case where the IAM action name does not match with the
* API service/action name, e.g. `s3:ListBuckets` requires `s3:ListAllMyBuckets`.
*
* @default - service:action
*/
readonly iamAction?: string;
/**
* Additional IAM statements that will be added to the state machine
* role's policy.
*
* Use in the case where the call requires more than a single statement to
* be executed, e.g. `rekognition:detectLabels` requires also S3 permissions
* to read the object on which it must act.
*
* @default - no additional statements are added
*/
readonly additionalIamStatements?: iam.PolicyStatement[];
}
/**
* Properties for calling an AWS service's API action using JSONPath from your
* state machine.
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/supported-services-awssdk.html
*/
export interface CallAwsServiceJsonPathProps extends sfn.TaskStateJsonPathBaseProps, CallAwsServiceOptions {
}
/**
* Properties for calling an AWS service's API action using JSONata from your
* state machine.
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/supported-services-awssdk.html
*/
export interface CallAwsServiceJsonataProps extends sfn.TaskStateJsonataBaseProps, CallAwsServiceOptions {
}
/**
* Properties for calling an AWS service's API action from your
* state machine.
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/supported-services-awssdk.html
*/
export interface CallAwsServiceProps extends sfn.TaskStateBaseProps, CallAwsServiceOptions {
}
/**
* A StepFunctions task to call an AWS service API
*/
export declare class CallAwsService extends sfn.TaskStateBase {
private readonly props;
/**
* A StepFunctions task using JSONPath to call an AWS service API
*/
static jsonPath(scope: Construct, id: string, props: CallAwsServiceJsonPathProps): CallAwsService;
/**
* A StepFunctions task using JSONata to call an AWS service API
*/
static jsonata(scope: Construct, id: string, props: CallAwsServiceJsonataProps): CallAwsService;
protected readonly taskMetrics?: sfn.TaskMetricsConfig;
protected readonly taskPolicies?: iam.PolicyStatement[];
constructor(scope: Construct, id: string, props: CallAwsServiceProps);
/**
* @internal
*/
protected _renderTask(topLevelQueryLanguage?: sfn.QueryLanguage): any;
}
export {};

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CallAwsService=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},core_1=()=>{var tmp=require("../../../core");return core_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp},task_utils_1=()=>{var tmp=require("../private/task-utils");return task_utils_1=()=>tmp,tmp};class CallAwsService extends sfn().TaskStateBase{props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_stepfunctions_tasks.CallAwsService",version:"2.252.0"};static jsonPath(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_CallAwsServiceJsonPathProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.jsonPath),error}return new CallAwsService(scope,id,props)}static jsonata(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_CallAwsServiceJsonataProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.jsonata),error}return new CallAwsService(scope,id,{...props,queryLanguage:sfn().QueryLanguage.JSONATA})}taskMetrics;taskPolicies;constructor(scope,id,props){super(scope,id,props),this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_CallAwsServiceProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CallAwsService),error}if(this.props.integrationPattern===sfn().IntegrationPattern.RUN_JOB)throw new(core_1()).ValidationError((0,literal_string_1().lit)`IntegrationPatternSupportedCallAws`,"The RUN_JOB integration pattern is not supported for CallAwsService",this);if(!core_1().Token.isUnresolved(this.props.action)&&!this.props.action.startsWith(this.props.action[0]?.toLowerCase()))throw new(core_1()).ValidationError((0,literal_string_1().lit)`ActionCamelCase`,`action must be camelCase, got: ${this.props.action}`,this);if(this.props.parameters){const invalidKeys=Object.keys(this.props.parameters).filter(key=>!key.startsWith(key[0]?.toUpperCase()));if(invalidKeys.length)throw new(core_1()).ValidationError((0,literal_string_1().lit)`MustBeParameterNamesPascalcase`,`parameter names must be PascalCase, got: ${invalidKeys.join(", ")}`,this)}const iamService={bedrockagent:"bedrock",cloudwatchlogs:"logs",efs:"elasticfilesystem",elasticloadbalancingv2:"elasticloadbalancing",mediapackagevod:"mediapackage-vod",mwaa:"airflow",sfn:"states"}[props.service]??props.service;this.taskPolicies=[new(iam()).PolicyStatement({resources:props.iamResources,actions:[props.iamAction??`${iamService}:${props.action}`]}),...props.additionalIamStatements??[]]}_renderTask(topLevelQueryLanguage){const queryLanguage=sfn()._getActualQueryLanguage(topLevelQueryLanguage,this.props.queryLanguage);let service=this.props.service;return core_1().Token.isUnresolved(service)||(service=service.toLowerCase()),{Resource:(0,task_utils_1().integrationResourceArn)("aws-sdk",`${service}:${this.props.action}`,this.props.integrationPattern),...this._renderParametersOrArguments(this.props.parameters??{},queryLanguage)}}}exports.CallAwsService=CallAwsService;

View File

@@ -0,0 +1,73 @@
import type * as ec2 from '../../../aws-ec2';
import * as sfn from '../../../aws-stepfunctions';
import type { Duration } from '../../../core';
/**
* The overrides that should be sent to a container.
*/
export interface ContainerOverrides {
/**
* The command to send to the container that overrides
* the default command from the Docker image or the job definition.
*
* @default - No command overrides
*/
readonly command?: string[];
/**
* The environment variables to send to the container.
* You can add new environment variables, which are added to the container
* at launch, or you can override the existing environment variables from
* the Docker image or the job definition.
*
* @default - No environment overrides
*/
readonly environment?: {
[key: string]: string;
};
/**
* The instance type to use for a multi-node parallel job.
* This parameter is not valid for single-node container jobs.
*
* @default - No instance type overrides
*/
readonly instanceType?: ec2.InstanceType;
/**
* The number of MiB of memory reserved for the job.
* This value overrides the value set in the job definition.
*
* @default - No memory overrides
*/
readonly memory?: number;
/**
* The number of physical GPUs to reserve for the container.
* The number of GPUs reserved for all containers in a job
* should not exceed the number of available GPUs on the compute
* resource that the job is launched on.
*
* @default - No GPU reservation
*/
readonly gpuCount?: number;
/**
* The number of vCPUs to reserve for the container.
* This value overrides the value set in the job definition.
*
* @default - No vCPUs overrides
*/
readonly vcpus?: number;
}
/**
* An object representing an AWS Batch job dependency.
*/
export interface JobDependency {
/**
* The job ID of the AWS Batch job associated with this dependency.
*
* @default - No jobId
*/
readonly jobId?: string;
/**
* The type of the job dependency.
*
* @default - No type
*/
readonly type?: string;
}

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.RunBatchJob=void 0;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},core_1=()=>{var tmp=require("../../../core");return core_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp},resource_arn_suffix_1=()=>{var tmp=require("../resource-arn-suffix");return resource_arn_suffix_1=()=>tmp,tmp};class RunBatchJob{props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_stepfunctions_tasks.RunBatchJob",version:"2.252.0"};integrationPattern;constructor(props){if(this.props=props,this.integrationPattern=props.integrationPattern||sfn().ServiceIntegrationPattern.SYNC,![sfn().ServiceIntegrationPattern.FIRE_AND_FORGET,sfn().ServiceIntegrationPattern.SYNC].includes(this.integrationPattern))throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`InvalidServiceIntegrationPattern`,`Invalid Service Integration Pattern: ${this.integrationPattern} is not supported to call RunBatchJob.`);if((0,core_1().withResolved)(props.arraySize,arraySize=>{if(arraySize!==void 0&&(arraySize<2||arraySize>1e4))throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`MustBeArraysizeBetween`,`arraySize must be between 2 and 10,000. Received ${arraySize}.`)}),props.dependsOn&&props.dependsOn.length>20)throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`MustBeDependenciesLess`,`dependencies must be 20 or less. Received ${props.dependsOn.length}.`);(0,core_1().withResolved)(props.attempts,attempts=>{if(attempts!==void 0&&(attempts<1||attempts>10))throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`MustBeAttemptsBetween`,`attempts must be between 1 and 10. Received ${attempts}.`)}),props.timeout!==void 0&&(0,core_1().withResolved)(props.timeout.toSeconds(),timeout=>{if(timeout<60)throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`MustBeTimeoutGreaterThan`,`timeout must be greater than 60 seconds. Received ${timeout} seconds.`)}),props.containerOverrides?.environment&&Object.keys(props.containerOverrides.environment).forEach(key=>{if(key.match(/^AWS_BATCH/))throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`InvalidEnvironmentVariableName`,`Invalid environment variable name: ${key}. Environment variable names starting with 'AWS_BATCH' are reserved.`)})}bind(_task){return{resourceArn:(0,resource_arn_suffix_1().getResourceArn)("batch","submitJob",this.integrationPattern),policyStatements:this.configurePolicyStatements(_task),parameters:{JobDefinition:this.props.jobDefinitionArn,JobName:this.props.jobName,JobQueue:this.props.jobQueueArn,Parameters:this.props.payload,ArrayProperties:this.props.arraySize!==void 0?{Size:this.props.arraySize}:void 0,ContainerOverrides:this.props.containerOverrides?this.configureContainerOverrides(this.props.containerOverrides):void 0,DependsOn:this.props.dependsOn?this.props.dependsOn.map(jobDependency=>({JobId:jobDependency.jobId,Type:jobDependency.type})):void 0,RetryStrategy:this.props.attempts!==void 0?{Attempts:this.props.attempts}:void 0,Timeout:this.props.timeout?{AttemptDurationSeconds:this.props.timeout.toSeconds()}:void 0}}}configurePolicyStatements(task){return[new(iam()).PolicyStatement({resources:[core_1().Stack.of(task).formatArn({service:"batch",resource:"job-definition",resourceName:"*"}),this.props.jobQueueArn],actions:["batch:SubmitJob"]}),new(iam()).PolicyStatement({resources:[core_1().Stack.of(task).formatArn({service:"events",resource:"rule/StepFunctionsGetEventsForBatchJobsRule"})],actions:["events:PutTargets","events:PutRule","events:DescribeRule"]})]}configureContainerOverrides(containerOverrides){let environment;containerOverrides.environment&&(environment=Object.entries(containerOverrides.environment).map(([key,value])=>({Name:key,Value:value})));let resources;return containerOverrides.gpuCount&&(resources=[{Type:"GPU",Value:`${containerOverrides.gpuCount}`}]),{Command:containerOverrides.command,Environment:environment,InstanceType:containerOverrides.instanceType?.toString(),Memory:containerOverrides.memory,ResourceRequirements:resources,Vcpus:containerOverrides.vcpus}}}exports.RunBatchJob=RunBatchJob;

View File

@@ -0,0 +1,187 @@
import type { Construct } from 'constructs';
import type * as ec2 from '../../../aws-ec2';
import * as iam from '../../../aws-iam';
import * as sfn from '../../../aws-stepfunctions';
import type { Size } from '../../../core';
/**
* The overrides that should be sent to a container.
*/
export interface BatchContainerOverrides {
/**
* The command to send to the container that overrides
* the default command from the Docker image or the job definition.
*
* @default - No command overrides
*/
readonly command?: string[];
/**
* The environment variables to send to the container.
* You can add new environment variables, which are added to the container
* at launch, or you can override the existing environment variables from
* the Docker image or the job definition.
*
* @default - No environment overrides
*/
readonly environment?: {
[key: string]: string;
};
/**
* The instance type to use for a multi-node parallel job.
* This parameter is not valid for single-node container jobs.
*
* @default - No instance type overrides
*/
readonly instanceType?: ec2.InstanceType;
/**
* Memory reserved for the job.
*
* @default - No memory overrides. The memory supplied in the job definition will be used.
*/
readonly memory?: Size;
/**
* The number of physical GPUs to reserve for the container.
* The number of GPUs reserved for all containers in a job
* should not exceed the number of available GPUs on the compute
* resource that the job is launched on.
*
* @default - No GPU reservation
*/
readonly gpuCount?: number;
/**
* The number of vCPUs to reserve for the container.
* This value overrides the value set in the job definition.
*
* @default - No vCPUs overrides
*/
readonly vcpus?: number;
}
/**
* An object representing an AWS Batch job dependency.
*/
export interface BatchJobDependency {
/**
* The job ID of the AWS Batch job associated with this dependency.
*
* @default - No jobId
*/
readonly jobId?: string;
/**
* The type of the job dependency.
*
* @default - No type
*/
readonly type?: string;
}
interface BatchSubmitJobOptions {
/**
* The arn of the job definition used by this job.
*/
readonly jobDefinitionArn: string;
/**
* The name of the job.
* The first character must be alphanumeric, and up to 128 letters (uppercase and lowercase),
* numbers, hyphens, and underscores are allowed.
*/
readonly jobName: string;
/**
* The arn of the job queue into which the job is submitted.
*/
readonly jobQueueArn: string;
/**
* The array size can be between 2 and 10,000.
* If you specify array properties for a job, it becomes an array job.
* For more information, see Array Jobs in the AWS Batch User Guide.
*
* @default - No array size
*/
readonly arraySize?: number;
/**
* A list of container overrides in JSON format that specify the name of a container
* in the specified job definition and the overrides it should receive.
*
* @see https://docs.aws.amazon.com/batch/latest/APIReference/API_SubmitJob.html#Batch-SubmitJob-request-containerOverrides
*
* @default - No container overrides
*/
readonly containerOverrides?: BatchContainerOverrides;
/**
* A list of dependencies for the job.
* A job can depend upon a maximum of 20 jobs.
*
* @see https://docs.aws.amazon.com/batch/latest/APIReference/API_SubmitJob.html#Batch-SubmitJob-request-dependsOn
*
* @default - No dependencies
*/
readonly dependsOn?: BatchJobDependency[];
/**
* The payload to be passed as parameters to the batch job
*
* @default - No parameters are passed
*/
readonly payload?: sfn.TaskInput;
/**
* The number of times to move a job to the RUNNABLE status.
* You may specify between 1 and 10 attempts.
* If the value of attempts is greater than one,
* the job is retried on failure the same number of attempts as the value.
*
* @default 1
*/
readonly attempts?: number;
/**
* The tags applied to the job request.
*
* @default {} - no tags
*/
readonly tags?: {
[key: string]: string;
};
}
/**
* Properties for BatchSubmitJob using JSONPath
*/
export interface BatchSubmitJobJsonPathProps extends sfn.TaskStateJsonPathBaseProps, BatchSubmitJobOptions {
}
/**
* Properties for BatchSubmitJob using JSONata
*/
export interface BatchSubmitJobJsonataProps extends sfn.TaskStateJsonataBaseProps, BatchSubmitJobOptions {
}
/**
* Properties for BatchSubmitJob
*/
export interface BatchSubmitJobProps extends sfn.TaskStateBaseProps, BatchSubmitJobOptions {
}
/**
* Task to submits an AWS Batch job from a job definition.
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-batch.html
*/
export declare class BatchSubmitJob extends sfn.TaskStateBase {
private readonly props;
/**
* Task to submits an AWS Batch job from a job definition using JSONPath.
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-batch.html
*/
static jsonPath(scope: Construct, id: string, props: BatchSubmitJobJsonPathProps): BatchSubmitJob;
/**
* Task to submits an AWS Batch job from a job definition using JSONata.
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-batch.html
*/
static jsonata(scope: Construct, id: string, props: BatchSubmitJobJsonataProps): BatchSubmitJob;
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: BatchSubmitJobProps);
/**
* @internal
*/
protected _renderTask(topLevelQueryLanguage?: sfn.QueryLanguage): any;
private configurePolicyStatements;
private configureContainerOverrides;
private validateTags;
}
export {};

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,238 @@
import type { Construct } from 'constructs';
import type * as bedrock from '../../../aws-bedrock';
import type * as ec2 from '../../../aws-ec2';
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';
/**
* The customization type.
*
* @see https://docs.aws.amazon.com/bedrock/latest/userguide/custom-models.html
*/
export declare enum CustomizationType {
/**
* Fine-tuning
*
* Provide labeled data in order to train a model to improve performance on specific tasks.
*/
FINE_TUNING = "FINE_TUNING",
/**
* Continued pre-training
*
* Provide unlabeled data to pre-train a foundation model by familiarizing it with certain types of inputs.
*/
CONTINUED_PRE_TRAINING = "CONTINUED_PRE_TRAINING",
/**
* Distillation
*
* With Model Distillation, you can generate synthetic responses from a large foundation model (teacher)
* and use that data to train a smaller model (student) for your specific use-case.
*/
DISTILLATION = "DISTILLATION"
}
/**
* The key/value pair for a tag.
*/
export interface CustomModelTag {
/**
* Key for the tag.
*/
readonly key: string;
/**
* Value for the tag.
*/
readonly value: string;
}
/**
* S3 bucket configuration for data storage destination.
*/
export interface DataBucketConfiguration {
/**
* The S3 bucket.
*/
readonly bucket: s3.IBucket;
/**
* Path to file or directory within the bucket.
*
* @default - root of the bucket
*/
readonly path?: string;
}
/**
* S3 bucket configuration for the output data.
*/
export interface OutputBucketConfiguration extends DataBucketConfiguration {
}
/**
* S3 bucket configuration for the training data.
*/
export interface TrainingBucketConfiguration extends DataBucketConfiguration {
}
/**
* S3 bucket configuration for the validation data.
*/
export interface ValidationBucketConfiguration extends DataBucketConfiguration {
}
/**
* VPC configuration
*/
export interface IBedrockCreateModelCustomizationJobVpcConfig {
/**
* VPC configuration security groups
*
* The minimum number of security groups is 1.
* The maximum number of security groups is 5.
*/
readonly securityGroups: ec2.ISecurityGroup[];
/**
* VPC configuration subnets
*
* The minimum number of subnets is 1.
* The maximum number of subnets is 16.
*/
readonly subnets: ec2.ISubnet[];
}
/**
* Properties for invoking a Bedrock Model
*/
export interface BedrockCreateModelCustomizationJobProps extends sfn.TaskStateBaseProps {
/**
* The base model.
*/
readonly baseModel: bedrock.IModel;
/**
* A unique, case-sensitive identifier to ensure that the API request completes no more than one time.
* If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error.
*
* The maximum length is 256 characters.
*
* @see https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html
*
* @default - no client request token
*/
readonly clientRequestToken?: string;
/**
* The customization type.
*
* @default FINE_TUNING
*/
readonly customizationType?: CustomizationType;
/**
* The custom model is encrypted at rest using this key.
*
* @see https://docs.aws.amazon.com/bedrock/latest/userguide/encryption-custom-job.html
*
* @default - encrypted with the AWS owned key
*/
readonly customModelKmsKey?: kms.IKey;
/**
* A name for the resulting custom model.
*
* The maximum length is 63 characters.
*/
readonly customModelName: string;
/**
* Tags to attach to the resulting custom model.
*
* The maximum number of tags is 200.
*
* @default - no tags
*/
readonly customModelTags?: CustomModelTag[];
/**
* Parameters related to tuning the model.
*
* @see https://docs.aws.amazon.com/bedrock/latest/userguide/custom-models-hp.html
*
* @default - use default hyperparameters
*/
readonly hyperParameters?: {
[key: string]: string;
};
/**
* A name for the fine-tuning job.
*
* The maximum length is 63 characters.
*/
readonly jobName: string;
/**
* Tags to attach to the job.
* The maximum number of tags is 200.
*
* @default - no tags
*/
readonly jobTags?: CustomModelTag[];
/**
* The S3 bucket configuration where the output data is stored.
*
* @see https://docs.aws.amazon.com/bedrock/latest/APIReference/API_OutputDataConfig.html
*/
readonly outputData: OutputBucketConfiguration;
/**
* The IAM role that Amazon Bedrock can assume to perform tasks on your behalf.
*
* For example, during model training, Amazon Bedrock needs your permission to read input data from an S3 bucket,
* write model artifacts to an S3 bucket.
* To pass this role to Amazon Bedrock, the caller of this API must have the iam:PassRole permission.
*
* @default - use auto generated role
*/
readonly role?: iam.IRoleRef;
/**
* The S3 bucket configuration where the training data is stored.
*
* @see https://docs.aws.amazon.com/bedrock/latest/APIReference/API_TrainingDataConfig.html
*/
readonly trainingData: TrainingBucketConfiguration;
/**
* The S3 bucket configuration where the validation data is stored.
* If you don't provide a validation dataset, specify the evaluation percentage by the `Evaluation percentage` hyperparameter.
*
* The maximum number is 10.
*
* @default undefined - validate using a subset of the training data
*
* @see https://docs.aws.amazon.com/bedrock/latest/APIReference/API_Validator.html
*/
readonly validationData?: ValidationBucketConfiguration[];
/**
* The VPC configuration.
*
* @default - no VPC configuration
*/
readonly vpcConfig?: IBedrockCreateModelCustomizationJobVpcConfig;
}
/**
* A Step Functions Task to create model customization in Bedrock.
*/
export declare class BedrockCreateModelCustomizationJob extends sfn.TaskStateBase {
private readonly props;
private static readonly SUPPORTED_INTEGRATION_PATTERNS;
protected readonly taskMetrics?: sfn.TaskMetricsConfig;
protected readonly taskPolicies?: iam.PolicyStatement[];
private readonly integrationPattern;
private _role;
constructor(scope: Construct, id: string, props: BedrockCreateModelCustomizationJobProps);
/**
* The IAM role for the bedrock create model customization job
*/
get role(): iam.IRole;
/**
* Configure the IAM role for the bedrock create model customization job
*
* @see https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-iam-role.html
*/
private renderBedrockCreateModelCustomizationJobRole;
private createVpcConfigPolicyStatement;
private renderPolicyStatements;
private validateStringLength;
private validatePattern;
private validateArrayLength;
/**
* Provides the Bedrock CreateModelCustomizationJob service integration task configuration
*
* @internal
*/
protected _renderTask(): any;
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,25 @@
/**
* Guradrail settings for BedrockInvokeModel
*/
export declare class Guardrail {
readonly guardrailIdentifier: string;
readonly guardrailVersion: string;
/**
* Enable guardrail
*
* @param identifier The id or arn of the guardrail.
* @param version The version of the guardrail.
*/
static enable(identifier: string, version: number): Guardrail;
/**
* Enable guardrail with DRAFT version
*
* @param identifier The identifier of the guardrail. Must be between 1 and 2048 characters in length.
*/
static enableDraft(identifier: string): Guardrail;
/**
* @param guardrailIdentifier The identitifier of guardrail.
* @param guardrailVersion The version of guardrail.
*/
private constructor();
}

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Guardrail=void 0;const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var core_1=()=>{var tmp=require("../../../core");return core_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp};class Guardrail{guardrailIdentifier;guardrailVersion;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_stepfunctions_tasks.Guardrail",version:"2.252.0"};static enable(identifier,version){if(!core_1().Token.isUnresolved(version)&&(version<1||version>99999999))throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`GuardrailVersionOutOfRange`,`\`version\` must be between 1 and 99999999, got ${version}.`);return new Guardrail(identifier,version.toString())}static enableDraft(identifier){return new Guardrail(identifier,"DRAFT")}constructor(guardrailIdentifier,guardrailVersion){if(this.guardrailIdentifier=guardrailIdentifier,this.guardrailVersion=guardrailVersion,!core_1().Token.isUnresolved(guardrailIdentifier)){let gurdrailId;if(guardrailIdentifier.startsWith("arn:")){const arn=core_1().Arn.split(guardrailIdentifier,core_1().ArnFormat.SLASH_RESOURCE_NAME);if(!arn.resourceName)throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`InvalidGuardrailArnFormat`,`Invalid ARN format. The ARN of Guradrail should have the format: \`arn:<partition>:bedrock:<region>:<account-id>:guardrail/<guardrail-name>\`, got ${guardrailIdentifier}.`);gurdrailId=arn.resourceName}else gurdrailId=guardrailIdentifier;if(!/^[a-z0-9]+$/.test(gurdrailId))throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`GuardrailContainOnlyLowercase`,`The id of Guardrail must contain only lowercase letters and numbers, got ${gurdrailId}.`);if(guardrailIdentifier.length>2048)throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`GuardrailIdentifierTooLong`,`\`guardrailIdentifier\` length must be between 0 and 2048, got ${guardrailIdentifier.length}.`)}}}exports.Guardrail=Guardrail;

View File

@@ -0,0 +1,167 @@
import type { Construct } from 'constructs';
import type { Guardrail } from './guardrail';
import type * as bedrock from '../../../aws-bedrock';
import * as iam from '../../../aws-iam';
import type * as s3 from '../../../aws-s3';
import * as sfn from '../../../aws-stepfunctions';
/**
* Location to retrieve the input data, prior to calling Bedrock InvokeModel.
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-bedrock.html
*/
export interface BedrockInvokeModelInputProps {
/**
* S3 object to retrieve the input data from.
*
* If the S3 location is not set, then the Body must be set.
*
* @default - Input data is retrieved from the `body` field
*/
readonly s3Location?: s3.Location;
/**
* The source location where the API response is written.
*
* This field can be used to specify s3 URI in the form of token
*
* @default - The API response body is returned in the result.
*/
readonly s3InputUri?: string;
}
/**
* Location where the Bedrock InvokeModel API response is written.
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-bedrock.html
*/
export interface BedrockInvokeModelOutputProps {
/**
* S3 object where the Bedrock InvokeModel API response is written.
*
* If you specify this field, the API response body is replaced with
* a reference to the Amazon S3 location of the original output.
*
* @default - Response body is returned in the task result
*/
readonly s3Location?: s3.Location;
/**
* The destination location where the API response is written.
*
* This field can be used to specify s3 URI in the form of token
*
* @default - The API response body is returned in the result.
*/
readonly s3OutputUri?: string;
}
interface BedrockInvokeModelOptions {
/**
* The Bedrock model that the task will invoke.
*
* @see https://docs.aws.amazon.com/bedrock/latest/userguide/api-methods-run.html
*/
readonly model: bedrock.IModel;
/**
* The input data for the Bedrock model invocation.
*
* The inference parameters contained in the body depend on the Bedrock model being used.
*
* The body must be in the format specified in the `contentType` field.
* For example, if the content type is `application/json`, the body must be
* JSON formatted.
*
* The body must be up to 256 KB in size. For input data that exceeds 256 KB,
* use `input` instead to retrieve the input data from S3.
*
* You must specify either the `body` or the `input` field, but not both.
*
* @see https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html
*
* @default - Input data is retrieved from the location specified in the `input` field
*/
readonly body?: sfn.TaskInput;
/**
* The desired MIME type of the inference body in the response.
*
* @see https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InvokeModel.html
* @default 'application/json'
*/
readonly accept?: string;
/**
* The MIME type of the input data in the request.
*
* @see https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InvokeModel.html
* @default 'application/json'
* @deprecated This property does not require configuration because the only acceptable value is 'application/json'.
*/
readonly contentType?: string;
/**
* The source location to retrieve the input data from.
*
* @default - Input data is retrieved from the `body` field
*/
readonly input?: BedrockInvokeModelInputProps;
/**
* The destination location where the API response is written.
*
* If you specify this field, the API response body is replaced with a reference to the
* output location.
*
* @default - The API response body is returned in the result.
*/
readonly output?: BedrockInvokeModelOutputProps;
/**
* The guardrail is applied to the invocation
*
* @default - No guardrail is applied to the invocation.
*/
readonly guardrail?: Guardrail;
/**
* Specifies whether to enable or disable the Bedrock trace.
*
* @default - Trace is not enabled for the invocation.
*/
readonly traceEnabled?: boolean;
}
/**
* Properties for invoking a Bedrock Model
*/
export interface BedrockInvokeModelJsonPathProps extends sfn.TaskStateJsonPathBaseProps, BedrockInvokeModelOptions {
}
/**
* Properties for invoking a Bedrock Model
*/
export interface BedrockInvokeModelJsonataProps extends sfn.TaskStateJsonataBaseProps, BedrockInvokeModelOptions {
}
/**
* Properties for invoking a Bedrock Model
*/
export interface BedrockInvokeModelProps extends sfn.TaskStateBaseProps, BedrockInvokeModelOptions {
}
/**
* A Step Functions Task to invoke a model in Bedrock.
*/
export declare class BedrockInvokeModel extends sfn.TaskStateBase {
private readonly props;
/**
* A Step Functions Task using JSONPath to invoke a model in Bedrock.
*/
static jsonPath(scope: Construct, id: string, props: BedrockInvokeModelJsonPathProps): BedrockInvokeModel;
/**
* A Step Functions Task using JSONata to invoke a model in Bedrock.
*/
static jsonata(scope: Construct, id: string, props: BedrockInvokeModelJsonataProps): BedrockInvokeModel;
private static readonly SUPPORTED_INTEGRATION_PATTERNS;
protected readonly taskMetrics: sfn.TaskMetricsConfig | undefined;
protected readonly taskPolicies: iam.PolicyStatement[] | undefined;
private readonly integrationPattern;
private readonly modelOutput?;
constructor(scope: Construct, id: string, props: BedrockInvokeModelProps);
private renderPolicyStatements;
/**
* Provides the Bedrock InvokeModel service integration task configuration
*
* @internal
*/
protected _renderTask(topLevelQueryLanguage?: sfn.QueryLanguage): any;
private getInputSource;
private getOutputSource;
}
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 codebuild from '../../../aws-codebuild';
import * as iam from '../../../aws-iam';
import * as sfn from '../../../aws-stepfunctions';
interface CodeBuildStartBuildBatchOptions {
/**
* CodeBuild project to start
*/
readonly project: codebuild.IProjectRef;
/**
* A set of environment variables to be used for this build only.
*
* @default - the latest environment variables already defined in the build project.
*/
readonly environmentVariablesOverride?: {
[name: string]: codebuild.BuildEnvironmentVariable;
};
}
/**
* Properties for CodeBuildStartBuildBatch using JSONPath
*/
export interface CodeBuildStartBuildBatchJsonPathProps extends sfn.TaskStateJsonPathBaseProps, CodeBuildStartBuildBatchOptions {
}
/**
* Properties for CodeBuildStartBuildBatch using JSONata
*/
export interface CodeBuildStartBuildBatchJsonataProps extends sfn.TaskStateJsonataBaseProps, CodeBuildStartBuildBatchOptions {
}
/**
* Properties for CodeBuildStartBuildBatch
*/
export interface CodeBuildStartBuildBatchProps extends sfn.TaskStateBaseProps, CodeBuildStartBuildBatchOptions {
}
/**
* Start a CodeBuild BatchBuild as a task
*
* @see https://docs.aws.amazon.com/codebuild/latest/APIReference/API_StartBuildBatch.html
*/
export declare class CodeBuildStartBuildBatch extends sfn.TaskStateBase {
private readonly props;
/**
* Start a CodeBuild BatchBuild as a task using JSONPath
*
* @see https://docs.aws.amazon.com/codebuild/latest/APIReference/API_StartBuildBatch.html
*/
static jsonPath(scope: Construct, id: string, props: CodeBuildStartBuildBatchJsonPathProps): CodeBuildStartBuildBatch;
/**
* Start a CodeBuild BatchBuild as a task using JSONata
*
* @see https://docs.aws.amazon.com/codebuild/latest/APIReference/API_StartBuildBatch.html
*/
static jsonata(scope: Construct, id: string, props: CodeBuildStartBuildBatchJsonataProps): CodeBuildStartBuildBatch;
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: CodeBuildStartBuildBatchProps);
/**
* Configure the necessary permissions to invoke the CodeBuild StartBuildBatch API
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/codebuild-iam.html#codebuild-iam-startbuildbatch
*/
private configurePolicyStatements;
/**
* Provides the CodeBuild StartBuild service integration task configuration
*
* @internal
*/
protected _renderTask(topLevelQueryLanguage?: sfn.QueryLanguage): any;
private serializeEnvVariables;
}
export {};

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CodeBuildStartBuildBatch=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var codebuild=()=>{var tmp=require("../../../aws-codebuild");return codebuild=()=>tmp,tmp},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},literal_string_1=()=>{var tmp=require("../../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp},task_utils_1=()=>{var tmp=require("../private/task-utils");return task_utils_1=()=>tmp,tmp};class CodeBuildStartBuildBatch extends sfn().TaskStateBase{props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_stepfunctions_tasks.CodeBuildStartBuildBatch",version:"2.252.0"};static jsonPath(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_CodeBuildStartBuildBatchJsonPathProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.jsonPath),error}return new CodeBuildStartBuildBatch(scope,id,props)}static jsonata(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_CodeBuildStartBuildBatchJsonataProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.jsonata),error}return new CodeBuildStartBuildBatch(scope,id,{...props,queryLanguage:sfn().QueryLanguage.JSONATA})}static SUPPORTED_INTEGRATION_PATTERNS=[sfn().IntegrationPattern.REQUEST_RESPONSE,sfn().IntegrationPattern.RUN_JOB];taskMetrics;taskPolicies;integrationPattern;constructor(scope,id,props){super(scope,id,props),this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_CodeBuildStartBuildBatchProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CodeBuildStartBuildBatch),error}this.integrationPattern=props.integrationPattern??sfn().IntegrationPattern.REQUEST_RESPONSE,(0,task_utils_1().validatePatternSupported)(this.integrationPattern,CodeBuildStartBuildBatch.SUPPORTED_INTEGRATION_PATTERNS),this.taskMetrics={metricPrefixSingular:"CodeBuildProject",metricPrefixPlural:"CodeBuildProjects",metricDimensions:{ProjectArn:this.props.project.projectRef.projectArn}},this.taskPolicies=this.configurePolicyStatements()}configurePolicyStatements(){let policyStatements;switch(this.integrationPattern){case sfn().IntegrationPattern.RUN_JOB:policyStatements=[new(iam()).PolicyStatement({resources:[this.props.project.projectRef.projectArn],actions:["codebuild:StartBuildBatch","codebuild:StopBuildBatch","codebuild:BatchGetBuildBatches"]}),new(iam()).PolicyStatement({actions:["events:PutTargets","events:PutRule","events:DescribeRule"],resources:[cdk().Stack.of(this).formatArn({service:"events",resource:"rule/StepFunctionsGetEventForCodeBuildStartBuildBatchRule"})]})];break;case sfn().IntegrationPattern.REQUEST_RESPONSE:policyStatements=[new(iam()).PolicyStatement({resources:[this.props.project.projectRef.projectArn],actions:["codebuild:StartBuildBatch"]})];break;default:throw new(cdk()).ValidationError((0,literal_string_1().lit)`UnsupportedIntegrationPattern`,`Unsupported integration pattern: ${this.integrationPattern}`,this)}return policyStatements}_renderTask(topLevelQueryLanguage){const queryLanguage=sfn()._getActualQueryLanguage(topLevelQueryLanguage,this.props.queryLanguage);return{Resource:(0,task_utils_1().integrationResourceArn)("codebuild","startBuildBatch",this.integrationPattern),...this._renderParametersOrArguments({ProjectName:this.props.project.projectRef.projectName,EnvironmentVariablesOverride:this.props.environmentVariablesOverride?this.serializeEnvVariables(this.props.environmentVariablesOverride):void 0},queryLanguage)}}serializeEnvVariables(environmentVariables){return Object.keys(environmentVariables).map(name=>({Name:name,Type:environmentVariables[name].type||codebuild().BuildEnvironmentVariableType.PLAINTEXT,Value:environmentVariables[name].value}))}}exports.CodeBuildStartBuildBatch=CodeBuildStartBuildBatch;

View File

@@ -0,0 +1,64 @@
import type { Construct } from 'constructs';
import * as codebuild from '../../../aws-codebuild';
import * as iam from '../../../aws-iam';
import * as sfn from '../../../aws-stepfunctions';
interface CodeBuildStartBuildOptions {
/**
* CodeBuild project to start
*/
readonly project: codebuild.IProjectRef;
/**
* A set of environment variables to be used for this build only.
*
* @default - the latest environment variables already defined in the build project.
*/
readonly environmentVariablesOverride?: {
[name: string]: codebuild.BuildEnvironmentVariable;
};
}
/**
* Properties for CodeBuildStartBuild using JSONPath
*/
export interface CodeBuildStartBuildJsonPathProps extends sfn.TaskStateJsonPathBaseProps, CodeBuildStartBuildOptions {
}
/**
* Properties for CodeBuildStartBuild using JSONata
*/
export interface CodeBuildStartBuildJsonataProps extends sfn.TaskStateJsonataBaseProps, CodeBuildStartBuildOptions {
}
/**
* Properties for CodeBuildStartBuild
*/
export interface CodeBuildStartBuildProps extends sfn.TaskStateBaseProps, CodeBuildStartBuildOptions {
}
/**
* Start a CodeBuild Build as a task
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-codebuild.html
*/
export declare class CodeBuildStartBuild extends sfn.TaskStateBase {
private readonly props;
/**
* Start a CodeBuild Build as a task using JSONPath
*/
static jsonPath(scope: Construct, id: string, props: CodeBuildStartBuildJsonPathProps): CodeBuildStartBuild;
/**
* Start a CodeBuild Build as a task using JSONata
*/
static jsonata(scope: Construct, id: string, props: CodeBuildStartBuildJsonataProps): CodeBuildStartBuild;
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: CodeBuildStartBuildProps);
private configurePolicyStatements;
/**
* Provides the CodeBuild StartBuild service integration task configuration
*/
/**
* @internal
*/
protected _renderTask(topLevelQueryLanguage?: sfn.QueryLanguage): any;
private serializeEnvVariables;
}
export {};

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CodeBuildStartBuild=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var codebuild=()=>{var tmp=require("../../../aws-codebuild");return codebuild=()=>tmp,tmp},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 CodeBuildStartBuild extends sfn().TaskStateBase{props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_stepfunctions_tasks.CodeBuildStartBuild",version:"2.252.0"};static jsonPath(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_CodeBuildStartBuildJsonPathProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.jsonPath),error}return new CodeBuildStartBuild(scope,id,props)}static jsonata(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_CodeBuildStartBuildJsonataProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.jsonata),error}return new CodeBuildStartBuild(scope,id,{...props,queryLanguage:sfn().QueryLanguage.JSONATA})}static SUPPORTED_INTEGRATION_PATTERNS=[sfn().IntegrationPattern.REQUEST_RESPONSE,sfn().IntegrationPattern.RUN_JOB];taskMetrics;taskPolicies;integrationPattern;constructor(scope,id,props){super(scope,id,props),this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_CodeBuildStartBuildProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CodeBuildStartBuild),error}this.integrationPattern=props.integrationPattern??sfn().IntegrationPattern.REQUEST_RESPONSE,(0,task_utils_1().validatePatternSupported)(this.integrationPattern,CodeBuildStartBuild.SUPPORTED_INTEGRATION_PATTERNS),this.taskMetrics={metricPrefixSingular:"CodeBuildProject",metricPrefixPlural:"CodeBuildProjects",metricDimensions:{ProjectArn:this.props.project.projectRef.projectArn}},this.taskPolicies=this.configurePolicyStatements()}configurePolicyStatements(){let policyStatements=[new(iam()).PolicyStatement({resources:[this.props.project.projectRef.projectArn],actions:["codebuild:StartBuild","codebuild:StopBuild","codebuild:BatchGetBuilds","codebuild:BatchGetReports"]})];return this.integrationPattern===sfn().IntegrationPattern.RUN_JOB&&policyStatements.push(new(iam()).PolicyStatement({actions:["events:PutTargets","events:PutRule","events:DescribeRule"],resources:[cdk().Stack.of(this).formatArn({service:"events",resource:"rule/StepFunctionsGetEventForCodeBuildStartBuildRule"})]})),policyStatements}_renderTask(topLevelQueryLanguage){const queryLanguage=sfn()._getActualQueryLanguage(topLevelQueryLanguage,this.props.queryLanguage);return{Resource:(0,task_utils_1().integrationResourceArn)("codebuild","startBuild",this.integrationPattern),...this._renderParametersOrArguments({ProjectName:this.props.project.projectRef.projectName,EnvironmentVariablesOverride:this.props.environmentVariablesOverride?this.serializeEnvVariables(this.props.environmentVariablesOverride):void 0},queryLanguage)}}serializeEnvVariables(environmentVariables){return Object.keys(environmentVariables).map(name=>({Name:name,Type:environmentVariables[name].type||codebuild().BuildEnvironmentVariableType.PLAINTEXT,Value:environmentVariables[name].value}))}}exports.CodeBuildStartBuild=CodeBuildStartBuild;

View File

@@ -0,0 +1,57 @@
import type { Construct } from 'constructs';
import * as iam from '../../../aws-iam';
import * as sfn from '../../../aws-stepfunctions';
interface GlueDataBrewStartJobRunOptions {
/**
* Glue DataBrew Job to run
*/
readonly name: string;
}
/**
* Properties for starting a job run with StartJobRun using JSONPath
*/
export interface GlueDataBrewStartJobRunJsonPathProps extends sfn.TaskStateJsonPathBaseProps, GlueDataBrewStartJobRunOptions {
}
/**
* Properties for starting a job run with StartJobRun using JSONata
*/
export interface GlueDataBrewStartJobRunJsonataProps extends sfn.TaskStateJsonataBaseProps, GlueDataBrewStartJobRunOptions {
}
/**
* Properties for starting a job run with StartJobRun
*/
export interface GlueDataBrewStartJobRunProps extends sfn.TaskStateBaseProps, GlueDataBrewStartJobRunOptions {
}
/**
* Start a Job run as a Task
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-databrew.html
*/
export declare class GlueDataBrewStartJobRun extends sfn.TaskStateBase {
private readonly props;
/**
* Start a Job run as a Task using JSONPath
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-databrew.html
*/
static jsonPath(scope: Construct, id: string, props: GlueDataBrewStartJobRunJsonPathProps): GlueDataBrewStartJobRun;
/**
* Start a Job run as a Task using JSONata
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-databrew.html
*/
static jsonata(scope: Construct, id: string, props: GlueDataBrewStartJobRunJsonataProps): GlueDataBrewStartJobRun;
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: GlueDataBrewStartJobRunProps);
/**
* Provides the Glue DataBrew Start Job Run task configuration
* @internal
*/
protected _renderTask(topLevelQueryLanguage?: sfn.QueryLanguage): any;
}
export {};

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.GlueDataBrewStartJobRun=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 GlueDataBrewStartJobRun extends sfn().TaskStateBase{props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_stepfunctions_tasks.GlueDataBrewStartJobRun",version:"2.252.0"};static jsonPath(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_GlueDataBrewStartJobRunJsonPathProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.jsonPath),error}return new GlueDataBrewStartJobRun(scope,id,props)}static jsonata(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_GlueDataBrewStartJobRunJsonataProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.jsonata),error}return new GlueDataBrewStartJobRun(scope,id,{...props,queryLanguage:sfn().QueryLanguage.JSONATA})}static SUPPORTED_INTEGRATION_PATTERNS=[sfn().IntegrationPattern.REQUEST_RESPONSE,sfn().IntegrationPattern.RUN_JOB];taskMetrics;taskPolicies;integrationPattern;constructor(scope,id,props){super(scope,id,props),this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_GlueDataBrewStartJobRunProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,GlueDataBrewStartJobRun),error}this.integrationPattern=props.integrationPattern??sfn().IntegrationPattern.REQUEST_RESPONSE,(0,task_utils_1().validatePatternSupported)(this.integrationPattern,GlueDataBrewStartJobRun.SUPPORTED_INTEGRATION_PATTERNS);const actions=["databrew:startJobRun"];this.integrationPattern===sfn().IntegrationPattern.RUN_JOB&&actions.push("databrew:stopJobRun","databrew:listJobRuns"),this.taskPolicies=[new(iam()).PolicyStatement({resources:[cdk().Stack.of(this).formatArn({service:"databrew",resource:"job",resourceName:(0,task_utils_1().isJsonPathOrJsonataExpression)(this.props.name)?"*":this.props.name})],actions})]}_renderTask(topLevelQueryLanguage){const queryLanguage=sfn()._getActualQueryLanguage(topLevelQueryLanguage,this.props.queryLanguage);return{Resource:(0,task_utils_1().integrationResourceArn)("databrew","startJobRun",this.integrationPattern),...this._renderParametersOrArguments({Name:this.props.name},queryLanguage)}}}exports.GlueDataBrewStartJobRun=GlueDataBrewStartJobRun;

View File

@@ -0,0 +1,113 @@
import type { Construct } from 'constructs';
import type { DynamoAttributeValue, DynamoConsumedCapacity, DynamoItemCollectionMetrics, DynamoReturnValues } from './shared-types';
import type * as ddb from '../../../aws-dynamodb';
import * as iam from '../../../aws-iam';
import * as sfn from '../../../aws-stepfunctions';
interface DynamoDeleteItemOptions {
/**
* The name of the table containing the requested item.
*/
readonly table: ddb.ITableRef;
/**
* Primary key of the item to retrieve.
*
* For the primary key, you must provide all of the attributes.
* For example, with a simple primary key, you only need to provide a value for the partition key.
* For a composite primary key, you must provide values for both the partition key and the sort key.
*
* @see https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_GetItem.html#DDB-GetItem-request-Key
*/
readonly key: {
[key: string]: DynamoAttributeValue;
};
/**
* A condition that must be satisfied in order for a conditional DeleteItem to succeed.
*
* @see https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_DeleteItem.html#DDB-DeleteItem-request-ConditionExpression
*
* @default - No condition expression
*/
readonly conditionExpression?: string;
/**
* One or more substitution tokens for attribute names in an expression
*
* @see https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_DeleteItem.html#DDB-DeleteItem-request-ExpressionAttributeNames
*
* @default - No expression attribute names
*/
readonly expressionAttributeNames?: {
[key: string]: string;
};
/**
* One or more values that can be substituted in an expression.
*
* @see https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_DeleteItem.html#DDB-DeleteItem-request-ExpressionAttributeValues
*
* @default - No expression attribute values
*/
readonly expressionAttributeValues?: {
[key: string]: DynamoAttributeValue;
};
/**
* Determines the level of detail about provisioned throughput consumption that is returned in the response
*
* @see https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_DeleteItem.html#DDB-DeleteItem-request-ReturnConsumedCapacity
*
* @default DynamoConsumedCapacity.NONE
*/
readonly returnConsumedCapacity?: DynamoConsumedCapacity;
/**
* Determines whether item collection metrics are returned.
* If set to SIZE, the response includes statistics about item collections, if any,
* that were modified during the operation are returned in the response.
* If set to NONE (the default), no statistics are returned.
*
* @default DynamoItemCollectionMetrics.NONE
*/
readonly returnItemCollectionMetrics?: DynamoItemCollectionMetrics;
/**
* Use ReturnValues if you want to get the item attributes as they appeared before they were deleted.
*
* @see https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_DeleteItem.html#DDB-DeleteItem-request-ReturnValues
*
* @default DynamoReturnValues.NONE
*/
readonly returnValues?: DynamoReturnValues;
}
/**
* Properties for DynamoDeleteItem Task using JSONPath
*/
export interface DynamoDeleteItemJsonPathProps extends sfn.TaskStateJsonPathBaseProps, DynamoDeleteItemOptions {
}
/**
* Properties for DynamoDeleteItem Task using JSONata
*/
export interface DynamoDeleteItemJsonataProps extends sfn.TaskStateJsonataBaseProps, DynamoDeleteItemOptions {
}
/**
* Properties for DynamoDeleteItem Task
*/
export interface DynamoDeleteItemProps extends sfn.TaskStateBaseProps, DynamoDeleteItemOptions {
}
/**
* A StepFunctions task to call DynamoDeleteItem
*/
export declare class DynamoDeleteItem extends sfn.TaskStateBase {
private readonly props;
/**
* A StepFunctions task to call DynamoDeleteItem using JSONPath
*/
static jsonPath(scope: Construct, id: string, props: DynamoDeleteItemJsonPathProps): DynamoDeleteItem;
/**
* A StepFunctions task to call DynamoDeleteItem using JSONata
*/
static jsonata(scope: Construct, id: string, props: DynamoDeleteItemJsonataProps): DynamoDeleteItem;
protected readonly taskMetrics?: sfn.TaskMetricsConfig;
protected readonly taskPolicies?: iam.PolicyStatement[];
constructor(scope: Construct, id: string, props: DynamoDeleteItemProps);
/**
* @internal
*/
protected _renderTask(topLevelQueryLanguage?: sfn.QueryLanguage): any;
}
export {};

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.DynamoDeleteItem=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var utils_1=()=>{var tmp=require("./private/utils");return utils_1=()=>tmp,tmp},iam=()=>{var tmp=require("../../../aws-iam");return iam=()=>tmp,tmp},sfn=()=>{var tmp=require("../../../aws-stepfunctions");return sfn=()=>tmp,tmp},core_1=()=>{var tmp=require("../../../core");return core_1=()=>tmp,tmp};class DynamoDeleteItem extends sfn().TaskStateBase{props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_stepfunctions_tasks.DynamoDeleteItem",version:"2.252.0"};static jsonPath(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_DynamoDeleteItemJsonPathProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.jsonPath),error}return new DynamoDeleteItem(scope,id,props)}static jsonata(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_DynamoDeleteItemJsonataProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.jsonata),error}return new DynamoDeleteItem(scope,id,{...props,queryLanguage:sfn().QueryLanguage.JSONATA})}taskMetrics;taskPolicies;constructor(scope,id,props){super(scope,id,props),this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_DynamoDeleteItemProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,DynamoDeleteItem),error}this.taskPolicies=[new(iam()).PolicyStatement({resources:[core_1().Stack.of(this).formatArn({service:"dynamodb",resource:"table",resourceName:props.table.tableRef.tableName})],actions:[`dynamodb:${utils_1().DynamoMethod.DELETE}Item`]})]}_renderTask(topLevelQueryLanguage){const queryLanguage=sfn()._getActualQueryLanguage(topLevelQueryLanguage,this.props.queryLanguage);return{Resource:(0,utils_1().getDynamoResourceArn)(utils_1().DynamoMethod.DELETE),...this._renderParametersOrArguments({Key:(0,utils_1().transformAttributeValueMap)(this.props.key),TableName:this.props.table.tableRef.tableName,ConditionExpression:this.props.conditionExpression,ExpressionAttributeNames:this.props.expressionAttributeNames,ExpressionAttributeValues:(0,utils_1().transformAttributeValueMap)(this.props.expressionAttributeValues),ReturnConsumedCapacity:this.props.returnConsumedCapacity,ReturnItemCollectionMetrics:this.props.returnItemCollectionMetrics,ReturnValues:this.props.returnValues},queryLanguage)}}}exports.DynamoDeleteItem=DynamoDeleteItem;

View File

@@ -0,0 +1,96 @@
import type { Construct } from 'constructs';
import type { DynamoAttributeValue, DynamoConsumedCapacity, DynamoProjectionExpression } from './shared-types';
import type * as ddb from '../../../aws-dynamodb';
import * as iam from '../../../aws-iam';
import * as sfn from '../../../aws-stepfunctions';
interface DynamoGetItemOptions {
/**
* The name of the table containing the requested item.
*/
readonly table: ddb.ITableRef;
/**
* Primary key of the item to retrieve.
*
* For the primary key, you must provide all of the attributes.
* For example, with a simple primary key, you only need to provide a value for the partition key.
* For a composite primary key, you must provide values for both the partition key and the sort key.
*
* @see https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_GetItem.html#DDB-GetItem-request-Key
*/
readonly key: {
[key: string]: DynamoAttributeValue;
};
/**
* Determines the read consistency model:
* If set to true, then the operation uses strongly consistent reads;
* otherwise, the operation uses eventually consistent reads.
*
* @default false
*/
readonly consistentRead?: boolean;
/**
* One or more substitution tokens for attribute names in an expression
*
* @see https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_GetItem.html#DDB-GetItem-request-ExpressionAttributeNames
*
* @default - No expression attributes
*/
readonly expressionAttributeNames?: {
[key: string]: string;
};
/**
* An array of DynamoProjectionExpression that identifies one or more attributes to retrieve from the table.
* These attributes can include scalars, sets, or elements of a JSON document.
*
* @see https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_GetItem.html#DDB-GetItem-request-ProjectionExpression
*
* @default - No projection expression
*/
readonly projectionExpression?: DynamoProjectionExpression[];
/**
* Determines the level of detail about provisioned throughput consumption that is returned in the response
*
* @see https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_GetItem.html#DDB-GetItem-request-ReturnConsumedCapacity
*
* @default DynamoConsumedCapacity.NONE
*/
readonly returnConsumedCapacity?: DynamoConsumedCapacity;
}
/**
* Properties for DynamoGetItem Task using JSONPath
*/
export interface DynamoGetItemJsonPathProps extends sfn.TaskStateJsonPathBaseProps, DynamoGetItemOptions {
}
/**
* Properties for DynamoGetItem Task using JSONata
*/
export interface DynamoGetItemJsonataProps extends sfn.TaskStateJsonataBaseProps, DynamoGetItemOptions {
}
/**
* Properties for DynamoGetItem Task
*/
export interface DynamoGetItemProps extends sfn.TaskStateBaseProps, DynamoGetItemOptions {
}
/**
* A StepFunctions task to call DynamoGetItem
*/
export declare class DynamoGetItem extends sfn.TaskStateBase {
private readonly props;
/**
* A StepFunctions task using JSONPath to call DynamoGetItem
*/
static jsonPath(scope: Construct, id: string, props: DynamoGetItemJsonPathProps): DynamoGetItem;
/**
* A StepFunctions task using JSONata to call DynamoGetItem
*/
static jsonata(scope: Construct, id: string, props: DynamoGetItemJsonataProps): DynamoGetItem;
protected readonly taskMetrics?: sfn.TaskMetricsConfig;
protected readonly taskPolicies?: iam.PolicyStatement[];
constructor(scope: Construct, id: string, props: DynamoGetItemProps);
/**
* @internal
*/
protected _renderTask(topLevelQueryLanguage?: sfn.QueryLanguage): any;
private configureProjectionExpression;
}
export {};

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.DynamoGetItem=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var utils_1=()=>{var tmp=require("./private/utils");return utils_1=()=>tmp,tmp},iam=()=>{var tmp=require("../../../aws-iam");return iam=()=>tmp,tmp},sfn=()=>{var tmp=require("../../../aws-stepfunctions");return sfn=()=>tmp,tmp},core_1=()=>{var tmp=require("../../../core");return core_1=()=>tmp,tmp};class DynamoGetItem extends sfn().TaskStateBase{props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_stepfunctions_tasks.DynamoGetItem",version:"2.252.0"};static jsonPath(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_DynamoGetItemJsonPathProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.jsonPath),error}return new DynamoGetItem(scope,id,props)}static jsonata(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_DynamoGetItemJsonataProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.jsonata),error}return new DynamoGetItem(scope,id,{...props,queryLanguage:sfn().QueryLanguage.JSONATA})}taskMetrics;taskPolicies;constructor(scope,id,props){super(scope,id,props),this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_DynamoGetItemProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,DynamoGetItem),error}this.taskPolicies=[new(iam()).PolicyStatement({resources:[core_1().Stack.of(this).formatArn({service:"dynamodb",resource:"table",resourceName:props.table.tableRef.tableName})],actions:[`dynamodb:${utils_1().DynamoMethod.GET}Item`]})]}_renderTask(topLevelQueryLanguage){const queryLanguage=sfn()._getActualQueryLanguage(topLevelQueryLanguage,this.props.queryLanguage);return{Resource:(0,utils_1().getDynamoResourceArn)(utils_1().DynamoMethod.GET),...this._renderParametersOrArguments({Key:(0,utils_1().transformAttributeValueMap)(this.props.key),TableName:this.props.table.tableRef.tableName,ConsistentRead:this.props.consistentRead??!1,ExpressionAttributeNames:this.props.expressionAttributeNames,ProjectionExpression:this.configureProjectionExpression(this.props.projectionExpression),ReturnConsumedCapacity:this.props.returnConsumedCapacity},queryLanguage)}}configureProjectionExpression(expressions){return expressions?expressions.map(expression=>expression.toString()).join(","):void 0}}exports.DynamoGetItem=DynamoGetItem;

View File

@@ -0,0 +1,13 @@
import type { DynamoAttributeValue } from '../shared-types';
export declare enum DynamoMethod {
GET = "Get",
PUT = "Put",
DELETE = "Delete",
UPDATE = "Update"
}
export declare function getDynamoResourceArn(method: DynamoMethod): string;
export declare function transformAttributeValueMap(attrMap?: {
[key: string]: DynamoAttributeValue;
}): any;
export declare function validateJsonPath(value: string): void;
export declare function validateJsonata(value: string): void;

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.DynamoMethod=void 0,exports.getDynamoResourceArn=getDynamoResourceArn,exports.transformAttributeValueMap=transformAttributeValueMap,exports.validateJsonPath=validateJsonPath,exports.validateJsonata=validateJsonata;var sfn=()=>{var tmp=require("../../../../aws-stepfunctions");return sfn=()=>tmp,tmp},core_1=()=>{var tmp=require("../../../../core");return core_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp},task_utils_1=()=>{var tmp=require("../../private/task-utils");return task_utils_1=()=>tmp,tmp},DynamoMethod;(function(DynamoMethod2){DynamoMethod2.GET="Get",DynamoMethod2.PUT="Put",DynamoMethod2.DELETE="Delete",DynamoMethod2.UPDATE="Update"})(DynamoMethod||(exports.DynamoMethod=DynamoMethod={}));function getDynamoResourceArn(method){return(0,task_utils_1().integrationResourceArn)("dynamodb",`${method.toLowerCase()}Item`,sfn().IntegrationPattern.REQUEST_RESPONSE)}function transformAttributeValueMap(attrMap){const transformedValue={};for(const key in attrMap)key&&(transformedValue[key]=attrMap[key].toObject());return attrMap?transformedValue:void 0}function validateJsonPath(value){if(!value.startsWith("$"))throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`DataJsonPathValues`,"Data JSON path values must either be exactly equal to '$' or start with '$.'")}function validateJsonata(value){if(!value.startsWith("{%")||!value.endsWith("%}"))throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`DataJsonataExpressionValues`,"Data JSONata expression values must either be exactly start with '{%' and end with '%}'")}

View File

@@ -0,0 +1,111 @@
import type { Construct } from 'constructs';
import type { DynamoAttributeValue, DynamoConsumedCapacity, DynamoItemCollectionMetrics, DynamoReturnValues } from './shared-types';
import type * as ddb from '../../../aws-dynamodb';
import * as iam from '../../../aws-iam';
import * as sfn from '../../../aws-stepfunctions';
interface DynamoPutItemOptions {
/**
* A map of attribute name/value pairs, one for each attribute.
* Only the primary key attributes are required;
* you can optionally provide other attribute name-value pairs for the item.
*
* @see https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_PutItem.html#DDB-PutItem-request-Item
*/
readonly item: {
[key: string]: DynamoAttributeValue;
};
/**
* The name of the table where the item should be written .
*/
readonly table: ddb.ITableRef;
/**
* A condition that must be satisfied in order for a conditional PutItem operation to succeed.
*
* @see https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_PutItem.html#DDB-PutItem-request-ConditionExpression
*
* @default - No condition expression
*/
readonly conditionExpression?: string;
/**
* One or more substitution tokens for attribute names in an expression
*
* @see https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_PutItem.html#DDB-PutItem-request-ExpressionAttributeNames
*
* @default - No expression attribute names
*/
readonly expressionAttributeNames?: {
[key: string]: string;
};
/**
* One or more values that can be substituted in an expression.
*
* @see https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_PutItem.html#DDB-PutItem-request-ExpressionAttributeValues
*
* @default - No expression attribute values
*/
readonly expressionAttributeValues?: {
[key: string]: DynamoAttributeValue;
};
/**
* Determines the level of detail about provisioned throughput consumption that is returned in the response
*
* @see https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_PutItem.html#DDB-PutItem-request-ReturnConsumedCapacity
*
* @default DynamoConsumedCapacity.NONE
*/
readonly returnConsumedCapacity?: DynamoConsumedCapacity;
/**
* The item collection metrics to returned in the response
*
* @see https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LSI.html#LSI.ItemCollections
*
* @default DynamoItemCollectionMetrics.NONE
*/
readonly returnItemCollectionMetrics?: DynamoItemCollectionMetrics;
/**
* Use ReturnValues if you want to get the item attributes as they appeared
* before they were updated with the PutItem request.
*
* @see https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_PutItem.html#DDB-PutItem-request-ReturnValues
*
* @default DynamoReturnValues.NONE
*/
readonly returnValues?: DynamoReturnValues;
}
/**
* Properties for DynamoPutItem Task using JSONPath
*/
export interface DynamoPutItemJsonPathProps extends sfn.TaskStateJsonPathBaseProps, DynamoPutItemOptions {
}
/**
* Properties for DynamoPutItem Task using JSONata
*/
export interface DynamoPutItemJsonataProps extends sfn.TaskStateJsonataBaseProps, DynamoPutItemOptions {
}
/**
* Properties for DynamoPutItem Task
*/
export interface DynamoPutItemProps extends sfn.TaskStateBaseProps, DynamoPutItemOptions {
}
/**
* A StepFunctions task to call DynamoPutItem
*/
export declare class DynamoPutItem extends sfn.TaskStateBase {
private readonly props;
/**
* A StepFunctions task using JSONPath to call DynamoPutItem
*/
static jsonPath(scope: Construct, id: string, props: DynamoPutItemJsonPathProps): DynamoPutItem;
/**
* A StepFunctions task using JSONata to call DynamoPutItem
*/
static jsonata(scope: Construct, id: string, props: DynamoPutItemJsonataProps): DynamoPutItem;
protected readonly taskMetrics?: sfn.TaskMetricsConfig;
protected readonly taskPolicies?: iam.PolicyStatement[];
constructor(scope: Construct, id: string, props: DynamoPutItemProps);
/**
* @internal
*/
protected _renderTask(topLevelQueryLanguage?: sfn.QueryLanguage): any;
}
export {};

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.DynamoPutItem=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var utils_1=()=>{var tmp=require("./private/utils");return utils_1=()=>tmp,tmp},iam=()=>{var tmp=require("../../../aws-iam");return iam=()=>tmp,tmp},sfn=()=>{var tmp=require("../../../aws-stepfunctions");return sfn=()=>tmp,tmp},core_1=()=>{var tmp=require("../../../core");return core_1=()=>tmp,tmp};class DynamoPutItem extends sfn().TaskStateBase{props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_stepfunctions_tasks.DynamoPutItem",version:"2.252.0"};static jsonPath(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_DynamoPutItemJsonPathProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.jsonPath),error}return new DynamoPutItem(scope,id,props)}static jsonata(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_DynamoPutItemJsonataProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.jsonata),error}return new DynamoPutItem(scope,id,{...props,queryLanguage:sfn().QueryLanguage.JSONATA})}taskMetrics;taskPolicies;constructor(scope,id,props){super(scope,id,props),this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_DynamoPutItemProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,DynamoPutItem),error}this.taskPolicies=[new(iam()).PolicyStatement({resources:[core_1().Stack.of(this).formatArn({service:"dynamodb",resource:"table",resourceName:props.table.tableRef.tableName})],actions:[`dynamodb:${utils_1().DynamoMethod.PUT}Item`]})]}_renderTask(topLevelQueryLanguage){const queryLanguage=sfn()._getActualQueryLanguage(topLevelQueryLanguage,this.props.queryLanguage);return{Resource:(0,utils_1().getDynamoResourceArn)(utils_1().DynamoMethod.PUT),...this._renderParametersOrArguments({Item:(0,utils_1().transformAttributeValueMap)(this.props.item),TableName:this.props.table.tableRef.tableName,ConditionExpression:this.props.conditionExpression,ExpressionAttributeNames:this.props.expressionAttributeNames,ExpressionAttributeValues:(0,utils_1().transformAttributeValueMap)(this.props.expressionAttributeValues),ReturnConsumedCapacity:this.props.returnConsumedCapacity,ReturnItemCollectionMetrics:this.props.returnItemCollectionMetrics,ReturnValues:this.props.returnValues},queryLanguage)}}}exports.DynamoPutItem=DynamoPutItem;

View File

@@ -0,0 +1,209 @@
/**
* Determines the level of detail about provisioned throughput consumption that is returned.
*/
export declare enum DynamoConsumedCapacity {
/**
* The response includes the aggregate ConsumedCapacity for the operation,
* together with ConsumedCapacity for each table and secondary index that was accessed
*/
INDEXES = "INDEXES",
/**
* The response includes only the aggregate ConsumedCapacity for the operation.
*/
TOTAL = "TOTAL",
/**
* No ConsumedCapacity details are included in the response.
*/
NONE = "NONE"
}
/**
* Determines whether item collection metrics are returned.
*/
export declare enum DynamoItemCollectionMetrics {
/**
* If set to SIZE, the response includes statistics about item collections,
* if any, that were modified during the operation.
*/
SIZE = "SIZE",
/**
* If set to NONE, no statistics are returned.
*/
NONE = "NONE"
}
/**
* Use ReturnValues if you want to get the item attributes as they appear before or after they are changed
*/
export declare enum DynamoReturnValues {
/**
* Nothing is returned
*/
NONE = "NONE",
/**
* Returns all of the attributes of the item
*/
ALL_OLD = "ALL_OLD",
/**
* Returns only the updated attributes
*/
UPDATED_OLD = "UPDATED_OLD",
/**
* Returns all of the attributes of the item
*/
ALL_NEW = "ALL_NEW",
/**
* Returns only the updated attributes
*/
UPDATED_NEW = "UPDATED_NEW"
}
/**
* Class to generate projection expression
*/
export declare class DynamoProjectionExpression {
private expression;
/**
* Adds the passed attribute to the chain
*
* @param attr Attribute name
*/
withAttribute(attr: string): DynamoProjectionExpression;
/**
* Adds the array literal access for passed index
*
* @param index array index
*/
atIndex(index: number): DynamoProjectionExpression;
/**
* converts and return the string expression
*/
toString(): string;
}
/**
* Represents the data for an attribute.
* Each attribute value is described as a name-value pair.
* The name is the data type, and the value is the data itself.
*
* @see https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_AttributeValue.html
*/
export declare class DynamoAttributeValue {
/**
* Sets an attribute of type String. For example: "S": "Hello"
* Strings may be literal values or as JSONata expression or as JsonPath. Example values:
*
* - `DynamoAttributeValue.fromString('someValue')`
* - `DynamoAttributeValue.fromString('{% $bar %}')`
* - `DynamoAttributeValue.fromString(JsonPath.stringAt('$.bar'))`
*/
static fromString(value: string): DynamoAttributeValue;
/**
* Sets a literal number. For example: 1234
* Numbers are sent across the network to DynamoDB as strings,
* to maximize compatibility across languages and libraries.
* However, DynamoDB treats them as number type attributes for mathematical operations.
*/
static fromNumber(value: number): DynamoAttributeValue;
/**
* Sets an attribute of type Number. For example: "N": "123.45"
* Numbers are sent across the network to DynamoDB as strings,
* to maximize compatibility across languages and libraries.
* However, DynamoDB treats them as number type attributes for mathematical operations.
*
* Numbers may be expressed as literal strings or as JSONata expression or as JsonPath
*/
static numberFromString(value: string): DynamoAttributeValue;
/**
* Sets an attribute of type Binary. For example: "B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"
*
* @param value base-64 encoded string
*/
static fromBinary(value: string): DynamoAttributeValue;
/**
* Sets an attribute of type String Set. For example: "SS": ["Giraffe", "Hippo" ,"Zebra"]
*/
static fromStringSet(value: string[]): DynamoAttributeValue;
/**
* Sets an attribute of type Number Set. For example: "NS": ["42.2", "-19", "7.5", "3.14"]
* Numbers are sent across the network to DynamoDB as strings,
* to maximize compatibility across languages and libraries.
* However, DynamoDB treats them as number type attributes for mathematical operations.
*/
static fromNumberSet(value: number[]): DynamoAttributeValue;
/**
* Sets an attribute of type Number Set. For example: "NS": ["42.2", "-19", "7.5", "3.14"]
* Numbers are sent across the network to DynamoDB as strings,
* to maximize compatibility across languages and libraries.
* However, DynamoDB treats them as number type attributes for mathematical operations.
*
* Numbers may be expressed as literal strings or as JsonPath
*/
static numberSetFromStrings(value: string[]): DynamoAttributeValue;
/**
* Sets an attribute of type Binary Set. For example: "BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]
*/
static fromBinarySet(value: string[]): DynamoAttributeValue;
/**
* Sets an attribute of type Map. For example: "M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}
*/
static fromMap(value: {
[key: string]: DynamoAttributeValue;
}): DynamoAttributeValue;
/**
* Sets an attribute of type Map. For example: "M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}
*
* @param value JSONata expression that specifies state input to be used
*/
static mapFromJsonata(value: string): DynamoAttributeValue;
/**
* Sets an attribute of type Map. For example: "M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}
*
* @param value Json path that specifies state input to be used
*/
static mapFromJsonPath(value: string): DynamoAttributeValue;
/**
* Sets an attribute of type List. For example: "L": [ {"S": "Cookies"} , {"S": "Coffee"}, {"N", "3.14159"}]
*/
static fromList(value: DynamoAttributeValue[]): DynamoAttributeValue;
/**
* Sets an attribute of type List. For example: "L": [ {"S": "Cookies"} , {"S": "Coffee"}, {"S", "Veggies"}]
*
* @param value JSONata expression that specifies state input to be used
*/
static listFromJsonata(value: string): DynamoAttributeValue;
/**
* Sets an attribute of type List. For example: "L": [ {"S": "Cookies"} , {"S": "Coffee"}, {"S", "Veggies"}]
*
* @param value Json path that specifies state input to be used
*/
static listFromJsonPath(value: string): DynamoAttributeValue;
/**
* Sets an attribute of type Null. For example: "NULL": true
*/
static fromNull(value: boolean): DynamoAttributeValue;
/**
* Sets an attribute of type Boolean. For example: "BOOL": true
*/
static fromBoolean(value: boolean): DynamoAttributeValue;
/**
* Sets an attribute of type Boolean from state input through JSONata expression.
* For example: "BOOL": true
*
* @param value JSONata expression that specifies state input to be used
*/
static booleanFromJsonata(value: string): DynamoAttributeValue;
/**
* Sets an attribute of type Boolean from state input through Json path.
* For example: "BOOL": true
*
* @param value Json path that specifies state input to be used
*/
static booleanFromJsonPath(value: string): DynamoAttributeValue;
/**
* Represents the data for the attribute. Data can be
* i.e. "S": "Hello"
*/
readonly attributeValue: any;
private constructor();
/**
* Returns the DynamoDB attribute value
*/
toObject(): any;
}

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.DynamoAttributeValue=exports.DynamoProjectionExpression=exports.DynamoReturnValues=exports.DynamoItemCollectionMetrics=exports.DynamoConsumedCapacity=void 0;const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var utils_1=()=>{var tmp=require("./private/utils");return utils_1=()=>tmp,tmp},core_1=()=>{var tmp=require("../../../core");return core_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp},DynamoConsumedCapacity;(function(DynamoConsumedCapacity2){DynamoConsumedCapacity2.INDEXES="INDEXES",DynamoConsumedCapacity2.TOTAL="TOTAL",DynamoConsumedCapacity2.NONE="NONE"})(DynamoConsumedCapacity||(exports.DynamoConsumedCapacity=DynamoConsumedCapacity={}));var DynamoItemCollectionMetrics;(function(DynamoItemCollectionMetrics2){DynamoItemCollectionMetrics2.SIZE="SIZE",DynamoItemCollectionMetrics2.NONE="NONE"})(DynamoItemCollectionMetrics||(exports.DynamoItemCollectionMetrics=DynamoItemCollectionMetrics={}));var DynamoReturnValues;(function(DynamoReturnValues2){DynamoReturnValues2.NONE="NONE",DynamoReturnValues2.ALL_OLD="ALL_OLD",DynamoReturnValues2.UPDATED_OLD="UPDATED_OLD",DynamoReturnValues2.ALL_NEW="ALL_NEW",DynamoReturnValues2.UPDATED_NEW="UPDATED_NEW"})(DynamoReturnValues||(exports.DynamoReturnValues=DynamoReturnValues={}));class DynamoProjectionExpression{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_stepfunctions_tasks.DynamoProjectionExpression",version:"2.252.0"};expression=[];withAttribute(attr){return this.expression.length?this.expression.push(`.${attr}`):this.expression.push(attr),this}atIndex(index){if(!this.expression.length)throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`ExpressionStartAttribute`,"Expression must start with an attribute");return this.expression.push(`[${index}]`),this}toString(){return this.expression.join("")}}exports.DynamoProjectionExpression=DynamoProjectionExpression;class DynamoAttributeValue{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_stepfunctions_tasks.DynamoAttributeValue",version:"2.252.0"};static fromString(value){return new DynamoAttributeValue({S:value})}static fromNumber(value){return new DynamoAttributeValue({N:value.toString()})}static numberFromString(value){return new DynamoAttributeValue({N:value.toString()})}static fromBinary(value){return new DynamoAttributeValue({B:value})}static fromStringSet(value){return new DynamoAttributeValue({SS:value})}static fromNumberSet(value){return new DynamoAttributeValue({NS:value.map(String)})}static numberSetFromStrings(value){return new DynamoAttributeValue({NS:value})}static fromBinarySet(value){return new DynamoAttributeValue({BS:value})}static fromMap(value){return new DynamoAttributeValue({M:(0,utils_1().transformAttributeValueMap)(value)})}static mapFromJsonata(value){return(0,utils_1().validateJsonata)(value),new DynamoAttributeValue({M:value})}static mapFromJsonPath(value){return(0,utils_1().validateJsonPath)(value),new DynamoAttributeValue({"M.$":value})}static fromList(value){return new DynamoAttributeValue({L:value.map(val=>val.toObject())})}static listFromJsonata(value){return(0,utils_1().validateJsonata)(value),new DynamoAttributeValue({L:value})}static listFromJsonPath(value){return(0,utils_1().validateJsonPath)(value),new DynamoAttributeValue({L:value})}static fromNull(value){return new DynamoAttributeValue({NULL:value})}static fromBoolean(value){return new DynamoAttributeValue({BOOL:value})}static booleanFromJsonata(value){return(0,utils_1().validateJsonata)(value),new DynamoAttributeValue({BOOL:value})}static booleanFromJsonPath(value){return(0,utils_1().validateJsonPath)(value),new DynamoAttributeValue({BOOL:value.toString()})}attributeValue;constructor(value){this.attributeValue=value}toObject(){return this.attributeValue}}exports.DynamoAttributeValue=DynamoAttributeValue;

View File

@@ -0,0 +1,122 @@
import type { Construct } from 'constructs';
import type { DynamoAttributeValue, DynamoConsumedCapacity, DynamoItemCollectionMetrics, DynamoReturnValues } from './shared-types';
import type * as ddb from '../../../aws-dynamodb';
import * as iam from '../../../aws-iam';
import * as sfn from '../../../aws-stepfunctions';
interface DynamoUpdateItemOptions {
/**
* The name of the table containing the requested item.
*/
readonly table: ddb.ITableRef;
/**
* Primary key of the item to retrieve.
*
* For the primary key, you must provide all of the attributes.
* For example, with a simple primary key, you only need to provide a value for the partition key.
* For a composite primary key, you must provide values for both the partition key and the sort key.
*
* @see https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_GetItem.html#DDB-GetItem-request-Key
*/
readonly key: {
[key: string]: DynamoAttributeValue;
};
/**
* A condition that must be satisfied in order for a conditional DeleteItem to succeed.
*
* @see https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateItem.html#DDB-UpdateItem-request-ConditionExpression
*
* @default - No condition expression
*/
readonly conditionExpression?: string;
/**
* One or more substitution tokens for attribute names in an expression
*
* @see https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateItem.html#DDB-UpdateItem-request-ExpressionAttributeNames
*
* @default - No expression attribute names
*/
readonly expressionAttributeNames?: {
[key: string]: string;
};
/**
* One or more values that can be substituted in an expression.
*
* @see https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateItem.html#DDB-UpdateItem-request-ExpressionAttributeValues
*
* @default - No expression attribute values
*/
readonly expressionAttributeValues?: {
[key: string]: DynamoAttributeValue;
};
/**
* Determines the level of detail about provisioned throughput consumption that is returned in the response
*
* @see https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateItem.html#DDB-UpdateItem-request-ReturnConsumedCapacity
*
* @default DynamoConsumedCapacity.NONE
*/
readonly returnConsumedCapacity?: DynamoConsumedCapacity;
/**
* Determines whether item collection metrics are returned.
* If set to SIZE, the response includes statistics about item collections, if any,
* that were modified during the operation are returned in the response.
* If set to NONE (the default), no statistics are returned.
*
* @default DynamoItemCollectionMetrics.NONE
*/
readonly returnItemCollectionMetrics?: DynamoItemCollectionMetrics;
/**
* Use ReturnValues if you want to get the item attributes as they appeared before they were deleted.
*
* @see https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateItem.html#DDB-UpdateItem-request-ReturnValues
*
* @default DynamoReturnValues.NONE
*/
readonly returnValues?: DynamoReturnValues;
/**
* An expression that defines one or more attributes to be updated,
* the action to be performed on them, and new values for them.
*
* @see https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateItem.html#DDB-UpdateItem-request-UpdateExpression
*
* @default - No update expression
*/
readonly updateExpression?: string;
}
/**
* Properties for DynamoUpdateItem Task using JSONPath
*/
export interface DynamoUpdateItemJsonPathProps extends sfn.TaskStateJsonPathBaseProps, DynamoUpdateItemOptions {
}
/**
* Properties for DynamoUpdateItem Task using JSONata
*/
export interface DynamoUpdateItemJsonataProps extends sfn.TaskStateJsonataBaseProps, DynamoUpdateItemOptions {
}
/**
* Properties for DynamoUpdateItem Task
*/
export interface DynamoUpdateItemProps extends sfn.TaskStateBaseProps, DynamoUpdateItemOptions {
}
/**
* A StepFunctions task to call DynamoUpdateItem
*/
export declare class DynamoUpdateItem extends sfn.TaskStateBase {
private readonly props;
/**
* A StepFunctions task using JSONPath to call DynamoUpdateItem
*/
static jsonPath(scope: Construct, id: string, props: DynamoUpdateItemJsonPathProps): DynamoUpdateItem;
/**
* A StepFunctions task using JSONata to call DynamoUpdateItem
*/
static jsonata(scope: Construct, id: string, props: DynamoUpdateItemJsonataProps): DynamoUpdateItem;
protected readonly taskMetrics?: sfn.TaskMetricsConfig;
protected readonly taskPolicies?: iam.PolicyStatement[];
constructor(scope: Construct, id: string, props: DynamoUpdateItemProps);
/**
* @internal
*/
protected _renderTask(topLevelQueryLanguage?: sfn.QueryLanguage): any;
}
export {};

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.DynamoUpdateItem=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var utils_1=()=>{var tmp=require("./private/utils");return utils_1=()=>tmp,tmp},iam=()=>{var tmp=require("../../../aws-iam");return iam=()=>tmp,tmp},sfn=()=>{var tmp=require("../../../aws-stepfunctions");return sfn=()=>tmp,tmp},core_1=()=>{var tmp=require("../../../core");return core_1=()=>tmp,tmp};class DynamoUpdateItem extends sfn().TaskStateBase{props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_stepfunctions_tasks.DynamoUpdateItem",version:"2.252.0"};static jsonPath(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_DynamoUpdateItemJsonPathProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.jsonPath),error}return new DynamoUpdateItem(scope,id,props)}static jsonata(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_DynamoUpdateItemJsonataProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.jsonata),error}return new DynamoUpdateItem(scope,id,{...props,queryLanguage:sfn().QueryLanguage.JSONATA})}taskMetrics;taskPolicies;constructor(scope,id,props){super(scope,id,props),this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_DynamoUpdateItemProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,DynamoUpdateItem),error}this.taskPolicies=[new(iam()).PolicyStatement({resources:[core_1().Stack.of(this).formatArn({service:"dynamodb",resource:"table",resourceName:props.table.tableRef.tableName})],actions:[`dynamodb:${utils_1().DynamoMethod.UPDATE}Item`]})]}_renderTask(topLevelQueryLanguage){const queryLanguage=sfn()._getActualQueryLanguage(topLevelQueryLanguage,this.props.queryLanguage);return{Resource:(0,utils_1().getDynamoResourceArn)(utils_1().DynamoMethod.UPDATE),...this._renderParametersOrArguments({Key:(0,utils_1().transformAttributeValueMap)(this.props.key),TableName:this.props.table.tableRef.tableName,ConditionExpression:this.props.conditionExpression,ExpressionAttributeNames:this.props.expressionAttributeNames,ExpressionAttributeValues:(0,utils_1().transformAttributeValueMap)(this.props.expressionAttributeValues),ReturnConsumedCapacity:this.props.returnConsumedCapacity,ReturnItemCollectionMetrics:this.props.returnItemCollectionMetrics,ReturnValues:this.props.returnValues,UpdateExpression:this.props.updateExpression},queryLanguage)}}}exports.DynamoUpdateItem=DynamoUpdateItem;

View File

@@ -0,0 +1,4 @@
import type { CommonEcsRunTaskProps } from './run-ecs-task-base';
import './run-ecs-task-base';
import type * as ec2 from '../../../aws-ec2';
import * as ecs from '../../../aws-ecs';

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.RunEcsEc2Task=void 0;const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var run_ecs_task_base_1=()=>{var tmp=require("./run-ecs-task-base");return run_ecs_task_base_1=()=>tmp,tmp},ecs=()=>{var tmp=require("../../../aws-ecs");return ecs=()=>tmp,tmp},core_1=()=>{var tmp=require("../../../core");return core_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp};class RunEcsEc2Task extends run_ecs_task_base_1().EcsRunTaskBase{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_stepfunctions_tasks.RunEcsEc2Task",version:"2.252.0"};constructor(props){if(!props.taskDefinition.isEc2Compatible)throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`SuppliedTaskdefinitionConfiguredCompatibility`,"Supplied TaskDefinition is not configured for compatibility with EC2");if(!props.cluster.hasEc2Capacity)throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`ClusterServiceNeedsCapacity`,"Cluster for this service needs Ec2 capacity. Call addXxxCapacity() on the cluster.");if(!props.taskDefinition.defaultContainer)throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`TaskdefinitionLeastEssentialContainer`,"A TaskDefinition must have at least one essential container");super({...props,parameters:{LaunchType:"EC2",PlacementConstraints:noEmpty(flatten((props.placementConstraints||[]).map(c=>c.toJson().map(uppercaseKeys)))),PlacementStrategy:noEmpty(flatten((props.placementStrategies||[]).map(c=>c.toJson().map(uppercaseKeys))))}}),props.taskDefinition.networkMode===ecs().NetworkMode.AWS_VPC?this.configureAwsVpcNetworking(props.cluster.vpc,void 0,props.subnets,props.securityGroup):(validateNoNetworkingProps(props),this.connections.addSecurityGroup(...props.cluster.connections.securityGroups))}}exports.RunEcsEc2Task=RunEcsEc2Task;function validateNoNetworkingProps(props){if(props.subnets!==void 0||props.securityGroup!==void 0)throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`VpcplacementSecuritygroupOnlyUsed`,"vpcPlacement and securityGroup can only be used in AwsVpc networking mode")}function uppercaseKeys(obj){const ret={};for(const key of Object.keys(obj))ret[key.slice(0,1).toUpperCase()+key.slice(1)]=obj[key];return ret}function flatten(xs){return Array.prototype.concat([],...xs)}function noEmpty(xs){if(xs.length!==0)return xs}

View File

@@ -0,0 +1,4 @@
import type { CommonEcsRunTaskProps } from './run-ecs-task-base';
import './run-ecs-task-base';
import type * as ec2 from '../../../aws-ec2';
import type * as ecs from '../../../aws-ecs';

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.RunEcsFargateTask=void 0;const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var run_ecs_task_base_1=()=>{var tmp=require("./run-ecs-task-base");return run_ecs_task_base_1=()=>tmp,tmp},core_1=()=>{var tmp=require("../../../core");return core_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp};class RunEcsFargateTask extends run_ecs_task_base_1().EcsRunTaskBase{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_stepfunctions_tasks.RunEcsFargateTask",version:"2.252.0"};constructor(props){if(!props.taskDefinition.isFargateCompatible)throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`SuppliedTaskdefinitionConfiguredCompatibility`,"Supplied TaskDefinition is not configured for compatibility with Fargate");if(!props.taskDefinition.defaultContainer)throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`TaskdefinitionLeastEssentialContainer`,"A TaskDefinition must have at least one essential container");super({...props,parameters:{LaunchType:"FARGATE"}}),this.configureAwsVpcNetworking(props.cluster.vpc,props.assignPublicIp,props.subnets,props.securityGroup)}}exports.RunEcsFargateTask=RunEcsFargateTask;

View File

@@ -0,0 +1,61 @@
import type { ContainerDefinition } from '../../../aws-ecs';
/**
* A list of container overrides that specify the name of a container
* and the overrides it should receive.
*/
export interface ContainerOverride {
/**
* Name of the container inside the task definition
*/
readonly containerDefinition: ContainerDefinition;
/**
* Command to run inside the container
*
* @default - Default command from the Docker image or the task definition
*/
readonly command?: string[];
/**
* The environment variables to send to the container.
*
* You can add new environment variables, which are added to the container at launch,
* or you can override the existing environment variables from the Docker image or the task definition.
*
* @default - The existing environment variables from the Docker image or the task definition
*/
readonly environment?: TaskEnvironmentVariable[];
/**
* The number of cpu units reserved for the container
*
* @default - The default value from the task definition.
*/
readonly cpu?: number;
/**
* The hard limit (in MiB) of memory to present to the container
*
* @default - The default value from the task definition.
*/
readonly memoryLimit?: number;
/**
* The soft limit (in MiB) of memory to reserve for the container
*
* @default - The default value from the task definition.
*/
readonly memoryReservation?: number;
}
/**
* An environment variable to be set in the container run as a task
*/
export interface TaskEnvironmentVariable {
/**
* Name for the environment variable
*
* Use `JsonPath` class's static methods to specify name from a JSON path.
*/
readonly name: string;
/**
* Value of the environment variable
*
* Use `JsonPath` class's static methods to specify value from a JSON path.
*/
readonly value: string;
}

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});

View File

@@ -0,0 +1,39 @@
import type { ContainerOverride } from './run-ecs-task-base-types';
import * as ec2 from '../../../aws-ec2';
import type * as ecs from '../../../aws-ecs';
import * as sfn from '../../../aws-stepfunctions';
/**
* Basic properties for ECS Tasks
*/
export interface CommonEcsRunTaskProps {
/**
* The topic to run the task on
*/
readonly cluster: ecs.ICluster;
/**
* Task Definition used for running tasks in the service.
*
* Note: this must be TaskDefinition, and not ITaskDefinition,
* as it requires properties that are not known for imported task definitions
* If you want to run a RunTask with an imported task definition,
* consider using CustomState
*/
readonly taskDefinition: ecs.TaskDefinition;
/**
* Container setting overrides
*
* Key is the name of the container to override, value is the
* values you want to override.
*
* @default - No overrides
*/
readonly containerOverrides?: ContainerOverride[];
/**
* The service integration pattern indicates different ways to call RunTask in ECS.
*
* The valid value for Lambda is FIRE_AND_FORGET, SYNC and WAIT_FOR_TASK_TOKEN.
*
* @default FIRE_AND_FORGET
*/
readonly integrationPattern?: sfn.ServiceIntegrationPattern;
}

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.EcsRunTaskBase=void 0;const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var ec2=()=>{var tmp=require("../../../aws-ec2");return ec2=()=>tmp,tmp},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},literal_string_1=()=>{var tmp=require("../../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp},resource_arn_suffix_1=()=>{var tmp=require("../resource-arn-suffix");return resource_arn_suffix_1=()=>tmp,tmp};class EcsRunTaskBase{props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_stepfunctions_tasks.EcsRunTaskBase",version:"2.252.0"};connections=new(ec2()).Connections;securityGroup;networkConfiguration;integrationPattern;constructor(props){if(this.props=props,this.integrationPattern=props.integrationPattern||sfn().ServiceIntegrationPattern.FIRE_AND_FORGET,![sfn().ServiceIntegrationPattern.FIRE_AND_FORGET,sfn().ServiceIntegrationPattern.WAIT_FOR_TASK_TOKEN,sfn().ServiceIntegrationPattern.SYNC].includes(this.integrationPattern))throw new(cdk()).UnscopedValidationError((0,literal_string_1().lit)`InvalidServiceIntegrationPattern`,`Invalid Service Integration Pattern: ${this.integrationPattern} is not supported to call ECS.`);if(this.integrationPattern===sfn().ServiceIntegrationPattern.WAIT_FOR_TASK_TOKEN&&!sfn().FieldUtils.containsTaskToken(props.containerOverrides?.map(override=>override.environment)))throw new(cdk()).UnscopedValidationError((0,literal_string_1().lit)`TaskTokenRequired`,"Task Token is required in at least one `containerOverrides.environment` for callback. Use JsonPath.taskToken to set the token.");for(const override of this.props.containerOverrides||[]){const name=override.containerDefinition.containerName;if(!cdk().Token.isUnresolved(name)&&!this.props.taskDefinition.node.tryFindChild(name))throw new(cdk()).UnscopedValidationError((0,literal_string_1().lit)`OverridesMentionContainerName`,`Overrides mention container with name '${name}', but no such container in task definition`)}}bind(task){return this.networkConfiguration!==void 0&&(this.securityGroup===void 0&&(this.securityGroup=new(ec2()).SecurityGroup(task,"SecurityGroup",{vpc:this.props.cluster.vpc})),this.connections.addSecurityGroup(this.securityGroup)),{resourceArn:(0,resource_arn_suffix_1().getResourceArn)("ecs","runTask",this.integrationPattern),parameters:{Cluster:this.props.cluster.clusterArn,TaskDefinition:this.props.taskDefinition.taskDefinitionArn,NetworkConfiguration:this.networkConfiguration,Overrides:renderOverrides(this.props.containerOverrides),...this.props.parameters},policyStatements:this.makePolicyStatements(task)}}configureAwsVpcNetworking(vpc,assignPublicIp,subnetSelection,securityGroup){subnetSelection===void 0&&(subnetSelection={subnetType:assignPublicIp?ec2().SubnetType.PUBLIC:ec2().SubnetType.PRIVATE_WITH_EGRESS}),this.securityGroup=securityGroup,this.networkConfiguration={AwsvpcConfiguration:{AssignPublicIp:assignPublicIp!==void 0?assignPublicIp?"ENABLED":"DISABLED":void 0,Subnets:vpc.selectSubnets(subnetSelection).subnetIds,SecurityGroups:cdk().Lazy.list({produce:()=>[this.securityGroup.securityGroupId]})}}}makePolicyStatements(task){const stack=cdk().Stack.of(task),policyStatements=[new(iam()).PolicyStatement({actions:["ecs:RunTask"],resources:[this.props.taskDefinition.taskDefinitionArn]}),new(iam()).PolicyStatement({actions:["ecs:StopTask","ecs:DescribeTasks"],resources:["*"]}),new(iam()).PolicyStatement({actions:["iam:PassRole"],resources:cdk().Lazy.list({produce:()=>this.taskExecutionRoles().map(r=>r.roleArn)})})];return this.integrationPattern===sfn().ServiceIntegrationPattern.SYNC&&policyStatements.push(new(iam()).PolicyStatement({actions:["events:PutTargets","events:PutRule","events:DescribeRule"],resources:[stack.formatArn({service:"events",resource:"rule",resourceName:"StepFunctionsGetEventsForECSTaskRule"})]})),policyStatements}taskExecutionRoles(){const ret=new Array;return ret.push(this.props.taskDefinition.taskRole),this.props.taskDefinition.executionRole&&ret.push(this.props.taskDefinition.executionRole),ret}}exports.EcsRunTaskBase=EcsRunTaskBase;function renderOverrides(containerOverrides){if(!containerOverrides)return;const ret=new Array;for(const override of containerOverrides)ret.push({Name:override.containerDefinition.containerName,Command:override.command,Cpu:override.cpu,Memory:override.memoryLimit,MemoryReservation:override.memoryReservation,Environment:override.environment&&override.environment.map(e=>({Name:e.name,Value:e.value}))});return{ContainerOverrides:ret}}

View File

@@ -0,0 +1,299 @@
import type { Construct } from 'constructs';
import type { ContainerOverride } from '..';
import * as ec2 from '../../../aws-ec2';
import * as ecs from '../../../aws-ecs';
import * as iam from '../../../aws-iam';
import * as sfn from '../../../aws-stepfunctions';
interface EcsRunTaskOptions {
/**
* The ECS cluster to run the task on
*/
readonly cluster: ecs.ICluster;
/**
* [disable-awslint:ref-via-interface]
* Task Definition used for running tasks in the service.
*
* Note: this must be TaskDefinition, and not ITaskDefinition,
* as it requires properties that are not known for imported task definitions
* If you want to run a RunTask with an imported task definition,
* consider using CustomState
*/
readonly taskDefinition: ecs.TaskDefinition;
/**
* The revision number of ECS task definition family
*
* @default - '$latest'
*/
readonly revisionNumber?: number;
/**
* Container setting overrides
*
* Specify the container to use and the overrides to apply.
*
* @default - No overrides
*/
readonly containerOverrides?: ContainerOverride[];
/**
* Subnets to place the task's ENIs
*
* @default - Public subnets if assignPublicIp is set. Private subnets otherwise.
*/
readonly subnets?: ec2.SubnetSelection;
/**
* Existing security groups to use for the tasks
*
* @default - A new security group is created
*/
readonly securityGroups?: ec2.ISecurityGroup[];
/**
* Assign public IP addresses to each task
*
* @default false
*/
readonly assignPublicIp?: boolean;
/**
* An Amazon ECS launch type determines the type of infrastructure on which your
* tasks and services are hosted.
*
* @see https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html
*/
readonly launchTarget: IEcsLaunchTarget;
/**
* Specifies whether to propagate the tags from the task definition to the task.
* An error will be received if you specify the SERVICE option when running a task.
*
* @see https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_RunTask.html#ECS-RunTask-request-propagateTags
*
* @default - No tags are propagated.
*/
readonly propagatedTagSource?: ecs.PropagatedTagSource;
/**
* Whether ECS Exec should be enabled
*
* @see https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_RunTask.html#ECS-RunTask-request-enableExecuteCommand
*
* @default false
*/
readonly enableExecuteCommand?: boolean;
/**
* Cpu setting override
* @see https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_TaskOverride.html
* @default - No override
*/
readonly cpu?: string;
/**
* Memory setting override
* @see https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_TaskOverride.html
* @default - No override
*/
readonly memoryMiB?: string;
}
/**
* An Amazon ECS launch type determines the type of infrastructure on which your tasks and services are hosted.
* @see https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html
*/
export interface IEcsLaunchTarget {
/**
* called when the ECS launch target is configured on RunTask
*/
bind(task: EcsRunTask, launchTargetOptions: LaunchTargetBindOptions): EcsLaunchTargetConfig;
}
/**
* Options for binding a launch target to an ECS run job task
*/
export interface LaunchTargetBindOptions {
/**
* Task definition to run Docker containers in Amazon ECS
*/
readonly taskDefinition: ecs.ITaskDefinition;
/**
* A regional grouping of one or more container instances on which you can run
* tasks and services.
*
* @default - No cluster
*/
readonly cluster?: ecs.ICluster;
}
/**
* Configuration options for the ECS launch type
*/
export interface EcsLaunchTargetConfig {
/**
* Additional parameters to pass to the base task
*
* @default - No additional parameters passed
*/
readonly parameters?: {
[key: string]: any;
};
}
/**
* Properties to define an ECS service
*/
export interface EcsFargateLaunchTargetOptions {
/**
* Refers to a specific runtime environment for Fargate task infrastructure.
* Fargate platform version is a combination of the kernel and container runtime versions.
*
* @see https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html
*/
readonly platformVersion: ecs.FargatePlatformVersion;
/**
* The capacity provider options to use for the task.
*
* This property allows you to set the capacity provider strategy for the task.
*
* If you want to set the capacity provider strategy for the task, specify
* `CapacityProviderOptions.custom()`. This is required to use the FARGATE_SPOT
* capacity provider.
*
* If you want to use the cluster's default capacity provider strategy, specify
* `CapacityProviderOptions.default()`.
*
* @default - 'FARGATE' LaunchType running tasks on AWS Fargate On-Demand
* infrastructure is used without the capacity provider strategy.
*/
readonly capacityProviderOptions?: CapacityProviderOptions;
}
/**
* Options to run an ECS task on EC2 in StepFunctions and ECS
*/
export interface EcsEc2LaunchTargetOptions {
/**
* Placement constraints
*
* @default - None
*/
readonly placementConstraints?: ecs.PlacementConstraint[];
/**
* Placement strategies
*
* @default - None
*/
readonly placementStrategies?: ecs.PlacementStrategy[];
/**
* The capacity provider options to use for the task.
*
* This property allows you to set the capacity provider strategy for the task.
*
* If you want to set the capacity provider strategy for the task, specify
* `CapacityProviderOptions.custom()`.
*
* If you want to use the cluster's default capacity provider strategy, specify
* `CapacityProviderOptions.default()`.
*
* @default - 'EC2' LaunchType running tasks on Amazon EC2 instances registered to
* your cluster is used without the capacity provider strategy.
*/
readonly capacityProviderOptions?: CapacityProviderOptions;
}
/**
* Capacity provider options
*/
export declare class CapacityProviderOptions {
private readonly capacityProviderStrategy;
/**
* Use a custom capacity provider strategy.
*
* You can specify between 1 and 20 capacity providers.
*
* @param capacityProviderStrategy The capacity provider strategy to use for the task.
*/
static custom(capacityProviderStrategy: ecs.CapacityProviderStrategy[]): CapacityProviderOptions;
/**
* Use the cluster's default capacity provider strategy.
*/
static default(): CapacityProviderOptions;
private constructor();
/**
* @internal
*/
_bind(): ecs.CapacityProviderStrategy[];
}
/**
* Configuration for running an ECS task on Fargate
*
* @see https://docs.aws.amazon.com/AmazonECS/latest/userguide/launch_types.html#launch-type-fargate
*/
export declare class EcsFargateLaunchTarget implements IEcsLaunchTarget {
private readonly options?;
constructor(options?: EcsFargateLaunchTargetOptions | undefined);
/**
* Called when the Fargate launch type configured on RunTask
*/
bind(task: EcsRunTask, launchTargetOptions: LaunchTargetBindOptions): EcsLaunchTargetConfig;
}
/**
* Configuration for running an ECS task on EC2
*
* @see https://docs.aws.amazon.com/AmazonECS/latest/userguide/launch_types.html#launch-type-ec2
*/
export declare class EcsEc2LaunchTarget implements IEcsLaunchTarget {
private readonly options?;
constructor(options?: EcsEc2LaunchTargetOptions | undefined);
/**
* Called when the EC2 launch type is configured on RunTask
*/
bind(task: EcsRunTask, launchTargetOptions: LaunchTargetBindOptions): EcsLaunchTargetConfig;
}
/**
* Properties for ECS Tasks using JSONPath
*/
export interface EcsRunTaskJsonPathProps extends sfn.TaskStateJsonPathBaseProps, EcsRunTaskOptions {
}
/**
* Properties for ECS Tasks using JSONata
*/
export interface EcsRunTaskJsonataProps extends sfn.TaskStateJsonataBaseProps, EcsRunTaskOptions {
}
/**
* Properties for ECS Tasks
*/
export interface EcsRunTaskProps extends sfn.TaskStateBaseProps, EcsRunTaskOptions {
}
/**
* Run a Task on ECS or Fargate
*/
export declare class EcsRunTask extends sfn.TaskStateBase implements ec2.IConnectable {
private readonly props;
/**
* Uniquely identifies this class.
*/
static readonly PROPERTY_INJECTION_ID: string;
/**
* Run a Task that using JSONPath on ECS or Fargate
*/
static jsonPath(scope: Construct, id: string, props: EcsRunTaskJsonPathProps): EcsRunTask;
/**
* Run a Task that using JSONata on ECS or Fargate
*/
static jsonata(scope: Construct, id: string, props: EcsRunTaskJsonataProps): EcsRunTask;
private static readonly SUPPORTED_INTEGRATION_PATTERNS;
/**
* Manage allowed network traffic for this service
*/
readonly connections: ec2.Connections;
protected readonly taskMetrics?: sfn.TaskMetricsConfig;
protected readonly taskPolicies?: iam.PolicyStatement[];
private securityGroups;
private networkConfiguration?;
private readonly integrationPattern;
constructor(scope: Construct, id: string, props: EcsRunTaskProps);
/**
* @internal
*/
protected _renderTask(topLevelQueryLanguage?: sfn.QueryLanguage): any;
private configureAwsVpcNetworking;
private validateNoNetworkingProps;
private makePolicyStatements;
private getTaskDefinitionArn;
/**
* Returns the ARN of the task definition family by removing the
* revision from the task definition ARN
* Before - arn:aws:ecs:us-west-2:123456789012:task-definition/hello_world:8
* After - arn:aws:ecs:us-west-2:123456789012:task-definition/hello_world
*/
private getTaskDefinitionFamilyArn;
private taskExecutionRoles;
}
export {};

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,111 @@
import type { Construct } from 'constructs';
import type * as eks from '../../../aws-eks';
import type * as iam from '../../../aws-iam';
import * as sfn from '../../../aws-stepfunctions';
interface EksCallOptions {
/**
* The EKS cluster
*/
readonly cluster: eks.ICluster;
/**
* HTTP method ("GET", "POST", "PUT", ...) part of HTTP request
*/
readonly httpMethod: HttpMethods;
/**
* HTTP path of the Kubernetes REST API operation
* For example: /api/v1/namespaces/default/pods
*/
readonly httpPath: string;
/**
* Query Parameters part of HTTP request
* @default - no query parameters
*/
readonly queryParameters?: {
[key: string]: string[];
};
/**
* Request body part of HTTP request
* @default - No request body
*/
readonly requestBody?: sfn.TaskInput;
}
/**
* Properties for calling a EKS endpoint with EksCall using JSONPath
*/
export interface EksCallJsonPathProps extends sfn.TaskStateJsonPathBaseProps, EksCallOptions {
}
/**
* Properties for calling a EKS endpoint with EksCall using JSONata
*/
export interface EksCallJsonataProps extends sfn.TaskStateJsonataBaseProps, EksCallOptions {
}
/**
* Properties for calling a EKS endpoint with EksCall
*/
export interface EksCallProps extends sfn.TaskStateBaseProps, EksCallOptions {
}
/**
* Call a EKS endpoint as a Task
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-eks.html
*/
export declare class EksCall extends sfn.TaskStateBase {
private readonly props;
/**
* Call a EKS endpoint as a Task that using JSONPath
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-eks.html
*/
static jsonPath(scope: Construct, id: string, props: EksCallJsonPathProps): EksCall;
/**
* Call a EKS endpoint as a Task that using JSONata
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-eks.html
*/
static jsonata(scope: Construct, id: string, props: EksCallJsonataProps): EksCall;
private static readonly SUPPORTED_INTEGRATION_PATTERNS;
/** No policies are required due to eks:call is an Http service integration and does not call and EKS API directly
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-eks.html#connect-eks-permissions
*/
protected readonly taskMetrics?: sfn.TaskMetricsConfig;
protected readonly taskPolicies?: iam.PolicyStatement[];
private readonly integrationPattern;
private readonly clusterEndpoint;
private readonly clusterCertificateAuthorityData;
constructor(scope: Construct, id: string, props: EksCallProps);
/**
* Provides the EKS Call service integration task configuration
* @internal
*/
protected _renderTask(topLevelQueryLanguage?: sfn.QueryLanguage): any;
}
/**
* Method type of a EKS call
*/
export declare enum HttpMethods {
/**
* Retrieve data from a server at the specified resource
*/
GET = "GET",
/**
* Send data to the API endpoint to create or update a resource
*/
POST = "POST",
/**
* Send data to the API endpoint to update or create a resource
*/
PUT = "PUT",
/**
* Delete the resource at the specified endpoint
*/
DELETE = "DELETE",
/**
* Apply partial modifications to the resource
*/
PATCH = "PATCH",
/**
* Retrieve data from a server at the specified resource without the response body
*/
HEAD = "HEAD"
}
export {};

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.HttpMethods=exports.EksCall=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var sfn=()=>{var tmp=require("../../../aws-stepfunctions");return sfn=()=>tmp,tmp},core_1=()=>{var tmp=require("../../../core");return core_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp},task_utils_1=()=>{var tmp=require("../private/task-utils");return task_utils_1=()=>tmp,tmp};class EksCall extends sfn().TaskStateBase{props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_stepfunctions_tasks.EksCall",version:"2.252.0"};static jsonPath(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_EksCallJsonPathProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.jsonPath),error}return new EksCall(scope,id,props)}static jsonata(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_EksCallJsonataProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.jsonata),error}return new EksCall(scope,id,{...props,queryLanguage:sfn().QueryLanguage.JSONATA})}static SUPPORTED_INTEGRATION_PATTERNS=[sfn().IntegrationPattern.REQUEST_RESPONSE];taskMetrics;taskPolicies;integrationPattern;clusterEndpoint;clusterCertificateAuthorityData;constructor(scope,id,props){super(scope,id,props),this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_EksCallProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,EksCall),error}this.integrationPattern=props.integrationPattern??sfn().IntegrationPattern.REQUEST_RESPONSE,(0,task_utils_1().validatePatternSupported)(this.integrationPattern,EksCall.SUPPORTED_INTEGRATION_PATTERNS);try{this.clusterEndpoint=this.props.cluster.clusterEndpoint}catch{throw new(core_1()).ValidationError((0,literal_string_1().lit)`MustBeClusterendpointPropertySpecified`,'The "clusterEndpoint" property must be specified when using an imported Cluster.',this)}try{this.clusterCertificateAuthorityData=this.props.cluster.clusterCertificateAuthorityData}catch{throw new(core_1()).ValidationError((0,literal_string_1().lit)`ClusterCertificateAuthorityDataProperty`,'The "clusterCertificateAuthorityData" property must be specified when using an imported Cluster.',this)}}_renderTask(topLevelQueryLanguage){const queryLanguage=sfn()._getActualQueryLanguage(topLevelQueryLanguage,this.props.queryLanguage);return{Resource:(0,task_utils_1().integrationResourceArn)("eks","call",this.integrationPattern),...this._renderParametersOrArguments({ClusterName:this.props.cluster.clusterName,CertificateAuthority:this.clusterCertificateAuthorityData,Endpoint:this.clusterEndpoint,Method:this.props.httpMethod,Path:this.props.httpPath,QueryParameters:this.props.queryParameters,RequestBody:this.props.requestBody?.value},queryLanguage)}}}exports.EksCall=EksCall;var HttpMethods;(function(HttpMethods2){HttpMethods2.GET="GET",HttpMethods2.POST="POST",HttpMethods2.PUT="PUT",HttpMethods2.DELETE="DELETE",HttpMethods2.PATCH="PATCH",HttpMethods2.HEAD="HEAD"})(HttpMethods||(exports.HttpMethods=HttpMethods={}));

View File

@@ -0,0 +1,145 @@
import type { Construct } from 'constructs';
import * as iam from '../../../aws-iam';
import * as sfn from '../../../aws-stepfunctions';
/**
* The action to take when the cluster step fails.
* @see https://docs.aws.amazon.com/emr/latest/APIReference/API_StepConfig.html
*
* Here, they are named as TERMINATE_JOB_FLOW, TERMINATE_CLUSTER, CANCEL_AND_WAIT, and CONTINUE respectively.
*
* @default CONTINUE
*
*/
export declare enum ActionOnFailure {
/**
* Terminate the Cluster on Step Failure
*/
TERMINATE_CLUSTER = "TERMINATE_CLUSTER",
/**
* Cancel Step execution and enter WAITING state
*/
CANCEL_AND_WAIT = "CANCEL_AND_WAIT",
/**
* Continue to the next Step
*/
CONTINUE = "CONTINUE"
}
interface EmrAddStepOptions {
/**
* The ClusterId to add the Step to.
*/
readonly clusterId: string;
/**
* The name of the Step
*
* @see https://docs.aws.amazon.com/emr/latest/APIReference/API_StepConfig.html
*/
readonly name: string;
/**
* The action to take when the cluster step fails.
*
* @see https://docs.aws.amazon.com/emr/latest/APIReference/API_StepConfig.html
*
* @default ActionOnFailure.CONTINUE
*/
readonly actionOnFailure?: ActionOnFailure;
/**
* A path to a JAR file run during the step.
*
* @see https://docs.aws.amazon.com/emr/latest/APIReference/API_HadoopJarStepConfig.html
*/
readonly jar: string;
/**
* The name of the main class in the specified Java file. If not specified, the JAR file should specify a Main-Class in its manifest file.
*
* @see https://docs.aws.amazon.com/emr/latest/APIReference/API_HadoopJarStepConfig.html
*
* @default - No mainClass
*/
readonly mainClass?: string;
/**
* A list of command line arguments passed to the JAR file's main function when executed.
*
* @see https://docs.aws.amazon.com/emr/latest/APIReference/API_HadoopJarStepConfig.html
*
* @default - No args
*/
readonly args?: string[];
/**
* A list of Java properties that are set when the step runs. You can use these properties to pass key value pairs to your main function.
*
* @see https://docs.aws.amazon.com/emr/latest/APIReference/API_HadoopJarStepConfig.html
*
* @default - No properties
*/
readonly properties?: {
[key: string]: string;
};
/**
* The Amazon Resource Name (ARN) of the runtime role for a step on the cluster.
*
* @see https://docs.aws.amazon.com/emr/latest/APIReference/API_AddJobFlowSteps.html#API_AddJobFlowSteps_RequestSyntax
*
* @default - Uses EC2 instance profile role
*/
readonly executionRoleArn?: string;
}
/**
* Properties for EmrAddStep using JSONPath
*
*/
export interface EmrAddStepJsonPathProps extends sfn.TaskStateJsonPathBaseProps, EmrAddStepOptions {
}
/**
* Properties for EmrAddStep using JSONata
*
*/
export interface EmrAddStepJsonataProps extends sfn.TaskStateJsonataBaseProps, EmrAddStepOptions {
}
/**
* Properties for EmrAddStep
*
*/
export interface EmrAddStepProps extends sfn.TaskStateBaseProps, EmrAddStepOptions {
}
/**
* A Step Functions Task to add a Step to an EMR Cluster
*
* The StepConfiguration is defined as Parameters in the state machine definition.
*
* OUTPUT: the StepId
*
*/
export declare class EmrAddStep extends sfn.TaskStateBase {
private readonly props;
/**
* A Step Functions Task that using JSONPath to add a Step to an EMR Cluster
*
* The StepConfiguration is defined as Parameters in the state machine definition.
*
* OUTPUT: the StepId
*
*/
static jsonPath(scope: Construct, id: string, props: EmrAddStepJsonPathProps): EmrAddStep;
/**
* A Step Functions Task that using JSONata to add a Step to an EMR Cluster
*
* The StepConfiguration is defined as Parameters in the state machine definition.
*
* OUTPUT: the StepId
*
*/
static jsonata(scope: Construct, id: string, props: EmrAddStepJsonataProps): EmrAddStep;
private static readonly SUPPORTED_INTEGRATION_PATTERNS;
protected readonly taskPolicies?: iam.PolicyStatement[];
protected readonly taskMetrics?: sfn.TaskMetricsConfig;
private readonly actionOnFailure;
private readonly integrationPattern;
constructor(scope: Construct, id: string, props: EmrAddStepProps);
/**
* @internal
*/
protected _renderTask(topLevelQueryLanguage?: sfn.QueryLanguage): any;
private createPolicyStatements;
}
export {};

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.EmrAddStep=exports.ActionOnFailure=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},core_1=()=>{var tmp=require("../../../core");return core_1=()=>tmp,tmp},task_utils_1=()=>{var tmp=require("../private/task-utils");return task_utils_1=()=>tmp,tmp},ActionOnFailure;(function(ActionOnFailure2){ActionOnFailure2.TERMINATE_CLUSTER="TERMINATE_CLUSTER",ActionOnFailure2.CANCEL_AND_WAIT="CANCEL_AND_WAIT",ActionOnFailure2.CONTINUE="CONTINUE"})(ActionOnFailure||(exports.ActionOnFailure=ActionOnFailure={}));class EmrAddStep extends sfn().TaskStateBase{props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_stepfunctions_tasks.EmrAddStep",version:"2.252.0"};static jsonPath(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_EmrAddStepJsonPathProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.jsonPath),error}return new EmrAddStep(scope,id,props)}static jsonata(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_EmrAddStepJsonataProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.jsonata),error}return new EmrAddStep(scope,id,{...props,queryLanguage:sfn().QueryLanguage.JSONATA})}static SUPPORTED_INTEGRATION_PATTERNS=[sfn().IntegrationPattern.REQUEST_RESPONSE,sfn().IntegrationPattern.RUN_JOB];taskPolicies;taskMetrics;actionOnFailure;integrationPattern;constructor(scope,id,props){super(scope,id,props),this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_EmrAddStepProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,EmrAddStep),error}this.actionOnFailure=props.actionOnFailure??ActionOnFailure.CONTINUE,this.integrationPattern=props.integrationPattern??sfn().IntegrationPattern.RUN_JOB,(0,task_utils_1().validatePatternSupported)(this.integrationPattern,EmrAddStep.SUPPORTED_INTEGRATION_PATTERNS),this.taskPolicies=this.createPolicyStatements()}_renderTask(topLevelQueryLanguage){const queryLanguage=sfn()._getActualQueryLanguage(topLevelQueryLanguage,this.props.queryLanguage);return{Resource:(0,task_utils_1().integrationResourceArn)("elasticmapreduce","addStep",this.integrationPattern),...this._renderParametersOrArguments({ClusterId:this.props.clusterId,ExecutionRoleArn:this.props.executionRoleArn,Step:{Name:this.props.name,ActionOnFailure:this.actionOnFailure.valueOf(),HadoopJarStep:{Jar:this.props.jar,MainClass:this.props.mainClass,Args:this.props.args,Properties:this.props.properties===void 0?void 0:Object.entries(this.props.properties).map(kv=>({Key:kv[0],Value:kv[1]}))}}},queryLanguage)}}createPolicyStatements(){const stack=core_1().Stack.of(this),policyStatements=[new(iam()).PolicyStatement({actions:["elasticmapreduce:AddJobFlowSteps","elasticmapreduce:DescribeStep","elasticmapreduce:CancelSteps"],resources:[stack.formatArn({service:"elasticmapreduce",resource:"cluster",resourceName:"*"})]})];return this.integrationPattern===sfn().IntegrationPattern.RUN_JOB&&policyStatements.push(new(iam()).PolicyStatement({actions:["events:PutTargets","events:PutRule","events:DescribeRule"],resources:[stack.formatArn({service:"events",resource:"rule",resourceName:"StepFunctionsGetEventForEMRAddJobFlowStepsRule"})]})),policyStatements}}exports.EmrAddStep=EmrAddStep;

View File

@@ -0,0 +1,56 @@
import type { Construct } from 'constructs';
import * as iam from '../../../aws-iam';
import * as sfn from '../../../aws-stepfunctions';
interface EmrCancelStepOptions {
/**
* The ClusterId to update.
*/
readonly clusterId: string;
/**
* The StepId to cancel.
*/
readonly stepId: string;
}
/**
* Properties for calling an EMR CancelStep using JSONPath from your
* state machine.
*/
export interface EmrCancelStepJsonPathProps extends sfn.TaskStateJsonPathBaseProps, EmrCancelStepOptions {
}
/**
* Properties for calling an EMR CancelStep using JSONata from your
* state machine.
*/
export interface EmrCancelStepJsonataProps extends sfn.TaskStateJsonataBaseProps, EmrCancelStepOptions {
}
/**
* Properties for calling an EMR CancelStep from your
* state machine.
*/
export interface EmrCancelStepProps extends sfn.TaskStateBaseProps, EmrCancelStepOptions {
}
/**
* A Step Functions task to cancel a Step on an EMR Cluster.
*
*/
export declare class EmrCancelStep extends sfn.TaskStateBase {
private readonly props;
/**
* A Step Functions task using JSONPath to cancel a Step on an EMR Cluster.
*
*/
static jsonPath(scope: Construct, id: string, props: EmrCancelStepJsonPathProps): EmrCancelStep;
/**
* A Step Functions task using JSONata to cancel a Step on an EMR Cluster.
*
*/
static jsonata(scope: Construct, id: string, props: EmrCancelStepJsonataProps): EmrCancelStep;
protected readonly taskPolicies?: iam.PolicyStatement[];
protected readonly taskMetrics?: sfn.TaskMetricsConfig;
constructor(scope: Construct, id: string, props: EmrCancelStepProps);
/**
* @internal
*/
protected _renderTask(topLevelQueryLanguage?: sfn.QueryLanguage): any;
}
export {};

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.EmrCancelStep=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},core_1=()=>{var tmp=require("../../../core");return core_1=()=>tmp,tmp},task_utils_1=()=>{var tmp=require("../private/task-utils");return task_utils_1=()=>tmp,tmp};class EmrCancelStep extends sfn().TaskStateBase{props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_stepfunctions_tasks.EmrCancelStep",version:"2.252.0"};static jsonPath(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_EmrCancelStepJsonPathProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.jsonPath),error}return new EmrCancelStep(scope,id,props)}static jsonata(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_EmrCancelStepJsonataProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.jsonata),error}return new EmrCancelStep(scope,id,{...props,queryLanguage:sfn().QueryLanguage.JSONATA})}taskPolicies;taskMetrics;constructor(scope,id,props){super(scope,id,props),this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_EmrCancelStepProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,EmrCancelStep),error}this.taskPolicies=[new(iam()).PolicyStatement({actions:["elasticmapreduce:CancelSteps"],resources:[core_1().Stack.of(this).formatArn({service:"elasticmapreduce",resource:"cluster",resourceName:"*"})]})]}_renderTask(topLevelQueryLanguage){const queryLanguage=sfn()._getActualQueryLanguage(topLevelQueryLanguage,this.props.queryLanguage);return{Resource:(0,task_utils_1().integrationResourceArn)("elasticmapreduce","cancelStep",sfn().IntegrationPattern.REQUEST_RESPONSE),...this._renderParametersOrArguments({ClusterId:this.props.clusterId,StepId:this.props.stepId},queryLanguage)}}}exports.EmrCancelStep=EmrCancelStep;

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,66 @@
import type { Construct } from 'constructs';
import * as iam from '../../../aws-iam';
import * as sfn from '../../../aws-stepfunctions';
interface EmrModifyInstanceFleetByNameOptions {
/**
* The ClusterId to update.
*/
readonly clusterId: string;
/**
* The InstanceFleetName to update.
*/
readonly instanceFleetName: string;
/**
* The target capacity of On-Demand units for the instance fleet.
*
* @see https://docs.aws.amazon.com/emr/latest/APIReference/API_InstanceFleetModifyConfig.html
*
* @default - None
*/
readonly targetOnDemandCapacity: number;
/**
* The target capacity of Spot units for the instance fleet.
*
* @see https://docs.aws.amazon.com/emr/latest/APIReference/API_InstanceFleetModifyConfig.html
*
* @default - None
*/
readonly targetSpotCapacity: number;
}
/**
* Properties for EmrModifyInstanceFleetByName using JSONPath
*/
export interface EmrModifyInstanceFleetByNameJsonPathProps extends sfn.TaskStateJsonPathBaseProps, EmrModifyInstanceFleetByNameOptions {
}
/**
* Properties for EmrModifyInstanceFleetByName using JSONata
*/
export interface EmrModifyInstanceFleetByNameJsonataProps extends sfn.TaskStateJsonataBaseProps, EmrModifyInstanceFleetByNameOptions {
}
/**
* Properties for EmrModifyInstanceFleetByName
*/
export interface EmrModifyInstanceFleetByNameProps extends sfn.TaskStateBaseProps, EmrModifyInstanceFleetByNameOptions {
}
/**
* A Step Functions Task to to modify an InstanceFleet on an EMR Cluster.
*/
export declare class EmrModifyInstanceFleetByName extends sfn.TaskStateBase {
private readonly props;
/**
* A Step Functions Task using JSONPath to to modify an InstanceFleet on an EMR Cluster.
*/
static jsonPath(scope: Construct, id: string, props: EmrModifyInstanceFleetByNameJsonPathProps): EmrModifyInstanceFleetByName;
/**
* A Step Functions Task using JSONata to to modify an InstanceFleet on an EMR Cluster.
*/
static jsonata(scope: Construct, id: string, props: EmrModifyInstanceFleetByNameJsonataProps): EmrModifyInstanceFleetByName;
protected readonly taskPolicies?: iam.PolicyStatement[];
protected readonly taskMetrics?: sfn.TaskMetricsConfig;
constructor(scope: Construct, id: string, props: EmrModifyInstanceFleetByNameProps);
/**
* @internal
*/
protected _renderTask(topLevelQueryLanguage?: sfn.QueryLanguage): any;
}
export {};

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.EmrModifyInstanceFleetByName=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},core_1=()=>{var tmp=require("../../../core");return core_1=()=>tmp,tmp},task_utils_1=()=>{var tmp=require("../private/task-utils");return task_utils_1=()=>tmp,tmp};class EmrModifyInstanceFleetByName extends sfn().TaskStateBase{props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_stepfunctions_tasks.EmrModifyInstanceFleetByName",version:"2.252.0"};static jsonPath(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_EmrModifyInstanceFleetByNameJsonPathProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.jsonPath),error}return new EmrModifyInstanceFleetByName(scope,id,props)}static jsonata(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_EmrModifyInstanceFleetByNameJsonataProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.jsonata),error}return new EmrModifyInstanceFleetByName(scope,id,{...props,queryLanguage:sfn().QueryLanguage.JSONATA})}taskPolicies;taskMetrics;constructor(scope,id,props){super(scope,id,props),this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_EmrModifyInstanceFleetByNameProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,EmrModifyInstanceFleetByName),error}this.taskPolicies=[new(iam()).PolicyStatement({actions:["elasticmapreduce:ModifyInstanceFleet","elasticmapreduce:ListInstanceFleets"],resources:[core_1().Stack.of(this).formatArn({service:"elasticmapreduce",resource:"cluster",resourceName:"*"})]})]}_renderTask(topLevelQueryLanguage){const queryLanguage=sfn()._getActualQueryLanguage(topLevelQueryLanguage,this.props.queryLanguage);return{Resource:(0,task_utils_1().integrationResourceArn)("elasticmapreduce","modifyInstanceFleetByName",sfn().IntegrationPattern.REQUEST_RESPONSE),...this._renderParametersOrArguments({ClusterId:this.props.clusterId,InstanceFleetName:this.props.instanceFleetName,InstanceFleet:{TargetOnDemandCapacity:this.props.targetOnDemandCapacity,TargetSpotCapacity:this.props.targetSpotCapacity}},queryLanguage)}}}exports.EmrModifyInstanceFleetByName=EmrModifyInstanceFleetByName;

View File

@@ -0,0 +1,148 @@
import type { Construct } from 'constructs';
import type { EmrCreateCluster } from './emr-create-cluster';
import * as iam from '../../../aws-iam';
import * as sfn from '../../../aws-stepfunctions';
import type { Duration } from '../../../core';
interface EmrModifyInstanceGroupByNameOptions {
/**
* The ClusterId to update.
*/
readonly clusterId: string;
/**
* The InstanceGroupName to update.
*/
readonly instanceGroupName: string;
/**
* The JSON that you want to provide to your ModifyInstanceGroup call as input.
*
* This uses the same syntax as the ModifyInstanceGroups API.
*
* @see https://docs.aws.amazon.com/emr/latest/APIReference/API_ModifyInstanceGroups.html
*/
readonly instanceGroup: EmrModifyInstanceGroupByName.InstanceGroupModifyConfigProperty;
}
/**
* Properties for EmrModifyInstanceGroupByName using JSONPath
*
*/
export interface EmrModifyInstanceGroupByNameJsonPathProps extends sfn.TaskStateJsonPathBaseProps, EmrModifyInstanceGroupByNameOptions {
}
/**
* Properties for EmrModifyInstanceGroupByName using JSONata
*
*/
export interface EmrModifyInstanceGroupByNameJsonataProps extends sfn.TaskStateJsonataBaseProps, EmrModifyInstanceGroupByNameOptions {
}
/**
* Properties for EmrModifyInstanceGroupByName
*
*/
export interface EmrModifyInstanceGroupByNameProps extends sfn.TaskStateBaseProps, EmrModifyInstanceGroupByNameOptions {
}
/**
* A Step Functions Task to to modify an InstanceGroup on an EMR Cluster.
*
*/
export declare class EmrModifyInstanceGroupByName extends sfn.TaskStateBase {
private readonly props;
/**
* A Step Functions Task using JSONPath to modify an InstanceGroup on an EMR Cluster.
*
*/
static jsonPath(scope: Construct, id: string, props: EmrModifyInstanceGroupByNameJsonPathProps): EmrModifyInstanceGroupByName;
/**
* A Step Functions Task using JSONata to modify an InstanceGroup on an EMR Cluster.
*
*/
static jsonata(scope: Construct, id: string, props: EmrModifyInstanceGroupByNameJsonataProps): EmrModifyInstanceGroupByName;
protected readonly taskPolicies?: iam.PolicyStatement[];
protected readonly taskMetrics?: sfn.TaskMetricsConfig;
constructor(scope: Construct, id: string, props: EmrModifyInstanceGroupByNameProps);
/**
* @internal
*/
protected _renderTask(topLevelQueryLanguage?: sfn.QueryLanguage): any;
}
export declare namespace EmrModifyInstanceGroupByName {
/**
* Custom policy for requesting termination protection or termination of specific instances when shrinking an instance group.
*
* @see https://docs.aws.amazon.com/emr/latest/APIReference/API_InstanceResizePolicy.html
*
*/
interface InstanceResizePolicyProperty {
/**
* Specific list of instances to be protected when shrinking an instance group.
*
* @default - No instances will be protected when shrinking an instance group
*/
readonly instancesToProtect?: string[];
/**
* Specific list of instances to be terminated when shrinking an instance group.
*
* @default - No instances will be terminated when shrinking an instance group.
*/
readonly instancesToTerminate?: string[];
/**
* Decommissioning timeout override for the specific list of instances to be terminated.
*
* @default cdk.Duration.seconds
*/
readonly instanceTerminationTimeout?: Duration;
}
/**
* Policy for customizing shrink operations. Allows configuration of decommissioning timeout and targeted instance shrinking.
*
* @see https://docs.aws.amazon.com/emr/latest/APIReference/API_ShrinkPolicy.html
*
*/
interface ShrinkPolicyProperty {
/**
* The desired timeout for decommissioning an instance. Overrides the default YARN decommissioning timeout.
*
* @default - EMR selected default
*/
readonly decommissionTimeout?: Duration;
/**
* Custom policy for requesting termination protection or termination of specific instances when shrinking an instance group.
*
* @default - None
*/
readonly instanceResizePolicy?: InstanceResizePolicyProperty;
}
/**
* Modify the size or configurations of an instance group.
*
* @see https://docs.aws.amazon.com/emr/latest/APIReference/API_InstanceGroupModifyConfig.html
*
*/
interface InstanceGroupModifyConfigProperty {
/**
* A list of new or modified configurations to apply for an instance group.
*
* @default - None
*/
readonly configurations?: EmrCreateCluster.ConfigurationProperty[];
/**
* The EC2 InstanceIds to terminate. After you terminate the instances, the instance group will not return to its original requested size.
*
* @default - None
*/
readonly eC2InstanceIdsToTerminate?: string[];
/**
* Target size for the instance group.
*
* @default - None
*/
readonly instanceCount?: number;
/**
* Policy for customizing shrink operations.
*
* @see https://docs.aws.amazon.com/emr/latest/APIReference/API_ShrinkPolicy.html
*
* @default - None
*/
readonly shrinkPolicy?: ShrinkPolicyProperty;
}
}
export {};

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.EmrModifyInstanceGroupByName=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var cluster_utils_1=()=>{var tmp=require("./private/cluster-utils");return cluster_utils_1=()=>tmp,tmp},iam=()=>{var tmp=require("../../../aws-iam");return iam=()=>tmp,tmp},sfn=()=>{var tmp=require("../../../aws-stepfunctions");return sfn=()=>tmp,tmp},core_1=()=>{var tmp=require("../../../core");return core_1=()=>tmp,tmp},task_utils_1=()=>{var tmp=require("../private/task-utils");return task_utils_1=()=>tmp,tmp};class EmrModifyInstanceGroupByName extends sfn().TaskStateBase{props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_stepfunctions_tasks.EmrModifyInstanceGroupByName",version:"2.252.0"};static jsonPath(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_EmrModifyInstanceGroupByNameJsonPathProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.jsonPath),error}return new EmrModifyInstanceGroupByName(scope,id,props)}static jsonata(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_EmrModifyInstanceGroupByNameJsonataProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.jsonata),error}return new EmrModifyInstanceGroupByName(scope,id,{...props,queryLanguage:sfn().QueryLanguage.JSONATA})}taskPolicies;taskMetrics;constructor(scope,id,props){super(scope,id,props),this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_EmrModifyInstanceGroupByNameProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,EmrModifyInstanceGroupByName),error}this.taskPolicies=[new(iam()).PolicyStatement({actions:["elasticmapreduce:ModifyInstanceGroups","elasticmapreduce:ListInstanceGroups"],resources:[core_1().Stack.of(this).formatArn({service:"elasticmapreduce",resource:"cluster",resourceName:"*"})]})]}_renderTask(topLevelQueryLanguage){const queryLanguage=sfn()._getActualQueryLanguage(topLevelQueryLanguage,this.props.queryLanguage);return{Resource:(0,task_utils_1().integrationResourceArn)("elasticmapreduce","modifyInstanceGroupByName",sfn().IntegrationPattern.REQUEST_RESPONSE),...this._renderParametersOrArguments({ClusterId:this.props.clusterId,InstanceGroupName:this.props.instanceGroupName,InstanceGroup:(0,cluster_utils_1().InstanceGroupModifyConfigPropertyToJson)(this.props.instanceGroup)},queryLanguage)}}}exports.EmrModifyInstanceGroupByName=EmrModifyInstanceGroupByName;

View File

@@ -0,0 +1,50 @@
import type { Construct } from 'constructs';
import * as iam from '../../../aws-iam';
import * as sfn from '../../../aws-stepfunctions';
interface EmrSetClusterTerminationProtectionOptions {
/**
* The ClusterId to update.
*/
readonly clusterId: string;
/**
* Termination protection indicator.
*/
readonly terminationProtected: boolean;
}
/**
* Properties for EmrSetClusterTerminationProtection using JSONPath
*/
export interface EmrSetClusterTerminationProtectionJsonPathProps extends sfn.TaskStateJsonPathBaseProps, EmrSetClusterTerminationProtectionOptions {
}
/**
* Properties for EmrSetClusterTerminationProtection using JSONata
*/
export interface EmrSetClusterTerminationProtectionJsonataProps extends sfn.TaskStateJsonataBaseProps, EmrSetClusterTerminationProtectionOptions {
}
/**
* Properties for EmrSetClusterTerminationProtection
*/
export interface EmrSetClusterTerminationProtectionProps extends sfn.TaskStateBaseProps, EmrSetClusterTerminationProtectionOptions {
}
/**
* A Step Functions Task to to set Termination Protection on an EMR Cluster.
*/
export declare class EmrSetClusterTerminationProtection extends sfn.TaskStateBase {
private readonly props;
/**
* A Step Functions Task using JSONPath to set Termination Protection on an EMR Cluster.
*/
static jsonPath(scope: Construct, id: string, props: EmrSetClusterTerminationProtectionJsonPathProps): EmrSetClusterTerminationProtection;
/**
* A Step Functions Task using JSONata to set Termination Protection on an EMR Cluster.
*/
static jsonata(scope: Construct, id: string, props: EmrSetClusterTerminationProtectionJsonataProps): EmrSetClusterTerminationProtection;
protected readonly taskPolicies?: iam.PolicyStatement[];
protected readonly taskMetrics?: sfn.TaskMetricsConfig;
constructor(scope: Construct, id: string, props: EmrSetClusterTerminationProtectionProps);
/**
* @internal
*/
protected _renderTask(topLevelQueryLanguage?: sfn.QueryLanguage): any;
}
export {};

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.EmrSetClusterTerminationProtection=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},core_1=()=>{var tmp=require("../../../core");return core_1=()=>tmp,tmp},task_utils_1=()=>{var tmp=require("../private/task-utils");return task_utils_1=()=>tmp,tmp};class EmrSetClusterTerminationProtection extends sfn().TaskStateBase{props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_stepfunctions_tasks.EmrSetClusterTerminationProtection",version:"2.252.0"};static jsonPath(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_EmrSetClusterTerminationProtectionJsonPathProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.jsonPath),error}return new EmrSetClusterTerminationProtection(scope,id,props)}static jsonata(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_EmrSetClusterTerminationProtectionJsonataProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.jsonata),error}return new EmrSetClusterTerminationProtection(scope,id,{...props,queryLanguage:sfn().QueryLanguage.JSONATA})}taskPolicies;taskMetrics;constructor(scope,id,props){super(scope,id,props),this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_EmrSetClusterTerminationProtectionProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,EmrSetClusterTerminationProtection),error}this.taskPolicies=[new(iam()).PolicyStatement({actions:["elasticmapreduce:SetTerminationProtection"],resources:[core_1().Stack.of(this).formatArn({service:"elasticmapreduce",resource:"cluster",resourceName:"*"})]})]}_renderTask(topLevelQueryLanguage){const queryLanguage=sfn()._getActualQueryLanguage(topLevelQueryLanguage,this.props.queryLanguage);return{Resource:(0,task_utils_1().integrationResourceArn)("elasticmapreduce","setClusterTerminationProtection",sfn().IntegrationPattern.REQUEST_RESPONSE),...this._renderParametersOrArguments({ClusterId:this.props.clusterId,TerminationProtected:this.props.terminationProtected},queryLanguage)}}}exports.EmrSetClusterTerminationProtection=EmrSetClusterTerminationProtection;

View File

@@ -0,0 +1,58 @@
import type { Construct } from 'constructs';
import * as iam from '../../../aws-iam';
import * as sfn from '../../../aws-stepfunctions';
interface EmrTerminateClusterOptions {
/**
* The ClusterId to terminate.
*/
readonly clusterId: string;
}
/**
* Properties for EmrTerminateCluster using JSONPath
*
*/
export interface EmrTerminateClusterJsonPathProps extends sfn.TaskStateJsonPathBaseProps, EmrTerminateClusterOptions {
}
/**
* Properties for EmrTerminateCluster using JSONata
*
*/
export interface EmrTerminateClusterJsonataProps extends sfn.TaskStateJsonataBaseProps, EmrTerminateClusterOptions {
}
/**
* Properties for EmrTerminateCluster
*
*/
export interface EmrTerminateClusterProps extends sfn.TaskStateBaseProps, EmrTerminateClusterOptions {
}
/**
* A Step Functions Task to terminate an EMR Cluster.
*
*/
export declare class EmrTerminateCluster extends sfn.TaskStateBase {
private readonly props;
/**
* A Step Functions Task using JSONPath to terminate an EMR Cluster.
*
*/
static jsonPath(scope: Construct, id: string, props: EmrTerminateClusterJsonPathProps): EmrTerminateCluster;
/**
* A Step Functions Task using JSONata to terminate an EMR Cluster.
*
*/
static jsonata(scope: Construct, id: string, props: EmrTerminateClusterJsonataProps): EmrTerminateCluster;
private static readonly SUPPORTED_INTEGRATION_PATTERNS;
protected readonly taskPolicies?: iam.PolicyStatement[];
protected readonly taskMetrics?: sfn.TaskMetricsConfig;
private readonly integrationPattern;
constructor(scope: Construct, id: string, props: EmrTerminateClusterProps);
/**
* @internal
*/
protected _renderTask(topLevelQueryLanguage?: sfn.QueryLanguage): any;
/**
* This generates the PolicyStatements required by the Task to call TerminateCluster.
*/
private createPolicyStatements;
}
export {};

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.EmrTerminateCluster=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},core_1=()=>{var tmp=require("../../../core");return core_1=()=>tmp,tmp},task_utils_1=()=>{var tmp=require("../private/task-utils");return task_utils_1=()=>tmp,tmp};class EmrTerminateCluster extends sfn().TaskStateBase{props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_stepfunctions_tasks.EmrTerminateCluster",version:"2.252.0"};static jsonPath(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_EmrTerminateClusterJsonPathProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.jsonPath),error}return new EmrTerminateCluster(scope,id,props)}static jsonata(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_EmrTerminateClusterJsonataProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.jsonata),error}return new EmrTerminateCluster(scope,id,{...props,queryLanguage:sfn().QueryLanguage.JSONATA})}static SUPPORTED_INTEGRATION_PATTERNS=[sfn().IntegrationPattern.REQUEST_RESPONSE,sfn().IntegrationPattern.RUN_JOB];taskPolicies;taskMetrics;integrationPattern;constructor(scope,id,props){super(scope,id,props),this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_EmrTerminateClusterProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,EmrTerminateCluster),error}this.integrationPattern=props.integrationPattern??sfn().IntegrationPattern.RUN_JOB,(0,task_utils_1().validatePatternSupported)(this.integrationPattern,EmrTerminateCluster.SUPPORTED_INTEGRATION_PATTERNS),this.taskPolicies=this.createPolicyStatements()}_renderTask(topLevelQueryLanguage){const queryLanguage=sfn()._getActualQueryLanguage(topLevelQueryLanguage,this.props.queryLanguage);return{Resource:(0,task_utils_1().integrationResourceArn)("elasticmapreduce","terminateCluster",this.integrationPattern),...this._renderParametersOrArguments({ClusterId:this.props.clusterId},queryLanguage)}}createPolicyStatements(){const stack=core_1().Stack.of(this),policyStatements=[new(iam()).PolicyStatement({actions:["elasticmapreduce:DescribeCluster","elasticmapreduce:TerminateJobFlows"],resources:[core_1().Stack.of(this).formatArn({service:"elasticmapreduce",resource:"cluster",resourceName:"*"})]})];return this.integrationPattern===sfn().IntegrationPattern.RUN_JOB&&policyStatements.push(new(iam()).PolicyStatement({actions:["events:PutTargets","events:PutRule","events:DescribeRule"],resources:[stack.formatArn({service:"events",resource:"rule",resourceName:"StepFunctionsGetEventForEMRTerminateJobFlowsRule"})]})),policyStatements}}exports.EmrTerminateCluster=EmrTerminateCluster;

View File

@@ -0,0 +1,271 @@
import { EmrCreateCluster } from '../emr-create-cluster';
import type { EmrModifyInstanceGroupByName } from '../emr-modify-instance-group-by-name';
/**
* Render the KerberosAttributesProperty as JSON
*/
export declare function KerberosAttributesPropertyToJson(property: EmrCreateCluster.KerberosAttributesProperty): {
ADDomainJoinPassword: any;
ADDomainJoinUser: any;
CrossRealmTrustPrincipalPassword: any;
KdcAdminPassword: any;
Realm: any;
};
/**
* Render the InstancesConfigProperty to JSON
*/
export declare function InstancesConfigPropertyToJson(property: EmrCreateCluster.InstancesConfigProperty): {
AdditionalMasterSecurityGroups: any;
AdditionalSlaveSecurityGroups: any;
Ec2KeyName: any;
Ec2SubnetId: any;
Ec2SubnetIds: any;
EmrManagedMasterSecurityGroup: any;
EmrManagedSlaveSecurityGroup: any;
HadoopVersion: any;
InstanceCount: any;
InstanceFleets: any;
InstanceGroups: any;
KeepJobFlowAliveWhenNoSteps: boolean;
MasterInstanceType: any;
Placement: {
AvailabilityZone: any;
AvailabilityZones: any;
} | undefined;
ServiceAccessSecurityGroup: any;
SlaveInstanceType: any;
TerminationProtected: any;
};
/**
* Render the ApplicationConfigProperty as JSON
*/
export declare function ApplicationConfigPropertyToJson(property: EmrCreateCluster.ApplicationConfigProperty): {
Name: any;
Args: any;
Version: any;
AdditionalInfo: any;
};
/**
* Render the ConfigurationProperty as JSON
*/
export declare function ConfigurationPropertyToJson(property: EmrCreateCluster.ConfigurationProperty): {
Classification: any;
Properties: any;
Configurations: any;
};
/**
* Render the EbsBlockDeviceConfigProperty as JSON
*/
export declare function EbsBlockDeviceConfigPropertyToJson(property: EmrCreateCluster.EbsBlockDeviceConfigProperty): {
VolumeSpecification: {
Iops: any;
SizeInGB: number;
VolumeType: any;
};
VolumesPerInstance: any;
};
/**
* Render the EbsConfigurationProperty to JSON
*/
export declare function EbsConfigurationPropertyToJson(property: EmrCreateCluster.EbsConfigurationProperty): {
EbsBlockDeviceConfigs: any;
EbsOptimized: any;
};
/**
* Render the InstanceTypeConfigProperty to JSON]
*/
export declare function InstanceTypeConfigPropertyToJson(property: EmrCreateCluster.InstanceTypeConfigProperty): {
BidPrice: any;
BidPriceAsPercentageOfOnDemandPrice: any;
Configurations: any;
EbsConfiguration: {
EbsBlockDeviceConfigs: any;
EbsOptimized: any;
} | undefined;
InstanceType: any;
WeightedCapacity: any;
};
/**
* Render the InstanceFleetProvisioningSpecificationsProperty to JSON
*/
export declare function InstanceFleetProvisioningSpecificationsPropertyToJson(property: EmrCreateCluster.InstanceFleetProvisioningSpecificationsProperty): {
OnDemandSpecification: {
AllocationStrategy: any;
} | undefined;
SpotSpecification: {
AllocationStrategy: any;
BlockDurationMinutes: any;
TimeoutAction: any;
TimeoutDurationMinutes: any;
} | undefined;
};
/**
* Render the InstanceFleetConfigProperty as JSON
*/
export declare function InstanceFleetConfigPropertyToJson(property: EmrCreateCluster.InstanceFleetConfigProperty): {
InstanceFleetType: any;
InstanceTypeConfigs: any;
LaunchSpecifications: {
OnDemandSpecification: {
AllocationStrategy: any;
} | undefined;
SpotSpecification: {
AllocationStrategy: any;
BlockDurationMinutes: any;
TimeoutAction: any;
TimeoutDurationMinutes: any;
} | undefined;
} | undefined;
Name: any;
TargetOnDemandCapacity: any;
TargetSpotCapacity: any;
};
/**
* Render the MetricDimensionProperty as JSON
*/
export declare function MetricDimensionPropertyToJson(property: EmrCreateCluster.MetricDimensionProperty): {
Key: any;
Value: any;
};
/**
* Render the ScalingTriggerProperty to JSON
*/
export declare function ScalingTriggerPropertyToJson(property: EmrCreateCluster.ScalingTriggerProperty): {
CloudWatchAlarmDefinition: {
ComparisonOperator: any;
Dimensions: any;
EvaluationPeriods: any;
MetricName: any;
Namespace: any;
Period: any;
Statistic: any;
Threshold: any;
Unit: any;
};
};
/**
* Render the ScalingActionProperty to JSON
*/
export declare function ScalingActionPropertyToJson(property: EmrCreateCluster.ScalingActionProperty): {
Market: any;
SimpleScalingPolicyConfiguration: {
AdjustmentType: any;
CoolDown: any;
ScalingAdjustment: any;
};
};
/**
* Render the ScalingRuleProperty to JSON
*/
export declare function ScalingRulePropertyToJson(property: EmrCreateCluster.ScalingRuleProperty): {
Action: {
Market: any;
SimpleScalingPolicyConfiguration: {
AdjustmentType: any;
CoolDown: any;
ScalingAdjustment: any;
};
};
Description: any;
Name: any;
Trigger: {
CloudWatchAlarmDefinition: {
ComparisonOperator: any;
Dimensions: any;
EvaluationPeriods: any;
MetricName: any;
Namespace: any;
Period: any;
Statistic: any;
Threshold: any;
Unit: any;
};
};
};
/**
* Render the AutoScalingPolicyProperty to JSON
*/
export declare function AutoScalingPolicyPropertyToJson(property: EmrCreateCluster.AutoScalingPolicyProperty): {
Constraints: {
MaxCapacity: any;
MinCapacity: any;
};
Rules: any;
};
/**
* Render the InstanceGroupConfigProperty to JSON
*/
export declare function InstanceGroupConfigPropertyToJson(property: EmrCreateCluster.InstanceGroupConfigProperty): {
AutoScalingPolicy: {
Constraints: {
MaxCapacity: any;
MinCapacity: any;
};
Rules: any;
} | undefined;
BidPrice: any;
Configurations: any;
EbsConfiguration: {
EbsBlockDeviceConfigs: any;
EbsOptimized: any;
} | undefined;
InstanceCount: any;
InstanceRole: any;
InstanceType: any;
Market: any;
Name: any;
};
/**
* Render the PlacementTypeProperty to JSON
*/
export declare function PlacementTypePropertyToJson(property: EmrCreateCluster.PlacementTypeProperty): {
AvailabilityZone: any;
AvailabilityZones: any;
};
/**
* Render the BootstrapActionProperty as JSON
*/
export declare function BootstrapActionConfigToJson(property: EmrCreateCluster.BootstrapActionConfigProperty): {
Name: any;
ScriptBootstrapAction: {
Path: any;
Args: any;
};
};
/**
* Render the InstanceGroupModifyConfigProperty to JSON
*/
export declare function InstanceGroupModifyConfigPropertyToJson(property: EmrModifyInstanceGroupByName.InstanceGroupModifyConfigProperty): {
Configurations: any;
EC2InstanceIdsToTerminate: any;
InstanceCount: any;
ShrinkPolicy: {
DecommissionTimeout: any;
InstanceResizePolicy: {
InstancesToProtect: any;
InstancesToTerminate: any;
InstanceTerminationTimeout: any;
} | undefined;
} | undefined;
};
/**
* Render the ManagedScalingPolicyProperty to JSON
*/
export declare function ManagedScalingPolicyPropertyToJson(property: EmrCreateCluster.ManagedScalingPolicyProperty): {
ComputeLimits: {
UnitType: EmrCreateCluster.ComputeLimitsUnitType;
MinimumCapacityUnits: any;
MaximumCapacityUnits: any;
MaximumOnDemandCapacityUnits: any;
MaximumCoreCapacityUnits: any;
} | undefined;
};
/**
* Render the ManagedScalingComputeLimitsProperty to JSON
*/
export declare function ManagedScalingComputeLimitsPropertyToJson(property: EmrCreateCluster.ManagedScalingComputeLimitsProperty): {
UnitType: EmrCreateCluster.ComputeLimitsUnitType;
MinimumCapacityUnits: any;
MaximumCapacityUnits: any;
MaximumOnDemandCapacityUnits: any;
MaximumCoreCapacityUnits: any;
};

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,98 @@
import type { Construct } from 'constructs';
import type * as eks from '../../../aws-eks';
import * as iam from '../../../aws-iam';
import * as sfn from '../../../aws-stepfunctions';
/**
* Class that supports methods which return the EKS cluster name depending on input type.
*/
export declare class EksClusterInput {
readonly clusterName: string;
/**
* Specify an existing EKS Cluster as the name for this Cluster
*/
static fromCluster(cluster: eks.ICluster): EksClusterInput;
/**
* Specify a Task Input as the name for this Cluster
*/
static fromTaskInput(taskInput: sfn.TaskInput): EksClusterInput;
/**
* Initializes the clusterName
*
* @param clusterName The name of the EKS Cluster
*/
private constructor();
}
interface EmrContainersCreateVirtualClusterOptions {
/**
* EKS Cluster or task input that contains the name of the cluster
*/
readonly eksCluster: EksClusterInput;
/**
* The namespace of an EKS cluster
*
* @default - 'default'
*/
readonly eksNamespace?: string;
/**
* Name of the virtual cluster that will be created.
*
* @default - the name of the state machine execution that runs this task and state name
*/
readonly virtualClusterName?: string;
/**
* The tags assigned to the virtual cluster
*
* @default {}
*/
readonly tags?: {
[key: string]: string;
};
}
/**
* Properties to define a EMR Containers CreateVirtualCluster Task using JSONPath on an EKS cluster
*
*/
export interface EmrContainersCreateVirtualClusterJsonPathProps extends sfn.TaskStateJsonPathBaseProps, EmrContainersCreateVirtualClusterOptions {
}
/**
* Properties to define a EMR Containers CreateVirtualCluster Task using JSONata on an EKS cluster
*
*/
export interface EmrContainersCreateVirtualClusterJsonataProps extends sfn.TaskStateJsonataBaseProps, EmrContainersCreateVirtualClusterOptions {
}
/**
* Properties to define a EMR Containers CreateVirtualCluster Task on an EKS cluster
*/
export interface EmrContainersCreateVirtualClusterProps extends sfn.TaskStateBaseProps, EmrContainersCreateVirtualClusterOptions {
}
/**
* Task that creates an EMR Containers virtual cluster from an EKS cluster
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-emr-eks.html
*/
export declare class EmrContainersCreateVirtualCluster extends sfn.TaskStateBase {
private readonly props;
/**
* Task that using JSONPath and creates an EMR Containers virtual cluster from an EKS cluster
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-emr-eks.html
*/
static jsonPath(scope: Construct, id: string, props: EmrContainersCreateVirtualClusterJsonPathProps): EmrContainersCreateVirtualCluster;
/**
* Task that using JSONata and that creates an EMR Containers virtual cluster from an EKS cluster
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-emr-eks.html
*/
static jsonata(scope: Construct, id: string, props: EmrContainersCreateVirtualClusterJsonataProps): EmrContainersCreateVirtualCluster;
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: EmrContainersCreateVirtualClusterProps);
/**
* @internal
*/
protected _renderTask(topLevelQueryLanguage?: sfn.QueryLanguage): any;
private createPolicyStatements;
}
export {};

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.EmrContainersCreateVirtualCluster=exports.EksClusterInput=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},core_1=()=>{var tmp=require("../../../core");return core_1=()=>tmp,tmp},task_utils_1=()=>{var tmp=require("../private/task-utils");return task_utils_1=()=>tmp,tmp},ContainerProviderTypes;(function(ContainerProviderTypes2){ContainerProviderTypes2.EKS="EKS"})(ContainerProviderTypes||(ContainerProviderTypes={}));class EksClusterInput{clusterName;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_stepfunctions_tasks.EksClusterInput",version:"2.252.0"};static fromCluster(cluster){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_eks_ICluster(cluster)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.fromCluster),error}return new EksClusterInput(cluster.clusterName)}static fromTaskInput(taskInput){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_TaskInput(taskInput)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.fromTaskInput),error}return new EksClusterInput(taskInput.value)}constructor(clusterName){this.clusterName=clusterName}}exports.EksClusterInput=EksClusterInput;class EmrContainersCreateVirtualCluster extends sfn().TaskStateBase{props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_stepfunctions_tasks.EmrContainersCreateVirtualCluster",version:"2.252.0"};static jsonPath(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_EmrContainersCreateVirtualClusterJsonPathProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.jsonPath),error}return new EmrContainersCreateVirtualCluster(scope,id,props)}static jsonata(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_EmrContainersCreateVirtualClusterJsonataProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.jsonata),error}return new EmrContainersCreateVirtualCluster(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_EmrContainersCreateVirtualClusterProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,EmrContainersCreateVirtualCluster),error}this.integrationPattern=props.integrationPattern??sfn().IntegrationPattern.REQUEST_RESPONSE,(0,task_utils_1().validatePatternSupported)(this.integrationPattern,EmrContainersCreateVirtualCluster.SUPPORTED_INTEGRATION_PATTERNS),this.taskPolicies=this.createPolicyStatements()}_renderTask(topLevelQueryLanguage){const queryLanguage=sfn()._getActualQueryLanguage(topLevelQueryLanguage,this.props.queryLanguage);return{Resource:(0,task_utils_1().integrationResourceArn)("emr-containers","createVirtualCluster",this.integrationPattern),...this._renderParametersOrArguments({Name:this.props.virtualClusterName??(queryLanguage===sfn().QueryLanguage.JSONATA?"{% States.Format('{}/{}', $states.context.Execution.Name, $states.context.State.Name) %}":sfn().JsonPath.stringAt("States.Format('{}/{}', $$.Execution.Name, $$.State.Name)")),ContainerProvider:{Id:this.props.eksCluster.clusterName,Info:{EksInfo:{Namespace:this.props.eksNamespace??"default"}},Type:ContainerProviderTypes.EKS},Tags:this.props.tags},queryLanguage)}}createPolicyStatements(){return[new(iam()).PolicyStatement({resources:["*"],actions:["emr-containers:CreateVirtualCluster"]}),new(iam()).PolicyStatement({resources:[core_1().Stack.of(this).formatArn({service:"iam",region:"",resource:"role/aws-service-role/emr-containers.amazonaws.com",resourceName:"AWSServiceRoleForAmazonEMRContainers"})],actions:["iam:CreateServiceLinkedRole"],conditions:{StringLike:{"iam:AWSServiceName":"emr-containers.amazonaws.com"}}})]}}exports.EmrContainersCreateVirtualCluster=EmrContainersCreateVirtualCluster;

View File

@@ -0,0 +1,51 @@
import type { Construct } from 'constructs';
import * as iam from '../../../aws-iam';
import * as sfn from '../../../aws-stepfunctions';
interface EmrContainersDeleteVirtualClusterOptions {
/**
* The ID of the virtual cluster that will be deleted.
*/
readonly virtualClusterId: sfn.TaskInput;
}
/**
* Properties to define a EMR Containers DeleteVirtualCluster Task using JSONPath
*/
export interface EmrContainersDeleteVirtualClusterJsonPathProps extends sfn.TaskStateJsonPathBaseProps, EmrContainersDeleteVirtualClusterOptions {
}
/**
* Properties to define a EMR Containers DeleteVirtualCluster Task using JSONata
*/
export interface EmrContainersDeleteVirtualClusterJsonataProps extends sfn.TaskStateJsonataBaseProps, EmrContainersDeleteVirtualClusterOptions {
}
/**
* Properties to define a EMR Containers DeleteVirtualCluster Task
*/
export interface EmrContainersDeleteVirtualClusterProps extends sfn.TaskStateBaseProps, EmrContainersDeleteVirtualClusterOptions {
}
/**
* Deletes an EMR Containers virtual cluster as a Task.
*
* @see https://docs.amazonaws.cn/en_us/step-functions/latest/dg/connect-emr-eks.html
*/
export declare class EmrContainersDeleteVirtualCluster extends sfn.TaskStateBase {
private readonly props;
/**
* Deletes an EMR Containers virtual cluster as a Task using JSONPath.
*/
static jsonPath(scope: Construct, id: string, props: EmrContainersDeleteVirtualClusterJsonPathProps): EmrContainersDeleteVirtualCluster;
/**
* Deletes an EMR Containers virtual cluster as a Task using JSONata.
*/
static jsonata(scope: Construct, id: string, props: EmrContainersDeleteVirtualClusterJsonataProps): EmrContainersDeleteVirtualCluster;
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: EmrContainersDeleteVirtualClusterProps);
/**
* @internal
*/
protected _renderTask(topLevelQueryLanguage?: sfn.QueryLanguage): any;
private createPolicyStatements;
}
export {};

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.EmrContainersDeleteVirtualCluster=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 EmrContainersDeleteVirtualCluster extends sfn().TaskStateBase{props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_stepfunctions_tasks.EmrContainersDeleteVirtualCluster",version:"2.252.0"};static jsonPath(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_EmrContainersDeleteVirtualClusterJsonPathProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.jsonPath),error}return new EmrContainersDeleteVirtualCluster(scope,id,props)}static jsonata(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_EmrContainersDeleteVirtualClusterJsonataProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.jsonata),error}return new EmrContainersDeleteVirtualCluster(scope,id,{...props,queryLanguage:sfn().QueryLanguage.JSONATA})}static SUPPORTED_INTEGRATION_PATTERNS=[sfn().IntegrationPattern.REQUEST_RESPONSE,sfn().IntegrationPattern.RUN_JOB];taskMetrics;taskPolicies;integrationPattern;constructor(scope,id,props){super(scope,id,props),this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_EmrContainersDeleteVirtualClusterProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,EmrContainersDeleteVirtualCluster),error}this.integrationPattern=props.integrationPattern??sfn().IntegrationPattern.REQUEST_RESPONSE,(0,task_utils_1().validatePatternSupported)(this.integrationPattern,EmrContainersDeleteVirtualCluster.SUPPORTED_INTEGRATION_PATTERNS),this.taskPolicies=this.createPolicyStatements()}_renderTask(topLevelQueryLanguage){const queryLanguage=sfn()._getActualQueryLanguage(topLevelQueryLanguage,this.props.queryLanguage);return{Resource:(0,task_utils_1().integrationResourceArn)("emr-containers","deleteVirtualCluster",this.integrationPattern),...this._renderParametersOrArguments({Id:this.props.virtualClusterId.value},queryLanguage)}}createPolicyStatements(){const actions=["emr-containers:DeleteVirtualCluster"];return this.integrationPattern===sfn().IntegrationPattern.RUN_JOB&&actions.push("emr-containers:DescribeVirtualCluster"),[new(iam()).PolicyStatement({resources:[cdk().Stack.of(this).formatArn({arnFormat:cdk().ArnFormat.SLASH_RESOURCE_SLASH_RESOURCE_NAME,service:"emr-containers",resource:"virtualclusters",resourceName:(0,task_utils_1().isJsonPathOrJsonataExpression)(this.props.virtualClusterId.value)?"*":this.props.virtualClusterId.value})],actions})]}}exports.EmrContainersDeleteVirtualCluster=EmrContainersDeleteVirtualCluster;

View File

@@ -0,0 +1,377 @@
import type { Construct } from 'constructs';
import * as iam from '../../../aws-iam';
import * as logs from '../../../aws-logs';
import * as s3 from '../../../aws-s3';
import * as sfn from '../../../aws-stepfunctions';
interface EmrContainersStartJobRunOptions {
/**
* The ID of the virtual cluster where the job will be run
*/
readonly virtualCluster: VirtualClusterInput;
/**
* The name of the job run.
*
* @default - No job run name
*/
readonly jobName?: string;
/**
* The execution role for the job run.
*
* If `virtualClusterId` is from a JSON input path, an execution role must be provided.
* If an execution role is provided, follow the documentation to update the role trust policy.
* @see https://docs.aws.amazon.com/emr/latest/EMR-on-EKS-DevelopmentGuide/setting-up-trust-policy.html
*
* @default - Automatically generated only when the provided `virtualClusterId` is not an encoded JSON path
*/
readonly executionRole?: iam.IRole;
/**
* The Amazon EMR release version to use for the job run.
*/
readonly releaseLabel: ReleaseLabel;
/**
* The configurations for the application running in the job run.
*
* Maximum of 100 items
*
* @see https://docs.aws.amazon.com/emr-on-eks/latest/APIReference/API_Configuration.html
*
* @default - No application config
*/
readonly applicationConfig?: ApplicationConfiguration[];
/**
* The job driver for the job run.
*
* @see https://docs.aws.amazon.com/emr-on-eks/latest/APIReference/API_JobDriver.html
*/
readonly jobDriver: JobDriver;
/**
* Configuration for monitoring the job run
*
* @see https://docs.aws.amazon.com/emr-on-eks/latest/APIReference/API_MonitoringConfiguration.html
*
* @default - logging enabled and resources automatically generated if `monitoring.logging` is set to `true`
*/
readonly monitoring?: Monitoring;
/**
* The tags assigned to job runs.
*
* @default - None
*/
readonly tags?: {
[key: string]: string;
};
}
/**
* Properties for calling EMR Containers StartJobRun using JSONPath.
*/
export interface EmrContainersStartJobRunJsonPathProps extends sfn.TaskStateJsonPathBaseProps, EmrContainersStartJobRunOptions {
}
/**
* Properties for calling EMR Containers StartJobRun using JSONata.
*/
export interface EmrContainersStartJobRunJsonataProps extends sfn.TaskStateJsonataBaseProps, EmrContainersStartJobRunOptions {
}
/**
* The props for a EMR Containers StartJobRun Task.
*/
export interface EmrContainersStartJobRunProps extends sfn.TaskStateBaseProps, EmrContainersStartJobRunOptions {
}
/**
* Starts a job run.
*
* A job is a unit of work that you submit to Amazon EMR on EKS for execution.
* The work performed by the job can be defined by a Spark jar, PySpark script, or SparkSQL query.
* A job run is an execution of the job on the virtual cluster.
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-emr-eks.html
*/
export declare class EmrContainersStartJobRun extends sfn.TaskStateBase implements iam.IGrantable {
private readonly props;
/**
* Starts a job run Task using JSONPath.
*
* A job is a unit of work that you submit to Amazon EMR on EKS for execution.
* The work performed by the job can be defined by a Spark jar, PySpark script, or SparkSQL query.
* A job run is an execution of the job on the virtual cluster.
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-emr-eks.html
*/
static jsonPath(scope: Construct, id: string, props: EmrContainersStartJobRunJsonPathProps): EmrContainersStartJobRun;
/**
* Starts a job run Task using JSONata.
*
* A job is a unit of work that you submit to Amazon EMR on EKS for execution.
* The work performed by the job can be defined by a Spark jar, PySpark script, or SparkSQL query.
* A job run is an execution of the job on the virtual cluster.
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-emr-eks.html
*/
static jsonata(scope: Construct, id: string, props: EmrContainersStartJobRunJsonataProps): EmrContainersStartJobRun;
private static readonly SUPPORTED_INTEGRATION_PATTERNS;
protected readonly taskMetrics?: sfn.TaskMetricsConfig;
protected readonly taskPolicies?: iam.PolicyStatement[];
readonly grantPrincipal: iam.IPrincipal;
private role;
private readonly logGroup?;
private readonly logBucket?;
private readonly integrationPattern;
constructor(scope: Construct, id: string, props: EmrContainersStartJobRunProps);
/**
* @internal
*/
protected _renderTask(topLevelQueryLanguage?: sfn.QueryLanguage): any;
/**
* Render the EMR Containers ConfigurationProperty as JSON
*/
private applicationConfigPropertyToJson;
private validateAppConfigPropertiesLength;
private validatePropertiesNestedAppConfigBothNotUndefined;
private validateAppConfig;
private isArrayOfStrings;
private validateEntryPointArguments;
private validateEntryPointArgumentsLength;
private validateSparkSubmitParametersLength;
private validateEntryPoint;
private validateSparkSubmitJobDriver;
private assignLogGroup;
private assignLogBucket;
private createJobExecutionRole;
private grantMonitoringPolicies;
/**
* If an execution role is not provided by user, the automatically generated job execution role must create a trust relationship
* between itself and the identity of the EMR managed service account in order to run jobs on the Kubernetes namespace.
*
* This cannot occur if the user provided virtualClusterId is within an encoded JSON path.
*
* The trust relationship can be created by updating the trust policy of the job execution role.
*
* @param role the automatically generated job execution role
*/
private updateRoleTrustPolicy;
private createPolicyStatements;
}
/**
* The information about job driver for Spark submit.
*/
export interface SparkSubmitJobDriver {
/**
* The entry point of job application.
*
* Length Constraints: Minimum length of 1. Maximum length of 256.
*/
readonly entryPoint: sfn.TaskInput;
/**
* The arguments for a job application in a task input object containing an array of strings
*
* Length Constraints: Minimum length of 1. Maximum length of 10280.
* @type sfn.TaskInput which expects payload as an array of strings
*
* @default - No arguments defined
*/
readonly entryPointArguments?: sfn.TaskInput;
/**
* The Spark submit parameters that are used for job runs.
*
* Length Constraints: Minimum length of 1. Maximum length of 102400.
*
* @default - No spark submit parameters
*/
readonly sparkSubmitParameters?: string;
}
/**
* Specify the driver that the EMR Containers job runs on.
* The job driver is used to provide an input for the job that will be run.
*/
export interface JobDriver {
/**
* The job driver parameters specified for spark submit.
*
* @see https://docs.aws.amazon.com/emr-on-eks/latest/APIReference/API_SparkSubmitJobDriver.html
*
*/
readonly sparkSubmitJobDriver: SparkSubmitJobDriver;
}
/**
* The classification within a EMR Containers application configuration.
* Class can be extended to add other classifications.
* For example, new Classification('xxx-yyy');
*/
export declare class Classification {
readonly classificationStatement: string;
/**
* Sets the maximizeResourceAllocation property to true or false.
* When true, Amazon EMR automatically configures spark-defaults properties based on cluster hardware configuration.
*
* For more info:
* @see https://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-spark-configure.html#emr-spark-maximizeresourceallocation
*/
static readonly SPARK: Classification;
/**
* Sets values in the spark-defaults.conf file.
*
* For more info:
* @see https://spark.apache.org/docs/latest/configuration.html
*/
static readonly SPARK_DEFAULTS: Classification;
/**
* Sets values in the spark-env.sh file.
*
* For more info:
* @see https://spark.apache.org/docs/latest/configuration.html#environment-variables
*/
static readonly SPARK_ENV: Classification;
/**
* Sets values in the hive-site.xml for Spark.
*/
static readonly SPARK_HIVE_SITE: Classification;
/**
* Sets values in the log4j.properties file.
*
* For more settings and info:
* @see https://github.com/apache/spark/blob/master/conf/log4j.properties.template
*/
static readonly SPARK_LOG4J: Classification;
/**
* Sets values in the metrics.properties file.
*
* For more settings and info:
* @see https://github.com/apache/spark/blob/master/conf/metrics.properties.template
*/
static readonly SPARK_METRICS: Classification;
/**
* Creates a new Classification
*
* @param classificationStatement A literal string in case a new EMR classification is released, if not already defined.
*/
constructor(classificationStatement: string);
}
/**
* A configuration specification to be used when provisioning virtual clusters,
* which can include configurations for applications and software bundled with Amazon EMR on EKS.
*
* A configuration consists of a classification, properties, and optional nested configurations.
* A classification refers to an application-specific configuration file.
* Properties are the settings you want to change in that file.
* @see https://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-configure-apps.html
*/
export interface ApplicationConfiguration {
/**
* The classification within a configuration.
*
* Length Constraints: Minimum length of 1. Maximum length of 1024.
*/
readonly classification: Classification;
/**
* A list of additional configurations to apply within a configuration object.
*
* Array Members: Maximum number of 100 items.
*
* @default - No other configurations
*/
readonly nestedConfig?: ApplicationConfiguration[];
/**
* A set of properties specified within a configuration classification.
*
* Map Entries: Maximum number of 100 items.
*
* @default - No properties
*/
readonly properties?: {
[key: string]: string;
};
}
/**
* Configuration setting for monitoring.
*/
export interface Monitoring {
/**
* Enable logging for this job.
*
* If set to true, will automatically create a Cloudwatch Log Group and S3 bucket.
* This will be set to `true` implicitly if values are provided for `logGroup` or `logBucket`.
*
* @default true - true if values are provided for `logGroup` or `logBucket`, false otherwise
*/
readonly logging?: boolean;
/**
* A log group for CloudWatch monitoring.
*
* You can configure your jobs to send log information to CloudWatch Logs.
*
* @default - if `logging` is manually set to `true` and a `logGroup` is not provided, a `logGroup` will be automatically generated`.
*/
readonly logGroup?: logs.ILogGroup;
/**
* A log stream name prefix for Cloudwatch monitoring.
*
* @default - Log streams created in this log group have no default prefix
*/
readonly logStreamNamePrefix?: string;
/**
* Amazon S3 Bucket for monitoring log publishing.
*
* You can configure your jobs to send log information to Amazon S3.
*
* @default - if `logging` is manually set to `true` and a `logBucket` is not provided, a `logBucket` will be automatically generated`.
*/
readonly logBucket?: s3.IBucket;
/**
* Monitoring configurations for the persistent application UI.
*
* @default true
*/
readonly persistentAppUI?: boolean;
}
/**
* The Amazon EMR release version to use for the job run.
*
* Can be extended to include new EMR releases
*
* For example, `new ReleaseLabel('emr-x.xx.x-latest');`
*/
export declare class ReleaseLabel {
readonly label: string;
/**
* EMR Release version 5.32.0
*/
static readonly EMR_5_32_0: ReleaseLabel;
/**
* EMR Release version 5.33.0
*/
static readonly EMR_5_33_0: ReleaseLabel;
/**
* EMR Release version 6.2.0
*/
static readonly EMR_6_2_0: ReleaseLabel;
/**
* EMR Release version 6.3.0
*/
static readonly EMR_6_3_0: ReleaseLabel;
/**
* Initializes the label string.
*
* @param label A literal string that contains the release-version ex. 'emr-x.x.x-latest'
*/
constructor(label: string);
}
/**
* Class that returns a virtual cluster's id depending on input type
*/
export declare class VirtualClusterInput {
readonly id: string;
/**
* Input for a virtualClusterId from a Task Input
*/
static fromTaskInput(taskInput: sfn.TaskInput): VirtualClusterInput;
/**
* Input for virtualClusterId from a literal string
*/
static fromVirtualClusterId(virtualClusterId: string): VirtualClusterInput;
/**
* Initializes the virtual cluster ID.
*
* @param id The VirtualCluster Id
*/
private constructor();
}
export {};

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,66 @@
import type { Construct } from 'constructs';
import * as iam from '../../aws-iam';
import * as lambda from '../../aws-lambda';
import * as sfn from '../../aws-stepfunctions';
/**
* Properties for EvaluateExpression
*
*/
export interface EvaluateExpressionProps extends sfn.TaskStateBaseProps {
/**
* The expression to evaluate. The expression may contain state paths.
*
* Example value: `'$.a + $.b'`
*/
readonly expression: string;
/**
* The runtime language to use to evaluate the expression.
*
* @default - the latest Lambda node runtime available in your region.
*/
readonly runtime?: lambda.Runtime;
/**
* The system architecture compatible with this lambda function.
*
* ARM64 architecture support varies by AWS region. Please verify that your deployment region supports Lambda functions with ARM64 architecture before specifying Architecture.ARM_64.
*
* @default Architecture.X86_64
*/
readonly architecture?: lambda.Architecture;
}
/**
* The event received by the Lambda function
*
* Shared definition with packages/@aws-cdk/custom-resource-handlers/lib/custom-resources/aws-stepfunctions-tasks/index.ts
*
* @internal
*/
export interface Event {
/**
* The expression to evaluate
*/
readonly expression: string;
/**
* The expression attribute values
*/
readonly expressionAttributeValues: {
[key: string]: any;
};
}
/**
* A Step Functions Task to evaluate an expression
*
* OUTPUT: the output of this task is the evaluated expression.
*
*/
export declare class EvaluateExpression extends sfn.TaskStateBase {
private readonly props;
protected readonly taskMetrics?: sfn.TaskMetricsConfig;
protected readonly taskPolicies?: iam.PolicyStatement[];
private readonly evalFn;
constructor(scope: Construct, id: string, props: EvaluateExpressionProps);
/**
* @internal
*/
protected _renderTask(): any;
}

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.EvaluateExpression=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},lambda=()=>{var tmp=require("../../aws-lambda");return lambda=()=>tmp,tmp},sfn=()=>{var tmp=require("../../aws-stepfunctions");return sfn=()=>tmp,tmp},core_1=()=>{var tmp=require("../../core");return core_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp},eval_nodejs_provider_generated_1=()=>{var tmp=require("../../custom-resource-handlers/dist/aws-stepfunctions-tasks/eval-nodejs-provider.generated");return eval_nodejs_provider_generated_1=()=>tmp,tmp};class EvaluateExpression extends sfn().TaskStateBase{props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_stepfunctions_tasks.EvaluateExpression",version:"2.252.0"};taskMetrics;taskPolicies;evalFn;constructor(scope,id,props){super(scope,id,props),this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_EvaluateExpressionProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,EvaluateExpression),error}this.evalFn=createEvalFn(this.props.runtime,this.props.architecture,this),this.taskPolicies=[new(iam()).PolicyStatement({resources:this.evalFn.resourceArnsForGrantInvoke,actions:["lambda:InvokeFunction"]})]}_renderTask(){const matches=this.props.expression.match(/\$[.\[][.a-zA-Z[\]0-9-_]+/g);let expressionAttributeValues={};matches&&(expressionAttributeValues=matches.reduce((acc,m)=>({...acc,[m]:sfn().JsonPath.stringAt(m)}),{}));const parameters={expression:this.props.expression,expressionAttributeValues};return{Resource:this.evalFn.functionArn,Parameters:sfn().FieldUtils.renderObject(parameters)}}}exports.EvaluateExpression=EvaluateExpression;function createEvalFn(runtime,architecture,scope){const NO_RUNTIME=Symbol.for("no-runtime"),lambdaPurpose="Eval",nodeJsGuids={[lambda().Runtime.NODEJS_22_X.name]:"b64e1fb8-9c89-4f7d-8a34-2e2a1c5f6d7e",[lambda().Runtime.NODEJS_20_X.name]:"9757c267-6d7c-45c2-af77-37a30d93d2c6",[lambda().Runtime.NODEJS_18_X.name]:"078d40d3-fb4e-4d53-94a7-9c46fc11fe02",[lambda().Runtime.NODEJS_16_X.name]:"2a430b68-eb4b-4026-9232-ee39b71c1db8",[lambda().Runtime.NODEJS_14_X.name]:"da2d1181-604e-4a45-8694-1a6abd7fe42d",[lambda().Runtime.NODEJS_12_X.name]:"2b81e383-aad2-44db-8aaf-b4809ae0e3b4",[lambda().Runtime.NODEJS_10_X.name]:"a0d2ce44-871b-4e74-87a1-f5e63d7c3bdc",[NO_RUNTIME]:"41256dc5-4457-4273-8ed9-17bc818694e5"},nodeJsArmGuids={[lambda().Runtime.NODEJS_22_X.name]:"672bfe19-76c9-448b-9584-ee75ca09edbf",[lambda().Runtime.NODEJS_20_X.name]:"105f0693-c082-4e9b-83f3-9007507676f0",[lambda().Runtime.NODEJS_18_X.name]:"b1565b13-7d88-4f24-ac63-f9b23c325a55",[lambda().Runtime.NODEJS_16_X.name]:"8fa21b46-1d7c-445d-be08-6bbea646eb37",[lambda().Runtime.NODEJS_14_X.name]:"cadc099b-465f-4267-afe0-e0037d263401",[lambda().Runtime.NODEJS_12_X.name]:"abcd5ad4-b1eb-48f1-bec5-41d6f5c82caa",[lambda().Runtime.NODEJS_10_X.name]:"886204b9-1f2d-40bd-8a7e-628543da4f93",[NO_RUNTIME]:"be6d8ca1-9d2c-4db3-aeeb-f6f27f3f2f10"},runtimeKey=runtime?.name??NO_RUNTIME,uuid=(architecture===lambda().Architecture.ARM_64?nodeJsArmGuids:nodeJsGuids)[runtimeKey];if(!uuid)throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`RuntimeCurrentlySupported`,`The runtime ${runtime?.name} is currently not supported.`);return new(eval_nodejs_provider_generated_1()).EvalNodejsSingletonFunction(scope,"EvalFunction",{uuid,lambdaPurpose,runtime,architecture})}

View File

@@ -0,0 +1,225 @@
import type { Construct } from 'constructs';
import * as iam from '../../../aws-iam';
import type * as kms from '../../../aws-kms';
import type * as sqs from '../../../aws-sqs';
import * as sfn from '../../../aws-stepfunctions';
import { Duration } from '../../../core';
import type { Schedule } from '../schedule';
/**
* The action that EventBridge Scheduler applies to the schedule after the schedule completes invoking the target.
*/
export declare enum ActionAfterCompletion {
/**
* Takes no action
*/
NONE = "NONE",
/**
* Deletes the schedule
*/
DELETE = "DELETE"
}
interface EventBridgeSchedulerCreateScheduleTaskOptions {
/**
* Schedule name
*/
readonly scheduleName: string;
/**
* Specifies the action that EventBridge Scheduler applies to the schedule after the schedule completes invoking the target.
*
* @default ActionAfterCompletion.NONE
*/
readonly actionAfterCompletion?: ActionAfterCompletion;
/**
* Unique, case-sensitive identifier to ensure the idempotency of the request.
*
* @default - Automatically generated
*/
readonly clientToken?: string;
/**
* The description for the schedule.
*
* @default - No description
*/
readonly description?: string;
/**
* The date, in UTC, before which the schedule can invoke its target.
* Depending on the schedule's recurrence expression, invocations might stop on, or before, the EndDate you specify.
* EventBridge Scheduler ignores EndDate for one-time schedules.
*
* @default - No end date
*/
readonly endDate?: Date;
/**
* The maximum time window during which a schedule can be invoked.
*
* Minimum value is 1 minute.
* Maximum value is 1440 minutes (1 day).
*
* @default - Flexible time window is not enabled.
*/
readonly flexibleTimeWindow?: Duration;
/**
* The name of the schedule group to associate with this schedule.
*
* @default - The default schedule group is used.
*/
readonly groupName?: string;
/**
* The customer managed KMS key that EventBridge Scheduler will use to encrypt and decrypt payload.
*
* @see https://docs.aws.amazon.com/scheduler/latest/UserGuide/encryption-rest.html
*
* @default - Use automatically generated KMS key
*/
readonly kmsKey?: kms.IKey;
/**
* The schedule that defines when the schedule will trigger.
*
* @see https://docs.aws.amazon.com/scheduler/latest/UserGuide/schedule-types.html
*/
readonly schedule: Schedule;
/**
* The timezone in which the scheduling expression is evaluated.
*
* @default - UTC
*/
readonly timezone?: string;
/**
* The date, in UTC, after which the schedule can begin invoking its target.
* Depending on the schedule's recurrence expression, invocations might occur on, or after, the StartDate you specify.
* EventBridge Scheduler ignores StartDate for one-time schedules.
*
* @default - No start date
*/
readonly startDate?: Date;
/**
* Specifies whether the schedule is enabled or disabled.
*
* @default true
*/
readonly enabled?: boolean;
/**
* The schedule's target.
*/
readonly target: EventBridgeSchedulerTarget;
}
/**
* Properties for creating an AWS EventBridge Scheduler schedule using JSONPath
*/
export interface EventBridgeSchedulerCreateScheduleTaskJsonPathProps extends sfn.TaskStateJsonPathBaseProps, EventBridgeSchedulerCreateScheduleTaskOptions {
}
/**
* Properties for creating an AWS EventBridge Scheduler schedule using JSONata
*/
export interface EventBridgeSchedulerCreateScheduleTaskJsonataProps extends sfn.TaskStateJsonataBaseProps, EventBridgeSchedulerCreateScheduleTaskOptions {
}
/**
* Properties for creating an AWS EventBridge Scheduler schedule
*/
export interface EventBridgeSchedulerCreateScheduleTaskProps extends sfn.TaskStateBaseProps, EventBridgeSchedulerCreateScheduleTaskOptions {
}
/**
* Properties for `EventBridgeSchedulerTarget`
*
* @see https://docs.aws.amazon.com/scheduler/latest/APIReference/API_Target.html#API_Target_Contents
*/
export interface EventBridgeSchedulerTargetProps {
/**
* The Amazon Resource Name (ARN) of the target.
*
* @see https://docs.aws.amazon.com/scheduler/latest/UserGuide/managing-targets.html
*/
readonly arn: string;
/**
* The IAM role that EventBridge Scheduler will use for this target when the schedule is invoked.
*/
readonly role: iam.IRole;
/**
* The input to the target.
*
* @default - EventBridge Scheduler delivers a default notification to the target
*/
readonly input?: string;
/**
* The retry policy settings
*
* @default - Do not retry
*/
readonly retryPolicy?: RetryPolicy;
/**
* Dead letter queue for failed events
*
* @default - No dead letter queue
*/
readonly deadLetterQueue?: sqs.IQueue;
}
/**
* The target that EventBridge Scheduler will invoke
*/
export declare class EventBridgeSchedulerTarget {
/**
* The Amazon Resource Name (ARN) of the target
*/
arn: string;
/**
* The IAM role that EventBridge Scheduler will use for this target when the schedule is invoked
*/
role: iam.IRole;
/**
* The input to the target
*/
input?: string;
/**
* The retry policy settings
*/
retryPolicy?: RetryPolicy;
/**
* Dead letter queue for failed events
*/
deadLetterQueue?: sqs.IQueue;
constructor(props: EventBridgeSchedulerTargetProps);
/**
* return the target object for the EventBridge Scheduler
*/
renderTargetObject(): any;
private validateProps;
}
/**
* The information about the retry policy settings
*/
export interface RetryPolicy {
/**
* The maximum number of retry attempts to make before the request fails.
*/
readonly maximumRetryAttempts: number;
/**
* The maximum amount of time to continue to make retry attempts.
*/
readonly maximumEventAge: Duration;
}
/**
* Create a new AWS EventBridge Scheduler schedule
*
* @see https://docs.aws.amazon.com/scheduler/latest/APIReference/API_CreateSchedule.html
*/
export declare class EventBridgeSchedulerCreateScheduleTask extends sfn.TaskStateBase {
private readonly props;
/**
* Create an AWS EventBridge Scheduler schedule using JSONPath
*/
static jsonPath(scope: Construct, id: string, props: EventBridgeSchedulerCreateScheduleTaskJsonPathProps): EventBridgeSchedulerCreateScheduleTask;
/**
* Create an AWS EventBridge Scheduler schedule using JSONata
*/
static jsonata(scope: Construct, id: string, props: EventBridgeSchedulerCreateScheduleTaskJsonataProps): EventBridgeSchedulerCreateScheduleTask;
protected readonly taskMetrics?: sfn.TaskMetricsConfig;
protected readonly taskPolicies?: iam.PolicyStatement[];
private readonly integrationPattern;
constructor(scope: Construct, id: string, props: EventBridgeSchedulerCreateScheduleTaskProps);
/**
* @internal
*/
protected _renderTask(topLevelQueryLanguage?: sfn.QueryLanguage): any;
private validateProps;
}
export {};

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,96 @@
import type { Construct } from 'constructs';
import type * as events from '../../../aws-events';
import * as iam from '../../../aws-iam';
import * as sfn from '../../../aws-stepfunctions';
/**
* An entry to be sent to EventBridge
*
* @see https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutEventsRequestEntry.html
*/
export interface EventBridgePutEventsEntry {
/**
* The event body
*
* Can either be provided as an object or as a JSON-serialized string
* @example
*
* sfn.TaskInput.fromText('{"instance-id": "i-1234567890abcdef0", "state": "terminated"}');
* sfn.TaskInput.fromObject({ Message: 'Hello from Step Functions' });
* sfn.TaskInput.fromJsonPathAt('$.EventDetail');
*/
readonly detail: sfn.TaskInput;
/**
* Used along with the source field to help identify the fields and values expected in the detail field
*
* For example, events by CloudTrail have detail type "AWS API Call via CloudTrail"
* @see https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-events.html
*/
readonly detailType: string;
/**
* The event bus the entry will be sent to.
*
* @default - event is sent to account's default event bus
*/
readonly eventBus?: events.IEventBusRef;
/**
* The service or application that caused this event to be generated
*
* Example value: `com.example.service`
*
* @see https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-events.html
*/
readonly source: string;
}
interface EventBridgePutEventsOptions {
/**
* The entries that will be sent. Minimum number of entries is 1 and maximum is 10,
* unless [PutEvents API limit](https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutEvents.html#API_PutEvents_RequestSyntax) has changed.
*/
readonly entries: EventBridgePutEventsEntry[];
}
/**
* Properties for sending events with PutEvents using JSONPath
*/
export interface EventBridgePutEventsJsonPathProps extends sfn.TaskStateJsonPathBaseProps, EventBridgePutEventsOptions {
}
/**
* Properties for sending events with PutEvents using JSONata
*/
export interface EventBridgePutEventsJsonataProps extends sfn.TaskStateJsonataBaseProps, EventBridgePutEventsOptions {
}
/**
* Properties for sending events with PutEvents
*/
export interface EventBridgePutEventsProps extends sfn.TaskStateBaseProps, EventBridgePutEventsOptions {
}
/**
* A StepFunctions Task to send events to an EventBridge event bus
*/
export declare class EventBridgePutEvents extends sfn.TaskStateBase {
private readonly props;
/**
* A StepFunctions Task using JSONPath to send events to an EventBridge event bus
*/
static jsonPath(scope: Construct, id: string, props: EventBridgePutEventsJsonPathProps): EventBridgePutEvents;
/**
* A StepFunctions Task using JSONata to send events to an EventBridge event bus
*/
static jsonata(scope: Construct, id: string, props: EventBridgePutEventsJsonataProps): EventBridgePutEvents;
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: EventBridgePutEventsProps);
/**
* Returns an array of EventBusArn strings based on this.props.entries
*/
private get eventBusArns();
/**
* Provides the EventBridge put events service integration task configuration
* @internal
*/
protected _renderTask(topLevelQueryLanguage?: sfn.QueryLanguage): any;
private renderEntries;
private validateEntries;
}
export {};

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.EventBridgePutEvents=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},literal_string_1=()=>{var tmp=require("../../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp},task_utils_1=()=>{var tmp=require("../private/task-utils");return task_utils_1=()=>tmp,tmp};class EventBridgePutEvents extends sfn().TaskStateBase{props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_stepfunctions_tasks.EventBridgePutEvents",version:"2.252.0"};static jsonPath(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_EventBridgePutEventsJsonPathProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.jsonPath),error}return new EventBridgePutEvents(scope,id,props)}static jsonata(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_EventBridgePutEventsJsonataProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.jsonata),error}return new EventBridgePutEvents(scope,id,{...props,queryLanguage:sfn().QueryLanguage.JSONATA})}static SUPPORTED_INTEGRATION_PATTERNS=[sfn().IntegrationPattern.REQUEST_RESPONSE,sfn().IntegrationPattern.WAIT_FOR_TASK_TOKEN];taskMetrics;taskPolicies;integrationPattern;constructor(scope,id,props){super(scope,id,props),this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_EventBridgePutEventsProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,EventBridgePutEvents),error}if(this.integrationPattern=props.integrationPattern??sfn().IntegrationPattern.REQUEST_RESPONSE,(0,task_utils_1().validatePatternSupported)(this.integrationPattern,EventBridgePutEvents.SUPPORTED_INTEGRATION_PATTERNS),this.integrationPattern===sfn().IntegrationPattern.WAIT_FOR_TASK_TOKEN&&!sfn().FieldUtils.containsTaskToken(props.entries.map(entry=>entry.detail)))throw new(cdk()).ValidationError((0,literal_string_1().lit)`TaskTokenRequired`,"Task Token is required in `entries`. Use JsonPath.taskToken to set the token.",this);this.validateEntries(),this.taskPolicies=[new(iam()).PolicyStatement({actions:["events:PutEvents"],resources:this.eventBusArns})]}get eventBusArns(){return this.props.entries.map(entry=>entry.eventBus?entry.eventBus.eventBusRef.eventBusArn:cdk().Stack.of(this).formatArn({resource:"event-bus",resourceName:"default",arnFormat:cdk().ArnFormat.SLASH_RESOURCE_NAME,service:"events"}))}_renderTask(topLevelQueryLanguage){const queryLanguage=sfn()._getActualQueryLanguage(topLevelQueryLanguage,this.props.queryLanguage);return{Resource:(0,task_utils_1().integrationResourceArn)("events","putEvents",this.integrationPattern),...this._renderParametersOrArguments({Entries:this.renderEntries()},queryLanguage)}}renderEntries(){return this.props.entries.map(entry=>({Detail:entry.detail?.value,DetailType:entry.detailType,EventBusName:entry.eventBus?.eventBusRef.eventBusArn,Source:entry.source}))}validateEntries(){if(this.props.entries.length<=0)throw new(cdk()).ValidationError((0,literal_string_1().lit)`EntriesMustBeNonEmptyArray`,"Value for property `entries` must be a non-empty array.",this);if(this.props.entries.some(e=>e.source.startsWith("aws.")))throw new(cdk()).ValidationError((0,literal_string_1().lit)`EventSourceCannotStartWithAws`,'Event source cannot start with "aws."',this)}}exports.EventBridgePutEvents=EventBridgePutEvents;

View File

@@ -0,0 +1,2 @@
import * as sfn from '../../../aws-stepfunctions';
import type { Duration } from '../../../core';

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.RunGlueJobTask=void 0;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},core_1=()=>{var tmp=require("../../../core");return core_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp},resource_arn_suffix_1=()=>{var tmp=require("../resource-arn-suffix");return resource_arn_suffix_1=()=>tmp,tmp};class RunGlueJobTask{glueJobName;props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_stepfunctions_tasks.RunGlueJobTask",version:"2.252.0"};integrationPattern;constructor(glueJobName,props={}){if(this.glueJobName=glueJobName,this.props=props,this.integrationPattern=props.integrationPattern||sfn().ServiceIntegrationPattern.FIRE_AND_FORGET,![sfn().ServiceIntegrationPattern.FIRE_AND_FORGET,sfn().ServiceIntegrationPattern.SYNC].includes(this.integrationPattern))throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`InvalidServiceIntegrationPattern`,`Invalid Service Integration Pattern: ${this.integrationPattern} is not supported to call Glue.`)}bind(task){const notificationProperty=this.props.notifyDelayAfter?{NotifyDelayAfter:this.props.notifyDelayAfter.toMinutes()}:null;let iamActions;return this.integrationPattern===sfn().ServiceIntegrationPattern.FIRE_AND_FORGET?iamActions=["glue:StartJobRun"]:this.integrationPattern===sfn().ServiceIntegrationPattern.SYNC&&(iamActions=["glue:StartJobRun","glue:GetJobRun","glue:GetJobRuns","glue:BatchStopJobRun"]),{resourceArn:(0,resource_arn_suffix_1().getResourceArn)("glue","startJobRun",this.integrationPattern),policyStatements:[new(iam()).PolicyStatement({resources:[core_1().Stack.of(task).formatArn({service:"glue",resource:"job",resourceName:this.glueJobName})],actions:iamActions})],metricPrefixSingular:"GlueJob",metricPrefixPlural:"GlueJobs",metricDimensions:{GlueJobName:this.glueJobName},parameters:{JobName:this.glueJobName,Arguments:this.props.arguments,Timeout:this.props.timeout?.toMinutes(),SecurityConfiguration:this.props.securityConfiguration,NotificationProperty:notificationProperty}}}}exports.RunGlueJobTask=RunGlueJobTask;

View File

@@ -0,0 +1,53 @@
import type { Construct } from 'constructs';
import * as iam from '../../../aws-iam';
import * as sfn from '../../../aws-stepfunctions';
interface GlueStartCrawlerRunOptions {
/**
* Glue crawler name
*/
readonly crawlerName: string;
}
/**
* Properties for starting an AWS Glue Crawler as a task that using JSONPath
*/
export interface GlueStartCrawlerRunJsonPathProps extends sfn.TaskStateJsonPathBaseProps, GlueStartCrawlerRunOptions {
}
/**
* Properties for starting an AWS Glue Crawler as a task that using JSONata
*/
export interface GlueStartCrawlerRunJsonataProps extends sfn.TaskStateJsonataBaseProps, GlueStartCrawlerRunOptions {
}
/**
* Properties for starting an AWS Glue Crawler as a task
*/
export interface GlueStartCrawlerRunProps extends sfn.TaskStateBaseProps, GlueStartCrawlerRunOptions {
}
/**
* Starts an AWS Glue Crawler in a Task state
*
* @see https://docs.aws.amazon.com/glue/latest/dg/aws-glue-api-crawler-crawling.html#aws-glue-api-crawler-crawling-StartCrawler
*/
export declare class GlueStartCrawlerRun extends sfn.TaskStateBase {
private readonly props;
/**
* Starts an AWS Glue Crawler using JSONPath in a Task state
*
* @see https://docs.aws.amazon.com/glue/latest/dg/aws-glue-api-crawler-crawling.html#aws-glue-api-crawler-crawling-StartCrawler
*/
static jsonPath(scope: Construct, id: string, props: GlueStartCrawlerRunJsonPathProps): GlueStartCrawlerRun;
/**
* Starts an AWS Glue Crawler using JSONata in a Task state
*
* @see https://docs.aws.amazon.com/glue/latest/dg/aws-glue-api-crawler-crawling.html#aws-glue-api-crawler-crawling-StartCrawler
*/
static jsonata(scope: Construct, id: string, props: GlueStartCrawlerRunJsonataProps): GlueStartCrawlerRun;
protected readonly taskMetrics?: sfn.TaskMetricsConfig;
protected readonly taskPolicies?: iam.PolicyStatement[];
private readonly integrationPattern;
constructor(scope: Construct, id: string, props: GlueStartCrawlerRunProps);
/**
* @internal
*/
protected _renderTask(topLevelQueryLanguage?: sfn.QueryLanguage): any;
}
export {};

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.GlueStartCrawlerRun=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},core_1=()=>{var tmp=require("../../../core");return core_1=()=>tmp,tmp},task_utils_1=()=>{var tmp=require("../private/task-utils");return task_utils_1=()=>tmp,tmp};class GlueStartCrawlerRun extends sfn().TaskStateBase{props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_stepfunctions_tasks.GlueStartCrawlerRun",version:"2.252.0"};static jsonPath(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_GlueStartCrawlerRunJsonPathProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.jsonPath),error}return new GlueStartCrawlerRun(scope,id,props)}static jsonata(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_GlueStartCrawlerRunJsonataProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.jsonata),error}return new GlueStartCrawlerRun(scope,id,{...props,queryLanguage:sfn().QueryLanguage.JSONATA})}taskMetrics;taskPolicies;integrationPattern;constructor(scope,id,props){super(scope,id,props),this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_GlueStartCrawlerRunProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,GlueStartCrawlerRun),error}this.integrationPattern=props.integrationPattern??sfn().IntegrationPattern.REQUEST_RESPONSE,this.taskPolicies=[new(iam()).PolicyStatement({resources:[core_1().Stack.of(this).formatArn({service:"glue",resource:"crawler",resourceName:this.props.crawlerName})],actions:["glue:StartCrawler","glue:GetCrawler"]})]}_renderTask(topLevelQueryLanguage){const queryLanguage=sfn()._getActualQueryLanguage(topLevelQueryLanguage,this.props.queryLanguage);return{Resource:(0,task_utils_1().integrationResourceArn)("aws-sdk:glue","startCrawler",this.integrationPattern),...this._renderParametersOrArguments({Name:this.props.crawlerName},queryLanguage)}}}exports.GlueStartCrawlerRun=GlueStartCrawlerRun;

View File

@@ -0,0 +1,223 @@
import type { Construct } from 'constructs';
import * as iam from '../../../aws-iam';
import * as sfn from '../../../aws-stepfunctions';
import { Duration } from '../../../core';
/**
* Properties for the worker configuration.
*/
export interface WorkerConfigurationProperty {
/**
* The type of predefined worker that is allocated when a job runs.
*
* @default - must choose one of `workerType` or `workerTypeV2`
* @deprecated Use `workerTypeV2` for more flexibility in defining worker types.
*/
readonly workerType?: WorkerType;
/**
* The type of predefined worker that is allocated when a job runs. Can be one of the
* predefined values or dynamic values using `WorkerTypeV2.of(...)`.
*
* @default - must choose one of `workerType` or `workerTypeV2`
*/
readonly workerTypeV2?: WorkerTypeV2;
/**
* The number of workers of a defined `WorkerType` that are allocated when a job runs.
*/
readonly numberOfWorkers: number;
}
interface GlueStartJobRunOptions {
/**
* Glue job name
*/
readonly glueJobName: string;
/**
* The job arguments specifically for this run.
*
* For this job run, they replace the default arguments set in the job
* definition itself.
*
* @default - Default arguments set in the job definition
*/
readonly arguments?: sfn.TaskInput;
/**
* The name of the SecurityConfiguration structure to be used with this job run.
*
* This must match the Glue API
* @see https://docs.aws.amazon.com/glue/latest/dg/aws-glue-api-common.html#aws-glue-api-regex-oneLine
*
* @default - Default configuration set in the job definition
*/
readonly securityConfiguration?: string;
/**
* After a job run starts, the number of minutes to wait before sending a job run delay notification.
*
* Must be at least 1 minute.
*
* @default - Default delay set in the job definition
*/
readonly notifyDelayAfter?: Duration;
/**
* The worker configuration for this run.
*
* @default - Default worker configuration in the job definition
*/
readonly workerConfiguration?: WorkerConfigurationProperty;
/**
* The excecution class of the job.
*
* @default - STANDARD
*/
readonly executionClass?: ExecutionClass;
}
/**
* Properties for starting an AWS Glue job as a task
*/
export interface GlueStartJobRunJsonPathProps extends sfn.TaskStateJsonPathBaseProps, GlueStartJobRunOptions {
}
/**
* Properties for starting an AWS Glue job as a task
*/
export interface GlueStartJobRunJsonataProps extends sfn.TaskStateJsonataBaseProps, GlueStartJobRunOptions {
}
/**
* Properties for starting an AWS Glue job as a task
*/
export interface GlueStartJobRunProps extends sfn.TaskStateBaseProps, GlueStartJobRunOptions {
}
/**
* Starts an AWS Glue job in a Task state
*
* OUTPUT: the output of this task is a JobRun structure, for details consult
* https://docs.aws.amazon.com/glue/latest/dg/aws-glue-api-jobs-runs.html#aws-glue-api-jobs-runs-JobRun
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-glue.html
*/
export declare class GlueStartJobRun extends sfn.TaskStateBase {
private readonly props;
/**
* Starts an AWS Glue job in a Task state using JSONPath
*
* OUTPUT: the output of this task is a JobRun structure, for details consult
* https://docs.aws.amazon.com/glue/latest/dg/aws-glue-api-jobs-runs.html#aws-glue-api-jobs-runs-JobRun
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-glue.html
*/
static jsonPath(scope: Construct, id: string, props: GlueStartJobRunJsonPathProps): GlueStartJobRun;
/**
* Starts an AWS Glue job in a Task state using JSONata
*
* OUTPUT: the output of this task is a JobRun structure, for details consult
* https://docs.aws.amazon.com/glue/latest/dg/aws-glue-api-jobs-runs.html#aws-glue-api-jobs-runs-JobRun
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-glue.html
*/
static jsonata(scope: Construct, id: string, props: GlueStartJobRunJsonataProps): GlueStartJobRun;
private static readonly SUPPORTED_INTEGRATION_PATTERNS;
protected readonly taskMetrics?: sfn.TaskMetricsConfig;
protected readonly taskPolicies?: iam.PolicyStatement[];
private readonly integrationPattern;
private readonly jobArguments?;
constructor(scope: Construct, id: string, props: GlueStartJobRunProps);
/**
* @internal
*/
protected _renderTask(topLevelQueryLanguage?: sfn.QueryLanguage): any;
private getPolicies;
}
/**
* The type of predefined worker that is allocated when a job runs.
*
* @deprecated Use `workerTypeV2` property for `WorkerConfigurationProperty`
*/
export declare enum WorkerType {
/**
* Each worker provides 4 vCPU, 16 GB of memory and a 50GB disk, and 2 executors per worker.
*/
STANDARD = "Standard",
/**
* Each worker maps to 0.25 DPU (2 vCPU, 4 GB of memory, 64 GB disk), and provides 1 executor per worker. Suitable for low volume streaming jobs.
*/
G_025X = "G.025X",
/**
* Each worker maps to 1 DPU (4 vCPU, 16 GB of memory, 64 GB disk), and provides 1 executor per worker. Suitable for memory-intensive jobs.
*/
G_1X = "G.1X",
/**
* Each worker maps to 2 DPU (8 vCPU, 32 GB of memory, 128 GB disk), and provides 1 executor per worker. Suitable for memory-intensive jobs.
*/
G_2X = "G.2X",
/**
* Each worker maps to 4 DPU (16 vCPU, 64 GB of memory, 256 GB disk), and provides 1 executor per worker. We recommend this worker type for jobs whose workloads contain your most demanding transforms, aggregations, joins, and queries. This worker type is available only for AWS Glue version 3.0 or later jobs.
*/
G_4X = "G.4X",
/**
* Each worker maps to 8 DPU (32 vCPU, 128 GB of memory, 512 GB disk), and provides 1 executor per worker. We recommend this worker type for jobs whose workloads contain your most demanding transforms, aggregations, joins, and queries. This worker type is available only for AWS Glue version 3.0 or later jobs.
*/
G_8X = "G.8X",
/**
* Each worker maps to 2 high-memory DPU [M-DPU] (8 vCPU, 64 GB of memory, 128 GB disk). Supported in Ray jobs.
*/
Z_2X = "Z.2X"
}
/**
* The type of predefined worker that is allocated when a job runs.
*
* If you need to use a WorkerTypeV2 that doesn't exist as a static member, you
* can instantiate a `WorkerTypeV2` object, e.g: `WorkerTypeV2.of('other type')`.
*/
export declare class WorkerTypeV2 {
/**
* Each worker provides 4 vCPU, 16 GB of memory and a 50GB disk, and 2 executors per worker.
*/
static readonly STANDARD: WorkerTypeV2;
/**
* Each worker maps to 1 DPU (4 vCPU, 16 GB of memory, 64 GB disk), and provides 1 executor per worker. Suitable for memory-intensive jobs.
*/
static readonly G_1X: WorkerTypeV2;
/**
* Each worker maps to 2 DPU (8 vCPU, 32 GB of memory, 128 GB disk), and provides 1 executor per worker. Suitable for memory-intensive jobs.
*/
static readonly G_2X: WorkerTypeV2;
/**
* Each worker maps to 4 DPU (16 vCPU, 64 GB of memory, 256 GB disk), and provides 1 executor per worker. We recommend this worker type for jobs whose workloads contain your most demanding transforms, aggregations, joins, and queries. This worker type is available only for AWS Glue version 3.0 or later jobs.
*/
static readonly G_4X: WorkerTypeV2;
/**
* Each worker maps to 8 DPU (32 vCPU, 128 GB of memory, 512 GB disk), and provides 1 executor per worker. We recommend this worker type for jobs whose workloads contain your most demanding transforms, aggregations, joins, and queries. This worker type is available only for AWS Glue version 3.0 or later jobs.
*/
static readonly G_8X: WorkerTypeV2;
/**
* Each worker maps to 0.25 DPU (2 vCPU, 4 GB of memory, 64 GB disk), and provides 1 executor per worker. Suitable for low volume streaming jobs.
*/
static readonly G_025X: WorkerTypeV2;
/**
* Each worker maps to 2 high-memory DPU [M-DPU] (8 vCPU, 64 GB of memory, 128 GB disk). Supported in Ray jobs.
*/
static readonly Z_2X: WorkerTypeV2;
/**
* Custom worker type
* @param workerType custom worker type
*/
static of(workerType: string): WorkerTypeV2;
/**
* The name of this WorkerType, as expected by Job resource.
*/
readonly name: string;
private constructor();
}
/**
* The excecution class of the job.
*/
export declare enum ExecutionClass {
/**
* The flexible execution class is appropriate for time-insensitive jobs whose start and completion times may vary.
* Only jobs with AWS Glue version 3.0 and above and command type `glueetl` will be allowed to set `ExecutionClass` to `FLEX`.
* The flexible execution class is available for Spark jobs.
*/
FLEX = "FLEX",
/**
* The standard execution class is ideal for time-sensitive workloads that require fast job startup and dedicated resources.
*/
STANDARD = "STANDARD"
}
export {};

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,126 @@
import type { Construct } from 'constructs';
import type * as events from '../../../aws-events';
import * as iam from '../../../aws-iam';
import * as sfn from '../../../aws-stepfunctions';
/**
* The style used when applying URL encoding to array values.
*/
export declare enum URLEncodingFormat {
/**
* Encode arrays using brackets. For example, {'array': ['a','b','c']} encodes to 'array[]=a&array[]=b&array[]=c'
*/
BRACKETS = "BRACKETS",
/**
* Encode arrays using commas. For example, {'array': ['a','b','c']} encodes to 'array=a,b,c,d'
*/
COMMAS = "COMMAS",
/**
* Apply the default URL encoding style (INDICES).
*/
DEFAULT = "DEFAULT",
/**
* Encode arrays using the index value. For example, {'array': ['a','b','c']} encodes to 'array[0]=a&array[1]=b&array[2]=c'
*/
INDICES = "INDICES",
/**
* Do not apply URL encoding.
*/
NONE = "NONE",
/**
* Repeat key for each item in the array. For example, {'array': ['a','b','c']} encodes to 'array[]=a&array[]=b&array[]=c'
*/
REPEAT = "REPEAT"
}
interface HttpInvokeOptions {
/**
* Permissions are granted to call all resources under this path.
*
* @example 'https://api.example.com'
*/
readonly apiRoot: string;
/**
* The API endpoint to call, relative to `apiRoot`.
* @example sfn.TaskInput.fromText('path/to/resource')
*/
readonly apiEndpoint: sfn.TaskInput;
/**
* The HTTP method to use.
*
* @example sfn.TaskInput.fromText('GET')
*/
readonly method: sfn.TaskInput;
/**
* The EventBridge Connection to use for authentication.
*/
readonly connection: events.IConnection;
/**
* The body to send to the HTTP endpoint.
*
* @default - No body is sent with the request.
*/
readonly body?: sfn.TaskInput;
/**
* The headers to send to the HTTP endpoint.
*
* @example sfn.TaskInput.fromObject({ 'Content-Type': 'application/json' })
*
* @default - No additional headers are added to the request.
*/
readonly headers?: sfn.TaskInput;
/**
* The query string parameters to send to the HTTP endpoint.
* @default - No query string parameters are sent in the request.
*/
readonly queryStringParameters?: sfn.TaskInput;
/**
* Determines whether to apply URL encoding to the request body, and which array encoding format to use.
*
* `URLEncodingFormat.NONE` passes the JSON-serialized `RequestBody` field as the HTTP request body.
* Otherwise, the HTTP request body is the URL-encoded form data of the `RequestBody` field using the
* specified array encoding format, and the `Content-Type` header is set to `application/x-www-form-urlencoded`.
*
* @default - URLEncodingFormat.NONE
*/
readonly urlEncodingFormat?: URLEncodingFormat;
}
/**
* Properties for calling an external HTTP endpoint with HttpInvoke using JSONPath.
*/
export interface HttpInvokeJsonPathProps extends sfn.TaskStateJsonPathBaseProps, HttpInvokeOptions {
}
/**
* Properties for calling an external HTTP endpoint with HttpInvoke using JSONata.
*/
export interface HttpInvokeJsonataProps extends sfn.TaskStateJsonataBaseProps, HttpInvokeOptions {
}
/**
* Properties for calling an external HTTP endpoint with HttpInvoke.
*/
export interface HttpInvokeProps extends sfn.TaskStateBaseProps, HttpInvokeOptions {
}
/**
* A Step Functions Task to call a public third-party API.
*/
export declare class HttpInvoke extends sfn.TaskStateBase {
private readonly props;
/**
* A Step Functions Task to call a public third-party API using JSONPath.
*/
static jsonPath(scope: Construct, id: string, props: HttpInvokeJsonPathProps): HttpInvoke;
/**
* A Step Functions Task to call a public third-party API using JSONata.
*/
static jsonata(scope: Construct, id: string, props: HttpInvokeJsonataProps): HttpInvoke;
protected readonly taskMetrics?: sfn.TaskMetricsConfig;
protected readonly taskPolicies?: iam.PolicyStatement[];
constructor(scope: Construct, id: string, props: HttpInvokeProps);
/**
* Provides the HTTP Invoke service integration task configuration.
*
* @internal
*/
protected _renderTask(topLevelQueryLanguage?: sfn.QueryLanguage): any;
protected buildTaskPolicyStatements(): iam.PolicyStatement[];
private buildTaskParameters;
}
export {};

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.HttpInvoke=exports.URLEncodingFormat=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},jsonata_1=()=>{var tmp=require("../../../aws-stepfunctions/lib/private/jsonata");return jsonata_1=()=>tmp,tmp},core_1=()=>{var tmp=require("../../../core");return core_1=()=>tmp,tmp},cxapi=()=>{var tmp=require("../../../cx-api");return cxapi=()=>tmp,tmp},task_utils_1=()=>{var tmp=require("../private/task-utils");return task_utils_1=()=>tmp,tmp},URLEncodingFormat;(function(URLEncodingFormat2){URLEncodingFormat2.BRACKETS="BRACKETS",URLEncodingFormat2.COMMAS="COMMAS",URLEncodingFormat2.DEFAULT="DEFAULT",URLEncodingFormat2.INDICES="INDICES",URLEncodingFormat2.NONE="NONE",URLEncodingFormat2.REPEAT="REPEAT"})(URLEncodingFormat||(exports.URLEncodingFormat=URLEncodingFormat={}));class HttpInvoke extends sfn().TaskStateBase{props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_stepfunctions_tasks.HttpInvoke",version:"2.252.0"};static jsonPath(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_HttpInvokeJsonPathProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.jsonPath),error}return new HttpInvoke(scope,id,props)}static jsonata(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_HttpInvokeJsonataProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.jsonata),error}return new HttpInvoke(scope,id,{...props,queryLanguage:sfn().QueryLanguage.JSONATA})}taskMetrics;taskPolicies;constructor(scope,id,props){super(scope,id,props),this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_HttpInvokeProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,HttpInvoke),error}this.taskPolicies=this.buildTaskPolicyStatements()}_renderTask(topLevelQueryLanguage){const queryLanguage=sfn()._getActualQueryLanguage(topLevelQueryLanguage,this.props.queryLanguage);return{Resource:(0,task_utils_1().integrationResourceArn)("http","invoke"),...this._renderParametersOrArguments(this.buildTaskParameters(),queryLanguage)}}buildTaskPolicyStatements(){return[new(iam()).PolicyStatement({actions:["events:RetrieveConnectionCredentials"],resources:[this.props.connection.connectionArn]}),new(iam()).PolicyStatement({actions:["secretsmanager:GetSecretValue","secretsmanager:DescribeSecret"],resources:[this.props.connection.connectionSecretArn]}),new(iam()).PolicyStatement({actions:["states:InvokeHTTPEndpoint"],resources:["*"],conditions:{StringLike:{"states:HTTPEndpoint":`${(0,jsonata_1().isValidJsonataExpression)(this.props.apiRoot)?"":this.props.apiRoot}*`}}})]}buildTaskParameters(){const unJsonata=v=>v.replace(/^{%/,"").replace(/%}$/,"").trim(),useJsonata=this.queryLanguage===sfn().QueryLanguage.JSONATA,getStringValue=v=>useJsonata&&!(0,jsonata_1().isValidJsonataExpression)(v)?`'${v}'`:unJsonata(v),parameters={ApiEndpoint:useJsonata?`{% ${getStringValue(this.props.apiRoot)} & '/' & ${getStringValue(this.props.apiEndpoint.value)} %}`:core_1().FeatureFlags.of(this).isEnabled(cxapi().STEPFUNCTIONS_TASKS_HTTPINVOKE_DYNAMIC_JSONPATH_ENDPOINT)?sfn().JsonPath.format("{}/{}",this.props.apiRoot,this.props.apiEndpoint.value):`${this.props.apiRoot}/${this.props.apiEndpoint.value}`,Authentication:{ConnectionArn:this.props.connection.connectionArn},Method:this.props.method.value,Headers:this.props.headers?.value,RequestBody:this.props.body?.value,QueryParameters:this.props.queryStringParameters?.value};return this.props.urlEncodingFormat!=null&&this.props.urlEncodingFormat!==URLEncodingFormat.NONE&&(parameters.Headers={...parameters.Headers,"Content-Type":"application/x-www-form-urlencoded"},parameters.Transform={RequestBodyEncoding:"URL_ENCODED"},this.props.urlEncodingFormat!==URLEncodingFormat.DEFAULT&&(parameters.Transform.RequestEncodingOptions={ArrayFormat:this.props.urlEncodingFormat})),parameters}}exports.HttpInvoke=HttpInvoke;

Some files were not shown because too many files have changed in this diff Show More