Skip to content

Commit 46d4e8f

Browse files
docs(aws): add descriptions (#686)
* docs(aws): add descriptions * Apply suggestions from code review * Apply suggestions from code review --------- Co-authored-by: Will Russell <wrussell@kestra.io>
1 parent 75d2216 commit 46d4e8f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+765
-371
lines changed

src/main/java/io/kestra/plugin/aws/athena/Query.java

Lines changed: 34 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,9 @@
4848
@Getter
4949
@NoArgsConstructor
5050
@Schema(
51-
title = "Query an Amazon Athena table.",
51+
title = "Run an Athena query and fetch results",
5252
description = """
53-
The query will wait for completion, except if fetchMode is set to `NONE`, and will output converted rows.
54-
Row conversion is based on the types listed in [Athena Data Types](https://docs.aws.amazon.com/athena/latest/ug/data-types.html).
55-
Complex data types like array, map, and struct will be converted to a string."""
53+
Executes an Athena SQL query and waits for completion unless fetchType is NONE. Converts primitive columns to native types and stores results according to fetchType; default STORE writes an ION file to internal storage. skipHeader defaults to true to drop the header row; complex Athena types (array/map/struct) are returned as strings."""
5654
)
5755
@Plugin(
5856
examples = {
@@ -129,36 +127,45 @@
129127
}
130128
)
131129
public class Query extends AbstractConnection implements RunnableTask<Query.QueryOutput> {
132-
@Schema(title = "Athena catalog.")
130+
@Schema(
131+
title = "Athena catalog",
132+
description = "Optional catalog name; use default if omitted."
133+
)
133134
private Property<String> catalog;
134135

135-
@Schema(title = "Athena database.")
136+
@Schema(
137+
title = "Athena database",
138+
description = "Target database for the query."
139+
)
136140
@NotNull
137141
private Property<String> database;
138142

139143
@Schema(
140-
title = "Athena output location.",
141-
description = "The query results will be stored in this output location. Must be an existing S3 bucket."
144+
title = "Athena output location",
145+
description = "Existing S3 URI where Athena writes result files (required by service)."
142146
)
143147
@NotNull
144148
private Property<String> outputLocation;
145149

146-
@Schema(title = "Athena SQL query.")
150+
@Schema(
151+
title = "Athena SQL query",
152+
description = "SQL statement executed by Athena."
153+
)
147154
@NotNull
148155
private Property<String> query;
149156

150157
@Schema(
151-
title = "The way you want to store the data.",
152-
description = "FETCH_ONE outputs the first row, "
153-
+ "FETCH outputs all the rows, "
154-
+ "STORE stores all rows in a file, "
155-
+ "NONE does nothing — in this case, the task submits the query without waiting for its completion."
158+
title = "Fetch strategy",
159+
description = "Default STORE writes all rows to internal storage; FETCH loads all rows into memory; FETCH_ONE returns the first row; NONE submits without waiting."
156160
)
157161
@NotNull
158162
@Builder.Default
159163
private Property<FetchType> fetchType = Property.ofValue(FetchType.STORE);
160164

161-
@Schema(title = "Whether to skip the first row which is usually the header.")
165+
@Schema(
166+
title = "Skip header row",
167+
description = "If true (default), drop the first returned row, which is usually the column header."
168+
)
162169
@NotNull
163170
@Builder.Default
164171
private Property<Boolean> skipHeader = Property.ofValue(true);
@@ -356,29 +363,33 @@ private Object mapCell(ColumnInfo columnInfo, Datum datum) {
356363
@Getter
357364
public static class QueryOutput implements Output {
358365

359-
@Schema(title = "The query execution identifier.")
366+
@Schema(
367+
title = "Query execution ID",
368+
description = "Identifier returned by StartQueryExecution."
369+
)
360370
private String queryExecutionId;
361371

362372
@Schema(
363-
title = "List containing the fetched data.",
364-
description = "Only populated if `fetchType=FETCH`."
373+
title = "Rows",
374+
description = "All rows when fetchType is FETCH."
365375
)
366376
private List<Object> rows;
367377

368378
@Schema(
369-
title = "Map containing the first row of fetched data.",
370-
description = "Only populated if `fetchType=FETCH_ONE`."
379+
title = "First row",
380+
description = "Single row when fetchType is FETCH_ONE."
371381
)
372382
private Map<String, Object> row;
373383

374384
@Schema(
375-
title = "The URI of stored data.",
376-
description = "Only populated if `fetchType=STORE`."
385+
title = "Stored data URI",
386+
description = "Internal storage URI when fetchType is STORE."
377387
)
378388
private URI uri;
379389

380390
@Schema(
381-
title = "The size of the fetched rows."
391+
title = "Fetched row count",
392+
description = "Number of rows returned or stored."
382393
)
383394
private Long size;
384395
}

src/main/java/io/kestra/plugin/aws/auth/EksToken.java

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
@Getter
3333
@NoArgsConstructor
3434
@Schema(
35-
title = "Fetch an OAuth access token for an AWS EKS cluster."
35+
title = "Generate a presigned EKS authentication token",
36+
description = "Builds a short-lived `k8s-aws-v1` token for a given EKS cluster by presigning STS GetCallerIdentity. Requires region and cluster name; expirationDuration defaults to 600s."
3637
)
3738
@Plugin(
3839
examples = {
@@ -55,11 +56,17 @@
5556
)
5657
public class EksToken extends AbstractConnection implements RunnableTask<EksToken.Output> {
5758

58-
@Schema(title = "EKS cluster name.")
59+
@Schema(
60+
title = "EKS cluster name",
61+
description = "Cluster identifier passed in x-k8s-aws-id when presigning."
62+
)
5963
@NotNull
6064
private Property<String> clusterName;
6165

62-
@Schema(title = "Token expiration duration in seconds")
66+
@Schema(
67+
title = "Token TTL (seconds)",
68+
description = "Lifetime of the presigned URL; default 600 seconds."
69+
)
6370
@NotNull
6471
@Builder.Default
6572
private Property<Long> expirationDuration = Property.ofValue(600L);
@@ -123,7 +130,10 @@ public static URI getStsRegionalEndpointUri(RunContext runContext, Region awsReg
123130
@Getter
124131
public static class Output implements io.kestra.core.models.tasks.Output {
125132
@NotNull
126-
@Schema(title = "An OAuth access token for the current user.")
133+
@Schema(
134+
title = "EKS auth token",
135+
description = "Bearer token formatted as k8s-aws-v1.<base64url>; encrypted in outputs when supported."
136+
)
127137
private final Token token;
128138
}
129139

@@ -136,6 +146,10 @@ public static class Token {
136146
)
137147
EncryptedString tokenValue;
138148

149+
@Schema(
150+
title = "Token expiration time",
151+
description = "Exact UTC expiration timestamp derived from the provided TTL."
152+
)
139153
Instant expirationTime;
140154
}
141-
}
155+
}

src/main/java/io/kestra/plugin/aws/cli/AwsCLI.java

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@
3434
@Getter
3535
@NoArgsConstructor
3636
@Schema(
37-
title = "Run AWS CLI commands."
37+
title = "Execute AWS CLI commands in a task",
38+
description = "Runs one or more AWS CLI statements inside the configured task runner (default Docker with amazon/aws-cli). Exports rendered AWS credentials/region to the process env, honors stsRole* fields, and sets AWS_DEFAULT_OUTPUT to outputFormat (default json). Use outputFiles to persist generated files."
3839
)
3940
@Plugin(
4041
examples = {
@@ -113,13 +114,15 @@ public class AwsCLI extends AbstractConnection implements RunnableTask<ScriptOut
113114
private static final String DEFAULT_IMAGE = "amazon/aws-cli";
114115

115116
@Schema(
116-
title = "The AWS commands to run."
117+
title = "AWS CLI commands",
118+
description = "Shell fragments executed in order with /bin/sh -c; include aws ... and any needed piped tooling."
117119
)
118120
@NotNull
119121
protected List<String> commands;
120122

121123
@Schema(
122-
title = "Additional environment variables for the current process."
124+
title = "Extra environment variables",
125+
description = "Merged into the process environment alongside AWS credentials and AWS_DEFAULT_OUTPUT."
123126
)
124127
@PluginProperty(
125128
additionalProperties = String.class,
@@ -128,28 +131,33 @@ public class AwsCLI extends AbstractConnection implements RunnableTask<ScriptOut
128131
protected Map<String, String> env;
129132

130133
@Schema(
131-
title = "Deprecated, use 'taskRunner' instead"
134+
title = "Deprecated Docker options",
135+
description = "Use taskRunner instead; retained for backward compatibility."
132136
)
133137
@PluginProperty
134138
@Deprecated
135139
private DockerOptions docker;
136140

137141
@Schema(
138-
title = "The task runner to use.",
139-
description = "Task runners are provided by plugins, each have their own properties."
142+
title = "Task runner",
143+
description = "Runner implementation for executing the CLI; defaults to Docker runner."
140144
)
141145
@PluginProperty
142146
@Builder.Default
143147
@Valid
144148
private TaskRunner<?> taskRunner = Docker.instance();
145149

146-
@Schema(title = "The task runner container image, only used if the task runner is container-based.")
150+
@Schema(
151+
title = "Container image",
152+
description = "Image used when the runner is container-based; default amazon/aws-cli."
153+
)
147154
@PluginProperty(dynamic = true)
148155
@Builder.Default
149156
private String containerImage = DEFAULT_IMAGE;
150157

151158
@Schema(
152-
title = "Expected output format for AWS commands (can be overridden with --format parameter)."
159+
title = "AWS CLI output format",
160+
description = "Sets AWS_DEFAULT_OUTPUT; default json. CLI flags still take precedence."
153161
)
154162
@PluginProperty
155163
@Builder.Default

src/main/java/io/kestra/plugin/aws/cloudformation/AbstractCloudFormation.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,21 @@
2323
public abstract class AbstractCloudFormation extends AbstractConnection {
2424

2525
@NotNull
26-
@Schema(title = "The name of the stack.")
26+
@Schema(
27+
title = "Stack name",
28+
description = "CloudFormation stack identifier used by create, update, and delete operations."
29+
)
2730
protected Property<String> stackName;
2831

2932
@Builder.Default
30-
@Schema(title = "Whether to wait for the stack operation to complete.")
33+
@Schema(
34+
title = "Wait for completion",
35+
description = "When true (default), block until the stack reaches a terminal state for the requested operation."
36+
)
3137
protected Property<Boolean> waitForCompletion = Property.of(true);
3238

3339
protected CloudFormationClient cfClient(final RunContext runContext) throws IllegalVariableEvaluationException {
3440
final AwsClientConfig clientConfig = awsClientConfig(runContext);
3541
return ConnectionUtils.configureSyncClient(clientConfig, CloudFormationClient.builder()).build();
3642
}
37-
}
43+
}

src/main/java/io/kestra/plugin/aws/cloudformation/Create.java

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
@Getter
2626
@NoArgsConstructor
2727
@Schema(
28-
title = "Create or update a CloudFormation stack."
28+
title = "Create or update a CloudFormation stack",
29+
description = "Creates the stack if it does not exist, otherwise issues an update. Can wait for terminal status when waitForCompletion is true (default). Uses templateBody and optional parameters; only succeeds when template changes are allowed."
2930
)
3031
@Plugin(
3132
examples = {
@@ -62,10 +63,16 @@
6263
)
6364
public class Create extends AbstractCloudFormation implements RunnableTask<Create.Output> {
6465

65-
@Schema(title = "The structure that contains the stack template.")
66+
@Schema(
67+
title = "Template body",
68+
description = "YAML or JSON template content."
69+
)
6670
private Property<String> templateBody;
6771

68-
@Schema(title = "A list of Parameter structures for the stack.")
72+
@Schema(
73+
title = "Template parameters",
74+
description = "Key-value map rendered into CloudFormation parameters."
75+
)
6976
private Property<Map<String, String>> parameters;
7077

7178
@Override
@@ -153,13 +160,21 @@ private List<Parameter> mapToParameters(RunContext runContext, Map<String, Strin
153160
@Getter
154161
public static class Output implements io.kestra.core.models.tasks.Output {
155162

156-
@Schema(title = "The unique stack ID.")
163+
@Schema(
164+
title = "Stack ID",
165+
description = "Unique identifier returned by CloudFormation."
166+
)
157167
private final String stackId;
158168

159-
@Schema(title = "The name of the stack.")
169+
@Schema(
170+
title = "Stack name"
171+
)
160172
private final String stackName;
161173

162-
@Schema(title = "A map of the stack's outputs.")
174+
@Schema(
175+
title = "Stack outputs",
176+
description = "Outputs returned by the deployed stack."
177+
)
163178
private final Map<String, String> stackOutputs;
164179
}
165-
}
180+
}

src/main/java/io/kestra/plugin/aws/cloudformation/Delete.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@
1717
@EqualsAndHashCode
1818
@Getter
1919
@NoArgsConstructor
20-
@Schema(title = "Delete a CloudFormation stack.")
20+
@Schema(
21+
title = "Delete a CloudFormation stack",
22+
description = "Triggers stack deletion and optionally waits for DELETE_COMPLETE when waitForCompletion is true (default). Fails fast if the stack cannot be deleted."
23+
)
2124
@Plugin(
2225
examples = {
2326
@Example(
@@ -70,4 +73,4 @@ public VoidOutput run(RunContext runContext) throws Exception {
7073

7174
return null;
7275
}
73-
}
76+
}

src/main/java/io/kestra/plugin/aws/cloudwatch/AbstractCloudWatch.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import io.kestra.core.runners.RunContext;
55
import io.kestra.plugin.aws.AbstractConnection;
66
import io.kestra.plugin.aws.ConnectionUtils;
7+
import io.swagger.v3.oas.annotations.media.Schema;
78
import lombok.EqualsAndHashCode;
89
import lombok.Getter;
910
import lombok.NoArgsConstructor;
@@ -16,6 +17,10 @@
1617
@EqualsAndHashCode
1718
@Getter
1819
@NoArgsConstructor
20+
@Schema(
21+
title = "Shared CloudWatch connection",
22+
description = "Provides CloudWatchClient configuration via standard AWS connection settings."
23+
)
1924
abstract class AbstractCloudWatch extends AbstractConnection {
2025
protected CloudWatchClient client(final RunContext runContext) throws IllegalVariableEvaluationException {
2126
final AwsClientConfig clientConfig = awsClientConfig(runContext);

src/main/java/io/kestra/plugin/aws/cloudwatch/CloudWatchLogs.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import io.kestra.core.runners.RunContext;
55
import io.kestra.plugin.aws.AbstractConnection;
66
import io.kestra.plugin.aws.ConnectionUtils;
7+
import io.swagger.v3.oas.annotations.media.Schema;
78
import lombok.EqualsAndHashCode;
89
import lombok.Getter;
910
import lombok.NoArgsConstructor;
@@ -16,6 +17,10 @@
1617
@EqualsAndHashCode
1718
@Getter
1819
@NoArgsConstructor
20+
@Schema(
21+
title = "Create a CloudWatch Logs client",
22+
description = "Helper task for obtaining a configured CloudWatchLogsClient using standard AWS connection properties."
23+
)
1924
public class CloudWatchLogs extends AbstractConnection {
2025

2126
/**

0 commit comments

Comments
 (0)