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,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