Skip to content

Commit d20379b

Browse files
author
awstools
committed
feat(client-imagebuilder): Add integration with SSM Parameter Store to Image Builder.
1 parent 3c9a894 commit d20379b

File tree

10 files changed

+202
-26
lines changed

10 files changed

+202
-26
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,13 @@ export interface CreateDistributionConfigurationCommandOutput
113113
* accountId: "STRING_VALUE",
114114
* },
115115
* ],
116+
* ssmParameterConfigurations: [ // SsmParameterConfigurationList
117+
* { // SsmParameterConfiguration
118+
* amiAccountId: "STRING_VALUE",
119+
* parameterName: "STRING_VALUE", // required
120+
* dataType: "text" || "aws:ec2:image",
121+
* },
122+
* ],
116123
* },
117124
* ],
118125
* tags: {

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,13 @@ export interface GetDistributionConfigurationCommandOutput
120120
* // accountId: "STRING_VALUE",
121121
* // },
122122
* // ],
123+
* // ssmParameterConfigurations: [ // SsmParameterConfigurationList
124+
* // { // SsmParameterConfiguration
125+
* // amiAccountId: "STRING_VALUE",
126+
* // parameterName: "STRING_VALUE", // required
127+
* // dataType: "text" || "aws:ec2:image",
128+
* // },
129+
* // ],
123130
* // },
124131
* // ],
125132
* // timeoutMinutes: Number("int"), // required

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,13 @@ export interface GetImageCommandOutput extends GetImageResponse, __MetadataBeare
275275
* // accountId: "STRING_VALUE",
276276
* // },
277277
* // ],
278+
* // ssmParameterConfigurations: [ // SsmParameterConfigurationList
279+
* // { // SsmParameterConfiguration
280+
* // amiAccountId: "STRING_VALUE",
281+
* // parameterName: "STRING_VALUE", // required
282+
* // dataType: "text" || "aws:ec2:image",
283+
* // },
284+
* // ],
278285
* // },
279286
* // ],
280287
* // timeoutMinutes: Number("int"), // required

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,13 @@ export interface UpdateDistributionConfigurationCommandOutput
113113
* accountId: "STRING_VALUE",
114114
* },
115115
* ],
116+
* ssmParameterConfigurations: [ // SsmParameterConfigurationList
117+
* { // SsmParameterConfiguration
118+
* amiAccountId: "STRING_VALUE",
119+
* parameterName: "STRING_VALUE", // required
120+
* dataType: "text" || "aws:ec2:image",
121+
* },
122+
* ],
116123
* },
117124
* ],
118125
* clientToken: "STRING_VALUE", // required

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
66

77
import { commonParams } from "../endpoint/EndpointParameters";
88
import { ImagebuilderClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ImagebuilderClient";
9-
import { UpdateLifecyclePolicyRequest, UpdateLifecyclePolicyResponse } from "../models/models_0";
9+
import { UpdateLifecyclePolicyRequest } from "../models/models_0";
10+
import { UpdateLifecyclePolicyResponse } from "../models/models_1";
1011
import { de_UpdateLifecyclePolicyCommand, se_UpdateLifecyclePolicyCommand } from "../protocols/Aws_restJson1";
1112

1213
/**
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
// smithy-typescript generated code
22
export * from "./models_0";
3+
export * from "./models_1";

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

Lines changed: 79 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1243,8 +1243,10 @@ export interface InstanceBlockDeviceMapping {
12431243
*/
12441244
export interface InstanceConfiguration {
12451245
/**
1246-
* <p>The AMI ID to use as the base image for a container build and test instance. If not
1247-
* specified, Image Builder will use the appropriate ECS-optimized AMI as a base image.</p>
1246+
* <p>The base image for a container build and test instance. This can contain an AMI ID
1247+
* or it can specify an Amazon Web Services Systems Manager (SSM) Parameter Store Parameter, prefixed by <code>ssm:</code>,
1248+
* followed by the parameter name or ARN.</p>
1249+
* <p>If not specified, Image Builder uses the appropriate ECS-optimized AMI as a base image.</p>
12481250
* @public
12491251
*/
12501252
image?: string | undefined;
@@ -1375,7 +1377,9 @@ export interface ContainerRecipe {
13751377
encrypted?: boolean | undefined;
13761378

13771379
/**
1378-
* <p>The base image for the container recipe.</p>
1380+
* <p>The base image for customizations specified in the container recipe. This can
1381+
* contain an Image Builder image resource ARN or a container image URI, for example
1382+
* <code>amazonlinux:latest</code>.</p>
13791383
* @public
13801384
*/
13811385
parentImage?: string | undefined;
@@ -1981,6 +1985,50 @@ export interface S3ExportConfiguration {
19811985
s3Prefix?: string | undefined;
19821986
}
19831987

1988+
/**
1989+
* @public
1990+
* @enum
1991+
*/
1992+
export const SsmParameterDataType = {
1993+
AWS_EC2_IMAGE: "aws:ec2:image",
1994+
TEXT: "text",
1995+
} as const;
1996+
1997+
/**
1998+
* @public
1999+
*/
2000+
export type SsmParameterDataType = (typeof SsmParameterDataType)[keyof typeof SsmParameterDataType];
2001+
2002+
/**
2003+
* <p>Configuration for a single Parameter in the Amazon Web Services Systems Manager (SSM) Parameter Store in
2004+
* a given Region.</p>
2005+
* @public
2006+
*/
2007+
export interface SsmParameterConfiguration {
2008+
/**
2009+
* <p>Specify the account that will own the Parameter in a given Region. During distribution,
2010+
* this account must be specified in distribution settings as a target account for the
2011+
* Region.</p>
2012+
* @public
2013+
*/
2014+
amiAccountId?: string | undefined;
2015+
2016+
/**
2017+
* <p>This is the name of the Parameter in the target Region or account. The image
2018+
* distribution creates the Parameter if it doesn't already exist. Otherwise, it updates
2019+
* the parameter.</p>
2020+
* @public
2021+
*/
2022+
parameterName: string | undefined;
2023+
2024+
/**
2025+
* <p>The data type specifies what type of value the Parameter contains. We recommend that
2026+
* you use data type <code>aws:ec2:image</code>.</p>
2027+
* @public
2028+
*/
2029+
dataType?: SsmParameterDataType | undefined;
2030+
}
2031+
19842032
/**
19852033
* <p>Defines the settings for a specific Region.</p>
19862034
* @public
@@ -2020,8 +2068,8 @@ export interface Distribution {
20202068
launchTemplateConfigurations?: LaunchTemplateConfiguration[] | undefined;
20212069

20222070
/**
2023-
* <p>Configure export settings to deliver disk images created from your image build, using
2024-
* a file format that is compatible with your VMs in that Region.</p>
2071+
* <p>Configure export settings to deliver disk images created from your image build,
2072+
* using a file format that is compatible with your VMs in that Region.</p>
20252073
* @public
20262074
*/
20272075
s3ExportConfiguration?: S3ExportConfiguration | undefined;
@@ -2031,6 +2079,13 @@ export interface Distribution {
20312079
* @public
20322080
*/
20332081
fastLaunchConfigurations?: FastLaunchConfiguration[] | undefined;
2082+
2083+
/**
2084+
* <p>Contains settings to update Amazon Web Services Systems Manager (SSM) Parameter Store Parameters with
2085+
* output AMI IDs from the build by target Region.</p>
2086+
* @public
2087+
*/
2088+
ssmParameterConfigurations?: SsmParameterConfiguration[] | undefined;
20342089
}
20352090

20362091
/**
@@ -3799,8 +3854,8 @@ export interface DistributionConfiguration {
37993854
description?: string | undefined;
38003855

38013856
/**
3802-
* <p>The distribution objects that apply Region-specific settings for the deployment of the
3803-
* image to targeted Regions.</p>
3857+
* <p>The distribution objects that apply Region-specific settings for the deployment of
3858+
* the image to targeted Regions.</p>
38043859
* @public
38053860
*/
38063861
distributions?: Distribution[] | undefined;
@@ -4143,7 +4198,23 @@ export interface ImageRecipe {
41434198
components?: ComponentConfiguration[] | undefined;
41444199

41454200
/**
4146-
* <p>The base image of the image recipe.</p>
4201+
* <p>The base image for customizations specified in the image recipe. You can specify the
4202+
* parent image using one of the following options:</p>
4203+
* <ul>
4204+
* <li>
4205+
* <p>AMI ID</p>
4206+
* </li>
4207+
* <li>
4208+
* <p>Image Builder image Amazon Resource Name (ARN)</p>
4209+
* </li>
4210+
* <li>
4211+
* <p>Amazon Web Services Systems Manager (SSM) Parameter Store Parameter, prefixed by <code>ssm:</code>,
4212+
* followed by the parameter name or ARN.</p>
4213+
* </li>
4214+
* <li>
4215+
* <p>Amazon Web Services Marketplace product ID</p>
4216+
* </li>
4217+
* </ul>
41474218
* @public
41484219
*/
41494220
parentImage?: string | undefined;
@@ -9541,14 +9612,3 @@ export interface UpdateLifecyclePolicyRequest {
95419612
*/
95429613
clientToken?: string | undefined;
95439614
}
9544-
9545-
/**
9546-
* @public
9547-
*/
9548-
export interface UpdateLifecyclePolicyResponse {
9549-
/**
9550-
* <p>The ARN of the image lifecycle policy resource that was updated.</p>
9551-
* @public
9552-
*/
9553-
lifecyclePolicyArn?: string | undefined;
9554-
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// smithy-typescript generated code
2+
/**
3+
* @public
4+
*/
5+
export interface UpdateLifecyclePolicyResponse {
6+
/**
7+
* <p>The ARN of the image lifecycle policy resource that was updated.</p>
8+
* @public
9+
*/
10+
lifecyclePolicyArn?: string | undefined;
11+
}

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,7 @@ import {
304304
ServiceException,
305305
ServiceQuotaExceededException,
306306
ServiceUnavailableException,
307+
SsmParameterConfiguration,
307308
SystemsManagerAgent,
308309
TargetContainerRepository,
309310
WorkflowConfiguration,
@@ -4297,6 +4298,10 @@ const de_ServiceUnavailableExceptionRes = async (
42974298

42984299
// se_SecurityGroupIds omitted.
42994300

4301+
// se_SsmParameterConfiguration omitted.
4302+
4303+
// se_SsmParameterConfigurationList omitted.
4304+
43004305
// se_StringList omitted.
43014306

43024307
// se_SystemsManagerAgent omitted.
@@ -4792,6 +4797,10 @@ const de_PackageVulnerabilityDetails = (output: any, context: __SerdeContext): P
47924797

47934798
// de_SeverityCounts omitted.
47944799

4800+
// de_SsmParameterConfiguration omitted.
4801+
4802+
// de_SsmParameterConfigurationList omitted.
4803+
47954804
// de_StringList omitted.
47964805

47974806
// de_SystemsManagerAgent omitted.

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

Lines changed: 72 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,7 +1108,7 @@
11081108
"parentImage": {
11091109
"target": "com.amazonaws.imagebuilder#NonEmptyString",
11101110
"traits": {
1111-
"smithy.api#documentation": "<p>The base image for the container recipe.</p>"
1111+
"smithy.api#documentation": "<p>The base image for customizations specified in the container recipe. This can \n\t\t\tcontain an Image Builder image resource ARN or a container image URI, for example \n\t\t\t<code>amazonlinux:latest</code>.</p>"
11121112
}
11131113
},
11141114
"dateCreated": {
@@ -3481,14 +3481,20 @@
34813481
"s3ExportConfiguration": {
34823482
"target": "com.amazonaws.imagebuilder#S3ExportConfiguration",
34833483
"traits": {
3484-
"smithy.api#documentation": "<p>Configure export settings to deliver disk images created from your image build, using\n\t\t\ta file format that is compatible with your VMs in that Region.</p>"
3484+
"smithy.api#documentation": "<p>Configure export settings to deliver disk images created from your image build, \n\t\t\tusing a file format that is compatible with your VMs in that Region.</p>"
34853485
}
34863486
},
34873487
"fastLaunchConfigurations": {
34883488
"target": "com.amazonaws.imagebuilder#FastLaunchConfigurationList",
34893489
"traits": {
34903490
"smithy.api#documentation": "<p>The Windows faster-launching configurations to use for AMI distribution.</p>"
34913491
}
3492+
},
3493+
"ssmParameterConfigurations": {
3494+
"target": "com.amazonaws.imagebuilder#SsmParameterConfigurationList",
3495+
"traits": {
3496+
"smithy.api#documentation": "<p>Contains settings to update Amazon Web Services Systems Manager (SSM) Parameter Store Parameters with \n\t\t\toutput AMI IDs from the build by target Region.</p>"
3497+
}
34923498
}
34933499
},
34943500
"traits": {
@@ -3519,7 +3525,7 @@
35193525
"distributions": {
35203526
"target": "com.amazonaws.imagebuilder#DistributionList",
35213527
"traits": {
3522-
"smithy.api#documentation": "<p>The distribution objects that apply Region-specific settings for the deployment of the\n\t\t\timage to targeted Regions.</p>"
3528+
"smithy.api#documentation": "<p>The distribution objects that apply Region-specific settings for the deployment of \n\t\t\tthe image to targeted Regions.</p>"
35233529
}
35243530
},
35253531
"timeoutMinutes": {
@@ -5837,7 +5843,7 @@
58375843
"parentImage": {
58385844
"target": "com.amazonaws.imagebuilder#NonEmptyString",
58395845
"traits": {
5840-
"smithy.api#documentation": "<p>The base image of the image recipe.</p>"
5846+
"smithy.api#documentation": "<p>The base image for customizations specified in the image recipe. You can specify the \n\t\t\tparent image using one of the following options:</p>\n <ul>\n <li>\n <p>AMI ID</p>\n </li>\n <li>\n <p>Image Builder image Amazon Resource Name (ARN)</p>\n </li>\n <li>\n <p>Amazon Web Services Systems Manager (SSM) Parameter Store Parameter, prefixed by <code>ssm:</code>, \n\t\t\t\t\tfollowed by the parameter name or ARN.</p>\n </li>\n <li>\n <p>Amazon Web Services Marketplace product ID</p>\n </li>\n </ul>"
58415847
}
58425848
},
58435849
"blockDeviceMappings": {
@@ -7252,7 +7258,7 @@
72527258
"image": {
72537259
"target": "com.amazonaws.imagebuilder#NonEmptyString",
72547260
"traits": {
7255-
"smithy.api#documentation": "<p>The AMI ID to use as the base image for a container build and test instance. If not\n\t\t\tspecified, Image Builder will use the appropriate ECS-optimized AMI as a base image.</p>"
7261+
"smithy.api#documentation": "<p>The base image for a container build and test instance. This can contain an AMI ID \n\t\t\tor it can specify an Amazon Web Services Systems Manager (SSM) Parameter Store Parameter, prefixed by <code>ssm:</code>, \n\t\t\tfollowed by the parameter name or ARN.</p>\n <p>If not specified, Image Builder uses the appropriate ECS-optimized AMI as a base image.</p>"
72567262
}
72577263
},
72587264
"blockDeviceMappings": {
@@ -11852,6 +11858,66 @@
1185211858
"com.amazonaws.imagebuilder#SourceLayerHash": {
1185311859
"type": "string"
1185411860
},
11861+
"com.amazonaws.imagebuilder#SsmParameterConfiguration": {
11862+
"type": "structure",
11863+
"members": {
11864+
"amiAccountId": {
11865+
"target": "com.amazonaws.imagebuilder#AccountId",
11866+
"traits": {
11867+
"smithy.api#documentation": "<p>Specify the account that will own the Parameter in a given Region. During distribution, \n\t\t\tthis account must be specified in distribution settings as a target account for the \n\t\t\tRegion.</p>"
11868+
}
11869+
},
11870+
"parameterName": {
11871+
"target": "com.amazonaws.imagebuilder#SsmParameterName",
11872+
"traits": {
11873+
"smithy.api#documentation": "<p>This is the name of the Parameter in the target Region or account. The image \n\t\t\tdistribution creates the Parameter if it doesn't already exist. Otherwise, it updates \n\t\t\tthe parameter.</p>",
11874+
"smithy.api#required": {}
11875+
}
11876+
},
11877+
"dataType": {
11878+
"target": "com.amazonaws.imagebuilder#SsmParameterDataType",
11879+
"traits": {
11880+
"smithy.api#documentation": "<p>The data type specifies what type of value the Parameter contains. We recommend that \n\t\t\tyou use data type <code>aws:ec2:image</code>.</p>"
11881+
}
11882+
}
11883+
},
11884+
"traits": {
11885+
"smithy.api#documentation": "<p>Configuration for a single Parameter in the Amazon Web Services Systems Manager (SSM) Parameter Store in \n\t\t\ta given Region.</p>"
11886+
}
11887+
},
11888+
"com.amazonaws.imagebuilder#SsmParameterConfigurationList": {
11889+
"type": "list",
11890+
"member": {
11891+
"target": "com.amazonaws.imagebuilder#SsmParameterConfiguration"
11892+
}
11893+
},
11894+
"com.amazonaws.imagebuilder#SsmParameterDataType": {
11895+
"type": "enum",
11896+
"members": {
11897+
"TEXT": {
11898+
"target": "smithy.api#Unit",
11899+
"traits": {
11900+
"smithy.api#enumValue": "text"
11901+
}
11902+
},
11903+
"AWS_EC2_IMAGE": {
11904+
"target": "smithy.api#Unit",
11905+
"traits": {
11906+
"smithy.api#enumValue": "aws:ec2:image"
11907+
}
11908+
}
11909+
}
11910+
},
11911+
"com.amazonaws.imagebuilder#SsmParameterName": {
11912+
"type": "string",
11913+
"traits": {
11914+
"smithy.api#length": {
11915+
"min": 1,
11916+
"max": 1011
11917+
},
11918+
"smithy.api#pattern": "^[a-zA-Z0-9_.\\-\\/]+$"
11919+
}
11920+
},
1185511921
"com.amazonaws.imagebuilder#StartImagePipelineExecution": {
1185611922
"type": "operation",
1185711923
"input": {
@@ -12252,7 +12318,7 @@
1225212318
"min": 3,
1225312319
"max": 100
1225412320
},
12255-
"smithy.api#pattern": "^[a-zA-Z0-9]{2,}(?:\\/[a-zA-z0-9-_+]+)*$"
12321+
"smithy.api#pattern": "^[a-zA-Z0-9]{2,}(?:\\/[a-zA-Z0-9-_+]+)*$"
1225612322
}
1225712323
},
1225812324
"com.amazonaws.imagebuilder#UntagResource": {

0 commit comments

Comments
 (0)