Skip to content

Commit 64086ea

Browse files
chore(stepfunctions-tasks): clean up aws-stepfunctions-tasks linter exclusions (#6579)
* chore: clean up aws-stepfunctions-tasks linter exclusions * addressing PR feedback Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
1 parent 9087fba commit 64086ea

9 files changed

+140
-78
lines changed

packages/@aws-cdk/aws-stepfunctions-tasks/lib/publish-to-topic.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,15 @@ export interface PublishToTopicProps {
2121
* being sent to every subscription type.
2222
*
2323
* @see https://docs.aws.amazon.com/sns/latest/api/API_Publish.html#API_Publish_RequestParameters
24+
* @default false
2425
*/
2526
readonly messagePerSubscriptionType?: boolean;
2627

2728
/**
28-
* Message subject
29+
* Used as the "Subject" line when the message is delivered to email endpoints.
30+
* Also included, if present, in the standard JSON messages delivered to other endpoints.
31+
*
32+
* @default - No subject
2933
*/
3034
readonly subject?: string;
3135

packages/@aws-cdk/aws-stepfunctions-tasks/lib/run-ecs-task-base-types.ts

+16-7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/**
2+
* A list of container overrides that specify the name of a container
3+
* and the overrides it should receive.
4+
*/
15
export interface ContainerOverride {
26
/**
37
* Name of the container inside the task definition
@@ -7,33 +11,38 @@ export interface ContainerOverride {
711
/**
812
* Command to run inside the container
913
*
10-
* @default Default command
14+
* @default - Default command from the Docker image or the task definition
1115
*/
1216
readonly command?: string[];
1317

1418
/**
15-
* Variables to set in the container's environment
19+
* The environment variables to send to the container.
20+
*
21+
* You can add new environment variables, which are added to the container at launch,
22+
* or you can override the existing environment variables from the Docker image or the task definition.
23+
*
24+
* @default - The existing environment variables from the Docker image or the task definition
1625
*/
1726
readonly environment?: TaskEnvironmentVariable[];
1827

1928
/**
2029
* The number of cpu units reserved for the container
2130
*
22-
* @Default The default value from the task definition.
31+
* @default - The default value from the task definition.
2332
*/
2433
readonly cpu?: number;
2534

2635
/**
27-
* Hard memory limit on the container
36+
* The hard limit (in MiB) of memory to present to the container
2837
*
29-
* @Default The default value from the task definition.
38+
* @default - The default value from the task definition.
3039
*/
3140
readonly memoryLimit?: number;
3241

3342
/**
34-
* Soft memory limit on the container
43+
* The soft limit (in MiB) of memory to reserve for the container
3544
*
36-
* @Default The default value from the task definition.
45+
* @default - The default value from the task definition.
3746
*/
3847
readonly memoryReservation?: number;
3948
}

packages/@aws-cdk/aws-stepfunctions-tasks/lib/run-ecs-task-base.ts

+4
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ export interface CommonEcsRunTaskProps {
2828
*
2929
* Key is the name of the container to override, value is the
3030
* values you want to override.
31+
*
32+
* @default - No overrides
3133
*/
3234
readonly containerOverrides?: ContainerOverride[];
3335

@@ -47,6 +49,8 @@ export interface CommonEcsRunTaskProps {
4749
export interface EcsRunTaskBaseProps extends CommonEcsRunTaskProps {
4850
/**
4951
* Additional parameters to pass to the base task
52+
*
53+
* @default - No additional parameters passed
5054
*/
5155
readonly parameters?: {[key: string]: any};
5256
}

packages/@aws-cdk/aws-stepfunctions-tasks/lib/run-lambda-task.ts

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import { getResourceArn } from './resource-arn-suffix';
99
export interface RunLambdaTaskProps {
1010
/**
1111
* The JSON that you want to provide to your Lambda function as input.
12+
*
13+
* @default - No payload
1214
*/
1315
readonly payload?: { [key: string]: any };
1416

packages/@aws-cdk/aws-stepfunctions-tasks/lib/sagemaker-task-base-types.ts

+74-10
Original file line numberDiff line numberDiff line change
@@ -7,36 +7,45 @@ import * as s3 from '@aws-cdk/aws-s3';
77
import * as sfn from '@aws-cdk/aws-stepfunctions';
88
import { Construct, Duration } from '@aws-cdk/core';
99

10+
/**
11+
* Task to train a machine learning model using Amazon SageMaker
12+
* @experimental
13+
*/
1014
export interface ISageMakerTask extends sfn.IStepFunctionsTask, iam.IGrantable {}
1115

12-
//
13-
// Create Training Job types
14-
//
15-
1616
/**
17+
* Specify the training algorithm and algorithm-specific metadata
1718
* @experimental
1819
*/
1920
export interface AlgorithmSpecification {
2021

2122
/**
2223
* Name of the algorithm resource to use for the training job.
24+
* This must be an algorithm resource that you created or subscribe to on AWS Marketplace.
25+
* If you specify a value for this parameter, you can't specify a value for TrainingImage.
26+
*
27+
* @default - No algorithm is specified
2328
*/
2429
readonly algorithmName?: string;
2530

2631
/**
2732
* List of metric definition objects. Each object specifies the metric name and regular expressions used to parse algorithm logs.
33+
*
34+
* @default - No metrics
2835
*/
2936
readonly metricDefinitions?: MetricDefinition[];
3037

3138
/**
3239
* Registry path of the Docker image that contains the training algorithm.
40+
*
41+
* @default - No Docker image is specified
3342
*/
3443
readonly trainingImage?: DockerImage;
3544

3645
/**
3746
* Input mode that the algorithm supports.
3847
*
39-
* @default is 'File' mode
48+
* @default 'File' mode
4049
*/
4150
readonly trainingInputMode?: InputMode;
4251
}
@@ -55,31 +64,43 @@ export interface Channel {
5564

5665
/**
5766
* Compression type if training data is compressed
67+
*
68+
* @default - None
5869
*/
5970
readonly compressionType?: CompressionType;
6071

6172
/**
62-
* Content type
73+
* The MIME type of the data.
74+
*
75+
* @default - None
6376
*/
6477
readonly contentType?: string;
6578

6679
/**
67-
* Location of the data channel
80+
* Location of the channel data.
6881
*/
6982
readonly dataSource: DataSource;
7083

7184
/**
7285
* Input mode to use for the data channel in a training job.
86+
*
87+
* @default - None
7388
*/
7489
readonly inputMode?: InputMode;
7590

7691
/**
77-
* Record wrapper type
92+
* Specify RecordIO as the value when input data is in raw format but the training algorithm requires the RecordIO format.
93+
* In this case, Amazon SageMaker wraps each individual S3 object in a RecordIO record.
94+
* If the input data is already in RecordIO format, you don't need to set this attribute.
95+
*
96+
* @default - None
7897
*/
7998
readonly recordWrapperType?: RecordWrapperType;
8099

81100
/**
82101
* Shuffle config option for input data in a channel.
102+
*
103+
* @default - None
83104
*/
84105
readonly shuffleConfig?: ShuffleConfig;
85106
}
@@ -111,21 +132,29 @@ export interface DataSource {
111132
/**
112133
* S3 location of the channel data.
113134
*
135+
* @see https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_S3DataSource.html
136+
*
114137
* @experimental
115138
*/
116139
export interface S3DataSource {
117140
/**
118141
* List of one or more attribute names to use that are found in a specified augmented manifest file.
142+
*
143+
* @default - No attribute names
119144
*/
120145
readonly attributeNames?: string[];
121146

122147
/**
123148
* S3 Data Distribution Type
149+
*
150+
* @default - None
124151
*/
125152
readonly s3DataDistributionType?: S3DataDistributionType;
126153

127154
/**
128155
* S3 Data Type
156+
*
157+
* @default S3_PREFIX
129158
*/
130159
readonly s3DataType?: S3DataType;
131160

@@ -136,11 +165,14 @@ export interface S3DataSource {
136165
}
137166

138167
/**
168+
* Configures the S3 bucket where SageMaker will save the result of model training
139169
* @experimental
140170
*/
141171
export interface OutputDataConfig {
142172
/**
143173
* Optional KMS encryption key that Amazon SageMaker uses to encrypt the model artifacts at rest using Amazon S3 server-side encryption.
174+
*
175+
* @default - Amazon SageMaker uses the default KMS key for Amazon S3 for your role's account
144176
*/
145177
readonly encryptionKey?: kms.IKey;
146178

@@ -151,16 +183,23 @@ export interface OutputDataConfig {
151183
}
152184

153185
/**
186+
* Specifies a limit to how long a model training job can run.
187+
* When the job reaches the time limit, Amazon SageMaker ends the training job.
188+
*
154189
* @experimental
155190
*/
156191
export interface StoppingCondition {
157192
/**
158193
* The maximum length of time, in seconds, that the training or compilation job can run.
194+
*
195+
* @default - 1 hour
159196
*/
160197
readonly maxRuntime?: Duration;
161198
}
162199

163200
/**
201+
* Specifies the resources, ML compute instances, and ML storage volumes to deploy for model training.
202+
*
164203
* @experimental
165204
*/
166205
export interface ResourceConfig {
@@ -181,6 +220,8 @@ export interface ResourceConfig {
181220

182221
/**
183222
* KMS key that Amazon SageMaker uses to encrypt data on the storage volume attached to the ML compute instance(s) that run the training job.
223+
*
224+
* @default - Amazon SageMaker uses the default KMS key for Amazon S3 for your role's account
184225
*/
185226
readonly volumeEncryptionKey?: kms.IKey;
186227

@@ -193,17 +234,20 @@ export interface ResourceConfig {
193234
}
194235

195236
/**
237+
* Specifies the VPC that you want your Amazon SageMaker training job to connect to.
196238
*
197239
* @experimental
198240
*/
199241
export interface VpcConfig {
200242
/**
201-
* VPC id
243+
* VPC
202244
*/
203245
readonly vpc: ec2.IVpc;
204246

205247
/**
206248
* VPC subnets.
249+
*
250+
* @default - Private Subnets are selected
207251
*/
208252
readonly subnets?: ec2.SubnetSelection;
209253
}
@@ -227,9 +271,15 @@ export interface MetricDefinition {
227271
}
228272

229273
/**
274+
* Stores information about the location of an object in Amazon S3
275+
*
230276
* @experimental
231277
*/
232278
export interface S3LocationConfig {
279+
280+
/**
281+
* Uniquely identifies the resource in Amazon S3
282+
*/
233283
readonly uri: string;
234284
}
235285

@@ -458,11 +508,15 @@ export interface TransformInput {
458508

459509
/**
460510
* The compression type of the transform data.
511+
*
512+
* @default NONE
461513
*/
462514
readonly compressionType?: CompressionType;
463515

464516
/**
465517
* Multipurpose internet mail extension (MIME) type of the data.
518+
*
519+
* @default - None
466520
*/
467521
readonly contentType?: string;
468522

@@ -473,6 +527,8 @@ export interface TransformInput {
473527

474528
/**
475529
* Method to use to split the transform job's data files into smaller batches.
530+
*
531+
* @default NONE
476532
*/
477533
readonly splitType?: SplitType;
478534
}
@@ -519,16 +575,22 @@ export interface TransformOutput {
519575

520576
/**
521577
* MIME type used to specify the output data.
578+
*
579+
* @default - None
522580
*/
523581
readonly accept?: string;
524582

525583
/**
526584
* Defines how to assemble the results of the transform job as a single S3 object.
585+
*
586+
* @default - None
527587
*/
528588
readonly assembleWith?: AssembleWith;
529589

530590
/**
531591
* AWS KMS key that Amazon SageMaker uses to encrypt the model artifacts at rest using Amazon S3 server-side encryption.
592+
*
593+
* @default - default KMS key for Amazon S3 for your role's account.
532594
*/
533595
readonly encryptionKey?: kms.Key;
534596

@@ -546,7 +608,7 @@ export interface TransformOutput {
546608
export interface TransformResources {
547609

548610
/**
549-
* Nmber of ML compute instances to use in the transform job
611+
* Number of ML compute instances to use in the transform job
550612
*/
551613
readonly instanceCount: number;
552614

@@ -557,6 +619,8 @@ export interface TransformResources {
557619

558620
/**
559621
* AWS KMS key that Amazon SageMaker uses to encrypt data on the storage volume attached to the ML compute instance(s).
622+
*
623+
* @default - None
560624
*/
561625
readonly volumeKmsKeyId?: kms.Key;
562626
}

0 commit comments

Comments
 (0)