Skip to content

Commit f0b9bd4

Browse files
author
awstools
committed
feat(client-ssm): This release adds the TargetMaps parameter in SSM State Manager API.
1 parent d77322a commit f0b9bd4

File tree

6 files changed

+204
-36
lines changed

6 files changed

+204
-36
lines changed

clients/client-ssm/src/commands/UpdateDocumentMetadataCommand.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ import {
1111
SerdeContext as __SerdeContext,
1212
} from "@aws-sdk/types";
1313

14-
import { UpdateDocumentMetadataRequest } from "../models/models_1";
15-
import { UpdateDocumentMetadataResponse } from "../models/models_2";
14+
import { UpdateDocumentMetadataRequest, UpdateDocumentMetadataResponse } from "../models/models_2";
1615
import {
1716
deserializeAws_json1_1UpdateDocumentMetadataCommand,
1817
serializeAws_json1_1UpdateDocumentMetadataCommand,

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

Lines changed: 39 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1244,6 +1244,12 @@ export interface CreateAssociationRequest {
12441244
* </note>
12451245
*/
12461246
ScheduleOffset?: number;
1247+
1248+
/**
1249+
* <p>A key-value mapping of document parameters to target resources. Both Targets and TargetMaps
1250+
* can't be specified together.</p>
1251+
*/
1252+
TargetMaps?: { [key: string]: string[] }[];
12471253
}
12481254

12491255
export namespace CreateAssociationRequest {
@@ -1489,6 +1495,12 @@ export interface AssociationDescription {
14891495
* <p>Number of days to wait after the scheduled day to run an association.</p>
14901496
*/
14911497
ScheduleOffset?: number;
1498+
1499+
/**
1500+
* <p>A key-value mapping of document parameters to target resources. Both Targets and TargetMaps
1501+
* can't be specified together.</p>
1502+
*/
1503+
TargetMaps?: { [key: string]: string[] }[];
14921504
}
14931505

14941506
export namespace AssociationDescription {
@@ -1628,6 +1640,27 @@ export class InvalidTarget extends __BaseException {
16281640
}
16291641
}
16301642

1643+
/**
1644+
* <p>TargetMap parameter isn't valid.</p>
1645+
*/
1646+
export class InvalidTargetMaps extends __BaseException {
1647+
readonly name: "InvalidTargetMaps" = "InvalidTargetMaps";
1648+
readonly $fault: "client" = "client";
1649+
Message?: string;
1650+
/**
1651+
* @internal
1652+
*/
1653+
constructor(opts: __ExceptionOptionType<InvalidTargetMaps, __BaseException>) {
1654+
super({
1655+
name: "InvalidTargetMaps",
1656+
$fault: "client",
1657+
...opts,
1658+
});
1659+
Object.setPrototypeOf(this, InvalidTargetMaps.prototype);
1660+
this.Message = opts.Message;
1661+
}
1662+
}
1663+
16311664
/**
16321665
* <p>The document doesn't support the platform type of the given managed node ID(s). For example,
16331666
* you sent an document for a Windows managed node to a Linux node.</p>
@@ -1798,6 +1831,12 @@ export interface CreateAssociationBatchRequestEntry {
17981831
* <p>Number of days to wait after the scheduled day to run an association.</p>
17991832
*/
18001833
ScheduleOffset?: number;
1834+
1835+
/**
1836+
* <p>A key-value mapping of document parameters to target resources. Both Targets and TargetMaps
1837+
* can't be specified together.</p>
1838+
*/
1839+
TargetMaps?: { [key: string]: string[] }[];
18011840
}
18021841

18031842
export namespace CreateAssociationBatchRequestEntry {
@@ -9518,9 +9557,3 @@ export namespace ParameterInlinePolicy {
95189557
...obj,
95199558
});
95209559
}
9521-
9522-
export enum ParameterTier {
9523-
ADVANCED = "Advanced",
9524-
INTELLIGENT_TIERING = "Intelligent-Tiering",
9525-
STANDARD = "Standard",
9526-
}

clients/client-ssm/src/models/models_1.ts

Lines changed: 24 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ import {
3232
OpsItemStatus,
3333
ParameterInlinePolicy,
3434
ParameterStringFilter,
35-
ParameterTier,
3635
PatchAction,
3736
PatchComplianceLevel,
3837
PatchFilterGroup,
@@ -54,6 +53,12 @@ import {
5453
} from "./models_0";
5554
import { SSMServiceException as __BaseException } from "./SSMServiceException";
5655

56+
export enum ParameterTier {
57+
ADVANCED = "Advanced",
58+
INTELLIGENT_TIERING = "Intelligent-Tiering",
59+
STANDARD = "Standard",
60+
}
61+
5762
export enum ParameterType {
5863
SECURE_STRING = "SecureString",
5964
STRING = "String",
@@ -4523,6 +4528,12 @@ export interface Association {
45234528
* <p>Number of days to wait after the scheduled day to run an association.</p>
45244529
*/
45254530
ScheduleOffset?: number;
4531+
4532+
/**
4533+
* <p>A key-value mapping of document parameters to target resources. Both Targets and TargetMaps
4534+
* can't be specified together.</p>
4535+
*/
4536+
TargetMaps?: { [key: string]: string[] }[];
45264537
}
45274538

45284539
export namespace Association {
@@ -4712,6 +4723,12 @@ export interface AssociationVersionInfo {
47124723
* <p>Number of days to wait after the scheduled day to run an association.</p>
47134724
*/
47144725
ScheduleOffset?: number;
4726+
4727+
/**
4728+
* <p>A key-value mapping of document parameters to target resources. Both Targets and TargetMaps
4729+
* can't be specified together.</p>
4730+
*/
4731+
TargetMaps?: { [key: string]: string[] }[];
47154732
}
47164733

47174734
export namespace AssociationVersionInfo {
@@ -10340,6 +10357,12 @@ export interface UpdateAssociationRequest {
1034010357
* </note>
1034110358
*/
1034210359
ScheduleOffset?: number;
10360+
10361+
/**
10362+
* <p>A key-value mapping of document parameters to target resources. Both Targets and TargetMaps
10363+
* can't be specified together.</p>
10364+
*/
10365+
TargetMaps?: { [key: string]: string[] }[];
1034310366
}
1034410367

1034510368
export namespace UpdateAssociationRequest {
@@ -10676,29 +10699,3 @@ export namespace DocumentReviews {
1067610699
...obj,
1067710700
});
1067810701
}
10679-
10680-
export interface UpdateDocumentMetadataRequest {
10681-
/**
10682-
* <p>The name of the change template for which a version's metadata is to be updated.</p>
10683-
*/
10684-
Name: string | undefined;
10685-
10686-
/**
10687-
* <p>The version of a change template in which to update approval metadata.</p>
10688-
*/
10689-
DocumentVersion?: string;
10690-
10691-
/**
10692-
* <p>The change template review details to update.</p>
10693-
*/
10694-
DocumentReviews: DocumentReviews | undefined;
10695-
}
10696-
10697-
export namespace UpdateDocumentMetadataRequest {
10698-
/**
10699-
* @internal
10700-
*/
10701-
export const filterSensitiveLog = (obj: UpdateDocumentMetadataRequest): any => ({
10702-
...obj,
10703-
});
10704-
}

clients/client-ssm/src/models/models_2.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import {
2020
Target,
2121
} from "./models_0";
2222
import {
23+
DocumentReviews,
2324
InventoryFilter,
2425
InventoryGroup,
2526
MaintenanceWindowTaskInvocationParameters,
@@ -29,6 +30,32 @@ import {
2930
} from "./models_1";
3031
import { SSMServiceException as __BaseException } from "./SSMServiceException";
3132

33+
export interface UpdateDocumentMetadataRequest {
34+
/**
35+
* <p>The name of the change template for which a version's metadata is to be updated.</p>
36+
*/
37+
Name: string | undefined;
38+
39+
/**
40+
* <p>The version of a change template in which to update approval metadata.</p>
41+
*/
42+
DocumentVersion?: string;
43+
44+
/**
45+
* <p>The change template review details to update.</p>
46+
*/
47+
DocumentReviews: DocumentReviews | undefined;
48+
}
49+
50+
export namespace UpdateDocumentMetadataRequest {
51+
/**
52+
* @internal
53+
*/
54+
export const filterSensitiveLog = (obj: UpdateDocumentMetadataRequest): any => ({
55+
...obj,
56+
});
57+
}
58+
3259
export interface UpdateDocumentMetadataResponse {}
3360

3461
export namespace UpdateDocumentMetadataResponse {

clients/client-ssm/src/protocols/Aws_json1_1.ts

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,6 +600,7 @@ import {
600600
InvalidResourceType,
601601
InvalidSchedule,
602602
InvalidTarget,
603+
InvalidTargetMaps,
603604
InvalidTypeNameException,
604605
InventoryDeletionStatusItem,
605606
InventoryDeletionSummary,
@@ -940,7 +941,6 @@ import {
940941
UpdateAssociationStatusResult,
941942
UpdateDocumentDefaultVersionRequest,
942943
UpdateDocumentDefaultVersionResult,
943-
UpdateDocumentMetadataRequest,
944944
UpdateDocumentRequest,
945945
UpdateDocumentResult,
946946
} from "../models/models_1";
@@ -951,6 +951,7 @@ import {
951951
OpsAggregator,
952952
OpsMetadataKeyLimitExceededException,
953953
ResourceDataSyncConflictException,
954+
UpdateDocumentMetadataRequest,
954955
UpdateDocumentMetadataResponse,
955956
UpdateMaintenanceWindowRequest,
956957
UpdateMaintenanceWindowResult,
@@ -3041,6 +3042,9 @@ const deserializeAws_json1_1CreateAssociationCommandError = async (
30413042
case "InvalidTarget":
30423043
case "com.amazonaws.ssm#InvalidTarget":
30433044
throw await deserializeAws_json1_1InvalidTargetResponse(parsedOutput, context);
3045+
case "InvalidTargetMaps":
3046+
case "com.amazonaws.ssm#InvalidTargetMaps":
3047+
throw await deserializeAws_json1_1InvalidTargetMapsResponse(parsedOutput, context);
30443048
case "UnsupportedPlatformType":
30453049
case "com.amazonaws.ssm#UnsupportedPlatformType":
30463050
throw await deserializeAws_json1_1UnsupportedPlatformTypeResponse(parsedOutput, context);
@@ -3114,6 +3118,9 @@ const deserializeAws_json1_1CreateAssociationBatchCommandError = async (
31143118
case "InvalidTarget":
31153119
case "com.amazonaws.ssm#InvalidTarget":
31163120
throw await deserializeAws_json1_1InvalidTargetResponse(parsedOutput, context);
3121+
case "InvalidTargetMaps":
3122+
case "com.amazonaws.ssm#InvalidTargetMaps":
3123+
throw await deserializeAws_json1_1InvalidTargetMapsResponse(parsedOutput, context);
31173124
case "UnsupportedPlatformType":
31183125
case "com.amazonaws.ssm#UnsupportedPlatformType":
31193126
throw await deserializeAws_json1_1UnsupportedPlatformTypeResponse(parsedOutput, context);
@@ -8929,6 +8936,9 @@ const deserializeAws_json1_1UpdateAssociationCommandError = async (
89298936
case "InvalidTarget":
89308937
case "com.amazonaws.ssm#InvalidTarget":
89318938
throw await deserializeAws_json1_1InvalidTargetResponse(parsedOutput, context);
8939+
case "InvalidTargetMaps":
8940+
case "com.amazonaws.ssm#InvalidTargetMaps":
8941+
throw await deserializeAws_json1_1InvalidTargetMapsResponse(parsedOutput, context);
89328942
case "InvalidUpdate":
89338943
case "com.amazonaws.ssm#InvalidUpdate":
89348944
throw await deserializeAws_json1_1InvalidUpdateResponse(parsedOutput, context);
@@ -10581,6 +10591,19 @@ const deserializeAws_json1_1InvalidTargetResponse = async (
1058110591
return __decorateServiceException(exception, body);
1058210592
};
1058310593

10594+
const deserializeAws_json1_1InvalidTargetMapsResponse = async (
10595+
parsedOutput: any,
10596+
context: __SerdeContext
10597+
): Promise<InvalidTargetMaps> => {
10598+
const body = parsedOutput.body;
10599+
const deserialized: any = deserializeAws_json1_1InvalidTargetMaps(body, context);
10600+
const exception = new InvalidTargetMaps({
10601+
$metadata: deserializeMetadata(parsedOutput),
10602+
...deserialized,
10603+
});
10604+
return __decorateServiceException(exception, body);
10605+
};
10606+
1058410607
const deserializeAws_json1_1InvalidTypeNameExceptionResponse = async (
1058510608
parsedOutput: any,
1058610609
context: __SerdeContext
@@ -11713,6 +11736,8 @@ const serializeAws_json1_1CreateAssociationBatchRequestEntry = (
1171311736
input.TargetLocations !== null && {
1171411737
TargetLocations: serializeAws_json1_1TargetLocations(input.TargetLocations, context),
1171511738
}),
11739+
...(input.TargetMaps !== undefined &&
11740+
input.TargetMaps !== null && { TargetMaps: serializeAws_json1_1TargetMaps(input.TargetMaps, context) }),
1171611741
...(input.Targets !== undefined &&
1171711742
input.Targets !== null && { Targets: serializeAws_json1_1Targets(input.Targets, context) }),
1171811743
};
@@ -11760,6 +11785,8 @@ const serializeAws_json1_1CreateAssociationRequest = (
1176011785
input.TargetLocations !== null && {
1176111786
TargetLocations: serializeAws_json1_1TargetLocations(input.TargetLocations, context),
1176211787
}),
11788+
...(input.TargetMaps !== undefined &&
11789+
input.TargetMaps !== null && { TargetMaps: serializeAws_json1_1TargetMaps(input.TargetMaps, context) }),
1176311790
...(input.Targets !== undefined &&
1176411791
input.Targets !== null && { Targets: serializeAws_json1_1Targets(input.Targets, context) }),
1176511792
};
@@ -14875,6 +14902,8 @@ const serializeAws_json1_1UpdateAssociationRequest = (
1487514902
input.TargetLocations !== null && {
1487614903
TargetLocations: serializeAws_json1_1TargetLocations(input.TargetLocations, context),
1487714904
}),
14905+
...(input.TargetMaps !== undefined &&
14906+
input.TargetMaps !== null && { TargetMaps: serializeAws_json1_1TargetMaps(input.TargetMaps, context) }),
1487814907
...(input.Targets !== undefined &&
1487914908
input.Targets !== null && { Targets: serializeAws_json1_1Targets(input.Targets, context) }),
1488014909
};
@@ -15268,6 +15297,10 @@ const deserializeAws_json1_1Association = (output: any, context: __SerdeContext)
1526815297
: undefined,
1526915298
ScheduleExpression: __expectString(output.ScheduleExpression),
1527015299
ScheduleOffset: __expectInt32(output.ScheduleOffset),
15300+
TargetMaps:
15301+
output.TargetMaps !== undefined && output.TargetMaps !== null
15302+
? deserializeAws_json1_1TargetMaps(output.TargetMaps, context)
15303+
: undefined,
1527115304
Targets:
1527215305
output.Targets !== undefined && output.Targets !== null
1527315306
? deserializeAws_json1_1Targets(output.Targets, context)
@@ -15338,6 +15371,10 @@ const deserializeAws_json1_1AssociationDescription = (output: any, context: __Se
1533815371
output.TargetLocations !== undefined && output.TargetLocations !== null
1533915372
? deserializeAws_json1_1TargetLocations(output.TargetLocations, context)
1534015373
: undefined,
15374+
TargetMaps:
15375+
output.TargetMaps !== undefined && output.TargetMaps !== null
15376+
? deserializeAws_json1_1TargetMaps(output.TargetMaps, context)
15377+
: undefined,
1534115378
Targets:
1534215379
output.Targets !== undefined && output.Targets !== null
1534315380
? deserializeAws_json1_1Targets(output.Targets, context)
@@ -15541,6 +15578,10 @@ const deserializeAws_json1_1AssociationVersionInfo = (output: any, context: __Se
1554115578
output.TargetLocations !== undefined && output.TargetLocations !== null
1554215579
? deserializeAws_json1_1TargetLocations(output.TargetLocations, context)
1554315580
: undefined,
15581+
TargetMaps:
15582+
output.TargetMaps !== undefined && output.TargetMaps !== null
15583+
? deserializeAws_json1_1TargetMaps(output.TargetMaps, context)
15584+
: undefined,
1554415585
Targets:
1554515586
output.Targets !== undefined && output.Targets !== null
1554615587
? deserializeAws_json1_1Targets(output.Targets, context)
@@ -16190,6 +16231,10 @@ const deserializeAws_json1_1CreateAssociationBatchRequestEntry = (
1619016231
output.TargetLocations !== undefined && output.TargetLocations !== null
1619116232
? deserializeAws_json1_1TargetLocations(output.TargetLocations, context)
1619216233
: undefined,
16234+
TargetMaps:
16235+
output.TargetMaps !== undefined && output.TargetMaps !== null
16236+
? deserializeAws_json1_1TargetMaps(output.TargetMaps, context)
16237+
: undefined,
1619316238
Targets:
1619416239
output.Targets !== undefined && output.Targets !== null
1619516240
? deserializeAws_json1_1Targets(output.Targets, context)
@@ -18245,6 +18290,12 @@ const deserializeAws_json1_1InvalidTarget = (output: any, context: __SerdeContex
1824518290
} as any;
1824618291
};
1824718292

18293+
const deserializeAws_json1_1InvalidTargetMaps = (output: any, context: __SerdeContext): InvalidTargetMaps => {
18294+
return {
18295+
Message: __expectString(output.Message),
18296+
} as any;
18297+
};
18298+
1824818299
const deserializeAws_json1_1InvalidTypeNameException = (
1824918300
output: any,
1825018301
context: __SerdeContext

0 commit comments

Comments
 (0)