Skip to content

Commit 58ac20d

Browse files
author
awstools
committed
feat(client-imagebuilder): Add PENDING status to Lifecycle Execution resource status. Add StartTime and EndTime to ListLifecycleExecutionResource API response.
1 parent 8e37128 commit 58ac20d

File tree

6 files changed

+71
-11
lines changed

6 files changed

+71
-11
lines changed

clients/client-imagebuilder/src/commands/GetLifecycleExecutionCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export interface GetLifecycleExecutionCommandOutput extends GetLifecycleExecutio
4848
* // hasImpactedResources: true || false,
4949
* // },
5050
* // state: { // LifecycleExecutionState
51-
* // status: "IN_PROGRESS" || "CANCELLED" || "CANCELLING" || "FAILED" || "SUCCESS",
51+
* // status: "IN_PROGRESS" || "CANCELLED" || "CANCELLING" || "FAILED" || "SUCCESS" || "PENDING",
5252
* // reason: "STRING_VALUE",
5353
* // },
5454
* // startTime: new Date("TIMESTAMP"),

clients/client-imagebuilder/src/commands/ListLifecycleExecutionResourcesCommand.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export interface ListLifecycleExecutionResourcesCommandOutput
5151
* // { // ListLifecycleExecutionResourcesResponse
5252
* // lifecycleExecutionId: "STRING_VALUE",
5353
* // lifecycleExecutionState: { // LifecycleExecutionState
54-
* // status: "IN_PROGRESS" || "CANCELLED" || "CANCELLING" || "FAILED" || "SUCCESS",
54+
* // status: "IN_PROGRESS" || "CANCELLED" || "CANCELLING" || "FAILED" || "SUCCESS" || "PENDING",
5555
* // reason: "STRING_VALUE",
5656
* // },
5757
* // resources: [ // LifecycleExecutionResourceList
@@ -79,6 +79,8 @@ export interface ListLifecycleExecutionResourcesCommandOutput
7979
* // imageUris: [ // StringList
8080
* // "STRING_VALUE",
8181
* // ],
82+
* // startTime: new Date("TIMESTAMP"),
83+
* // endTime: new Date("TIMESTAMP"),
8284
* // },
8385
* // ],
8486
* // nextToken: "STRING_VALUE",

clients/client-imagebuilder/src/commands/ListLifecycleExecutionsCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export interface ListLifecycleExecutionsCommandOutput extends ListLifecycleExecu
5151
* // hasImpactedResources: true || false,
5252
* // },
5353
* // state: { // LifecycleExecutionState
54-
* // status: "IN_PROGRESS" || "CANCELLED" || "CANCELLING" || "FAILED" || "SUCCESS",
54+
* // status: "IN_PROGRESS" || "CANCELLED" || "CANCELLING" || "FAILED" || "SUCCESS" || "PENDING",
5555
* // reason: "STRING_VALUE",
5656
* // },
5757
* // startTime: new Date("TIMESTAMP"),

clients/client-imagebuilder/src/models/models_0.ts

+17-3
Original file line numberDiff line numberDiff line change
@@ -2920,7 +2920,8 @@ export interface LifecyclePolicyDetailExclusionRulesAmis {
29202920
export interface LifecyclePolicyDetailExclusionRules {
29212921
/**
29222922
* @public
2923-
* <p>Contains a list of tags that Image Builder uses to skip lifecycle actions for resources that have them.</p>
2923+
* <p>Contains a list of tags that Image Builder uses to skip lifecycle actions for Image Builder image
2924+
* resources that have them.</p>
29242925
*/
29252926
tagMap?: Record<string, string>;
29262927

@@ -3043,8 +3044,8 @@ export interface LifecyclePolicyResourceSelection {
30433044

30443045
/**
30453046
* @public
3046-
* <p>A list of tags that are used as selection criteria for the resources
3047-
* that the lifecycle policy applies to.</p>
3047+
* <p>A list of tags that are used as selection criteria for the Image Builder image
3048+
* resources that the lifecycle policy applies to.</p>
30483049
*/
30493050
tagMap?: Record<string, string>;
30503051
}
@@ -4774,6 +4775,7 @@ export const LifecycleExecutionStatus = {
47744775
CANCELLING: "CANCELLING",
47754776
FAILED: "FAILED",
47764777
IN_PROGRESS: "IN_PROGRESS",
4778+
PENDING: "PENDING",
47774779
SUCCESS: "SUCCESS",
47784780
} as const;
47794781

@@ -7540,6 +7542,18 @@ export interface LifecycleExecutionResource {
75407542
* container images distributed to ECR repositories.</p>
75417543
*/
75427544
imageUris?: string[];
7545+
7546+
/**
7547+
* @public
7548+
* <p>The starting timestamp from the lifecycle action that was applied to the resource.</p>
7549+
*/
7550+
startTime?: Date;
7551+
7552+
/**
7553+
* @public
7554+
* <p>The ending timestamp from the lifecycle action that was applied to the resource.</p>
7555+
*/
7556+
endTime?: Date;
75437557
}
75447558

75457559
/**

clients/client-imagebuilder/src/protocols/Aws_restJson1.ts

+29-3
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,7 @@ import {
270270
LaunchPermissionConfiguration,
271271
LaunchTemplateConfiguration,
272272
LifecycleExecution,
273+
LifecycleExecutionResource,
273274
LifecyclePolicy,
274275
LifecyclePolicyDetail,
275276
LifecyclePolicyDetailAction,
@@ -3202,7 +3203,7 @@ export const de_ListLifecycleExecutionResourcesCommand = async (
32023203
lifecycleExecutionId: __expectString,
32033204
lifecycleExecutionState: _json,
32043205
nextToken: __expectString,
3205-
resources: _json,
3206+
resources: (_) => de_LifecycleExecutionResourceList(_, context),
32063207
});
32073208
Object.assign(contents, doc);
32083209
return contents;
@@ -4504,11 +4505,36 @@ const de_LifecycleExecution = (output: any, context: __SerdeContext): LifecycleE
45044505
}) as any;
45054506
};
45064507

4507-
// de_LifecycleExecutionResource omitted.
4508+
/**
4509+
* deserializeAws_restJson1LifecycleExecutionResource
4510+
*/
4511+
const de_LifecycleExecutionResource = (output: any, context: __SerdeContext): LifecycleExecutionResource => {
4512+
return take(output, {
4513+
accountId: __expectString,
4514+
action: _json,
4515+
endTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
4516+
imageUris: _json,
4517+
region: __expectString,
4518+
resourceId: __expectString,
4519+
snapshots: _json,
4520+
startTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
4521+
state: _json,
4522+
}) as any;
4523+
};
45084524

45094525
// de_LifecycleExecutionResourceAction omitted.
45104526

4511-
// de_LifecycleExecutionResourceList omitted.
4527+
/**
4528+
* deserializeAws_restJson1LifecycleExecutionResourceList
4529+
*/
4530+
const de_LifecycleExecutionResourceList = (output: any, context: __SerdeContext): LifecycleExecutionResource[] => {
4531+
const retVal = (output || [])
4532+
.filter((e: any) => e != null)
4533+
.map((entry: any) => {
4534+
return de_LifecycleExecutionResource(entry, context);
4535+
});
4536+
return retVal;
4537+
};
45124538

45134539
// de_LifecycleExecutionResourcesImpactedSummary omitted.
45144540

codegen/sdk-codegen/aws-models/imagebuilder.json

+20-2
Original file line numberDiff line numberDiff line change
@@ -7304,6 +7304,18 @@
73047304
"traits": {
73057305
"smithy.api#documentation": "<p>For an impacted container image, this identifies a list of URIs for associated \n\t\t\tcontainer images distributed to ECR repositories.</p>"
73067306
}
7307+
},
7308+
"startTime": {
7309+
"target": "com.amazonaws.imagebuilder#DateTimeTimestamp",
7310+
"traits": {
7311+
"smithy.api#documentation": "<p>The starting timestamp from the lifecycle action that was applied to the resource.</p>"
7312+
}
7313+
},
7314+
"endTime": {
7315+
"target": "com.amazonaws.imagebuilder#DateTimeTimestamp",
7316+
"traits": {
7317+
"smithy.api#documentation": "<p>The ending timestamp from the lifecycle action that was applied to the resource.</p>"
7318+
}
73077319
}
73087320
},
73097321
"traits": {
@@ -7507,6 +7519,12 @@
75077519
"traits": {
75087520
"smithy.api#enumValue": "SUCCESS"
75097521
}
7522+
},
7523+
"PENDING": {
7524+
"target": "smithy.api#Unit",
7525+
"traits": {
7526+
"smithy.api#enumValue": "PENDING"
7527+
}
75107528
}
75117529
}
75127530
},
@@ -7713,7 +7731,7 @@
77137731
"tagMap": {
77147732
"target": "com.amazonaws.imagebuilder#TagMap",
77157733
"traits": {
7716-
"smithy.api#documentation": "<p>Contains a list of tags that Image Builder uses to skip lifecycle actions for resources that have them.</p>"
7734+
"smithy.api#documentation": "<p>Contains a list of tags that Image Builder uses to skip lifecycle actions for Image Builder image \n\t\t\tresources that have them.</p>"
77177735
}
77187736
},
77197737
"amis": {
@@ -7890,7 +7908,7 @@
78907908
"tagMap": {
78917909
"target": "com.amazonaws.imagebuilder#TagMap",
78927910
"traits": {
7893-
"smithy.api#documentation": "<p>A list of tags that are used as selection criteria for the resources \n\t\t\tthat the lifecycle policy applies to.</p>"
7911+
"smithy.api#documentation": "<p>A list of tags that are used as selection criteria for the Image Builder image \n\t\t\tresources that the lifecycle policy applies to.</p>"
78947912
}
78957913
}
78967914
},

0 commit comments

Comments
 (0)