Skip to content

Commit

Permalink
feat(client-ssm): This release adds the TargetMaps parameter in SSM S…
Browse files Browse the repository at this point in the history
…tate Manager API.
  • Loading branch information
awstools committed May 4, 2022
1 parent d77322a commit f0b9bd4
Show file tree
Hide file tree
Showing 6 changed files with 204 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ import {
SerdeContext as __SerdeContext,
} from "@aws-sdk/types";

import { UpdateDocumentMetadataRequest } from "../models/models_1";
import { UpdateDocumentMetadataResponse } from "../models/models_2";
import { UpdateDocumentMetadataRequest, UpdateDocumentMetadataResponse } from "../models/models_2";
import {
deserializeAws_json1_1UpdateDocumentMetadataCommand,
serializeAws_json1_1UpdateDocumentMetadataCommand,
Expand Down
45 changes: 39 additions & 6 deletions clients/client-ssm/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1244,6 +1244,12 @@ export interface CreateAssociationRequest {
* </note>
*/
ScheduleOffset?: number;

/**
* <p>A key-value mapping of document parameters to target resources. Both Targets and TargetMaps
* can't be specified together.</p>
*/
TargetMaps?: { [key: string]: string[] }[];
}

export namespace CreateAssociationRequest {
Expand Down Expand Up @@ -1489,6 +1495,12 @@ export interface AssociationDescription {
* <p>Number of days to wait after the scheduled day to run an association.</p>
*/
ScheduleOffset?: number;

/**
* <p>A key-value mapping of document parameters to target resources. Both Targets and TargetMaps
* can't be specified together.</p>
*/
TargetMaps?: { [key: string]: string[] }[];
}

export namespace AssociationDescription {
Expand Down Expand Up @@ -1628,6 +1640,27 @@ export class InvalidTarget extends __BaseException {
}
}

/**
* <p>TargetMap parameter isn't valid.</p>
*/
export class InvalidTargetMaps extends __BaseException {
readonly name: "InvalidTargetMaps" = "InvalidTargetMaps";
readonly $fault: "client" = "client";
Message?: string;
/**
* @internal
*/
constructor(opts: __ExceptionOptionType<InvalidTargetMaps, __BaseException>) {
super({
name: "InvalidTargetMaps",
$fault: "client",
...opts,
});
Object.setPrototypeOf(this, InvalidTargetMaps.prototype);
this.Message = opts.Message;
}
}

/**
* <p>The document doesn't support the platform type of the given managed node ID(s). For example,
* you sent an document for a Windows managed node to a Linux node.</p>
Expand Down Expand Up @@ -1798,6 +1831,12 @@ export interface CreateAssociationBatchRequestEntry {
* <p>Number of days to wait after the scheduled day to run an association.</p>
*/
ScheduleOffset?: number;

/**
* <p>A key-value mapping of document parameters to target resources. Both Targets and TargetMaps
* can't be specified together.</p>
*/
TargetMaps?: { [key: string]: string[] }[];
}

export namespace CreateAssociationBatchRequestEntry {
Expand Down Expand Up @@ -9518,9 +9557,3 @@ export namespace ParameterInlinePolicy {
...obj,
});
}

export enum ParameterTier {
ADVANCED = "Advanced",
INTELLIGENT_TIERING = "Intelligent-Tiering",
STANDARD = "Standard",
}
51 changes: 24 additions & 27 deletions clients/client-ssm/src/models/models_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import {
OpsItemStatus,
ParameterInlinePolicy,
ParameterStringFilter,
ParameterTier,
PatchAction,
PatchComplianceLevel,
PatchFilterGroup,
Expand All @@ -54,6 +53,12 @@ import {
} from "./models_0";
import { SSMServiceException as __BaseException } from "./SSMServiceException";

export enum ParameterTier {
ADVANCED = "Advanced",
INTELLIGENT_TIERING = "Intelligent-Tiering",
STANDARD = "Standard",
}

export enum ParameterType {
SECURE_STRING = "SecureString",
STRING = "String",
Expand Down Expand Up @@ -4523,6 +4528,12 @@ export interface Association {
* <p>Number of days to wait after the scheduled day to run an association.</p>
*/
ScheduleOffset?: number;

/**
* <p>A key-value mapping of document parameters to target resources. Both Targets and TargetMaps
* can't be specified together.</p>
*/
TargetMaps?: { [key: string]: string[] }[];
}

export namespace Association {
Expand Down Expand Up @@ -4712,6 +4723,12 @@ export interface AssociationVersionInfo {
* <p>Number of days to wait after the scheduled day to run an association.</p>
*/
ScheduleOffset?: number;

/**
* <p>A key-value mapping of document parameters to target resources. Both Targets and TargetMaps
* can't be specified together.</p>
*/
TargetMaps?: { [key: string]: string[] }[];
}

export namespace AssociationVersionInfo {
Expand Down Expand Up @@ -10340,6 +10357,12 @@ export interface UpdateAssociationRequest {
* </note>
*/
ScheduleOffset?: number;

/**
* <p>A key-value mapping of document parameters to target resources. Both Targets and TargetMaps
* can't be specified together.</p>
*/
TargetMaps?: { [key: string]: string[] }[];
}

export namespace UpdateAssociationRequest {
Expand Down Expand Up @@ -10676,29 +10699,3 @@ export namespace DocumentReviews {
...obj,
});
}

export interface UpdateDocumentMetadataRequest {
/**
* <p>The name of the change template for which a version's metadata is to be updated.</p>
*/
Name: string | undefined;

/**
* <p>The version of a change template in which to update approval metadata.</p>
*/
DocumentVersion?: string;

/**
* <p>The change template review details to update.</p>
*/
DocumentReviews: DocumentReviews | undefined;
}

export namespace UpdateDocumentMetadataRequest {
/**
* @internal
*/
export const filterSensitiveLog = (obj: UpdateDocumentMetadataRequest): any => ({
...obj,
});
}
27 changes: 27 additions & 0 deletions clients/client-ssm/src/models/models_2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
Target,
} from "./models_0";
import {
DocumentReviews,
InventoryFilter,
InventoryGroup,
MaintenanceWindowTaskInvocationParameters,
Expand All @@ -29,6 +30,32 @@ import {
} from "./models_1";
import { SSMServiceException as __BaseException } from "./SSMServiceException";

export interface UpdateDocumentMetadataRequest {
/**
* <p>The name of the change template for which a version's metadata is to be updated.</p>
*/
Name: string | undefined;

/**
* <p>The version of a change template in which to update approval metadata.</p>
*/
DocumentVersion?: string;

/**
* <p>The change template review details to update.</p>
*/
DocumentReviews: DocumentReviews | undefined;
}

export namespace UpdateDocumentMetadataRequest {
/**
* @internal
*/
export const filterSensitiveLog = (obj: UpdateDocumentMetadataRequest): any => ({
...obj,
});
}

export interface UpdateDocumentMetadataResponse {}

export namespace UpdateDocumentMetadataResponse {
Expand Down
53 changes: 52 additions & 1 deletion clients/client-ssm/src/protocols/Aws_json1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,7 @@ import {
InvalidResourceType,
InvalidSchedule,
InvalidTarget,
InvalidTargetMaps,
InvalidTypeNameException,
InventoryDeletionStatusItem,
InventoryDeletionSummary,
Expand Down Expand Up @@ -940,7 +941,6 @@ import {
UpdateAssociationStatusResult,
UpdateDocumentDefaultVersionRequest,
UpdateDocumentDefaultVersionResult,
UpdateDocumentMetadataRequest,
UpdateDocumentRequest,
UpdateDocumentResult,
} from "../models/models_1";
Expand All @@ -951,6 +951,7 @@ import {
OpsAggregator,
OpsMetadataKeyLimitExceededException,
ResourceDataSyncConflictException,
UpdateDocumentMetadataRequest,
UpdateDocumentMetadataResponse,
UpdateMaintenanceWindowRequest,
UpdateMaintenanceWindowResult,
Expand Down Expand Up @@ -3041,6 +3042,9 @@ const deserializeAws_json1_1CreateAssociationCommandError = async (
case "InvalidTarget":
case "com.amazonaws.ssm#InvalidTarget":
throw await deserializeAws_json1_1InvalidTargetResponse(parsedOutput, context);
case "InvalidTargetMaps":
case "com.amazonaws.ssm#InvalidTargetMaps":
throw await deserializeAws_json1_1InvalidTargetMapsResponse(parsedOutput, context);
case "UnsupportedPlatformType":
case "com.amazonaws.ssm#UnsupportedPlatformType":
throw await deserializeAws_json1_1UnsupportedPlatformTypeResponse(parsedOutput, context);
Expand Down Expand Up @@ -3114,6 +3118,9 @@ const deserializeAws_json1_1CreateAssociationBatchCommandError = async (
case "InvalidTarget":
case "com.amazonaws.ssm#InvalidTarget":
throw await deserializeAws_json1_1InvalidTargetResponse(parsedOutput, context);
case "InvalidTargetMaps":
case "com.amazonaws.ssm#InvalidTargetMaps":
throw await deserializeAws_json1_1InvalidTargetMapsResponse(parsedOutput, context);
case "UnsupportedPlatformType":
case "com.amazonaws.ssm#UnsupportedPlatformType":
throw await deserializeAws_json1_1UnsupportedPlatformTypeResponse(parsedOutput, context);
Expand Down Expand Up @@ -8929,6 +8936,9 @@ const deserializeAws_json1_1UpdateAssociationCommandError = async (
case "InvalidTarget":
case "com.amazonaws.ssm#InvalidTarget":
throw await deserializeAws_json1_1InvalidTargetResponse(parsedOutput, context);
case "InvalidTargetMaps":
case "com.amazonaws.ssm#InvalidTargetMaps":
throw await deserializeAws_json1_1InvalidTargetMapsResponse(parsedOutput, context);
case "InvalidUpdate":
case "com.amazonaws.ssm#InvalidUpdate":
throw await deserializeAws_json1_1InvalidUpdateResponse(parsedOutput, context);
Expand Down Expand Up @@ -10581,6 +10591,19 @@ const deserializeAws_json1_1InvalidTargetResponse = async (
return __decorateServiceException(exception, body);
};

const deserializeAws_json1_1InvalidTargetMapsResponse = async (
parsedOutput: any,
context: __SerdeContext
): Promise<InvalidTargetMaps> => {
const body = parsedOutput.body;
const deserialized: any = deserializeAws_json1_1InvalidTargetMaps(body, context);
const exception = new InvalidTargetMaps({
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
});
return __decorateServiceException(exception, body);
};

const deserializeAws_json1_1InvalidTypeNameExceptionResponse = async (
parsedOutput: any,
context: __SerdeContext
Expand Down Expand Up @@ -11713,6 +11736,8 @@ const serializeAws_json1_1CreateAssociationBatchRequestEntry = (
input.TargetLocations !== null && {
TargetLocations: serializeAws_json1_1TargetLocations(input.TargetLocations, context),
}),
...(input.TargetMaps !== undefined &&
input.TargetMaps !== null && { TargetMaps: serializeAws_json1_1TargetMaps(input.TargetMaps, context) }),
...(input.Targets !== undefined &&
input.Targets !== null && { Targets: serializeAws_json1_1Targets(input.Targets, context) }),
};
Expand Down Expand Up @@ -11760,6 +11785,8 @@ const serializeAws_json1_1CreateAssociationRequest = (
input.TargetLocations !== null && {
TargetLocations: serializeAws_json1_1TargetLocations(input.TargetLocations, context),
}),
...(input.TargetMaps !== undefined &&
input.TargetMaps !== null && { TargetMaps: serializeAws_json1_1TargetMaps(input.TargetMaps, context) }),
...(input.Targets !== undefined &&
input.Targets !== null && { Targets: serializeAws_json1_1Targets(input.Targets, context) }),
};
Expand Down Expand Up @@ -14875,6 +14902,8 @@ const serializeAws_json1_1UpdateAssociationRequest = (
input.TargetLocations !== null && {
TargetLocations: serializeAws_json1_1TargetLocations(input.TargetLocations, context),
}),
...(input.TargetMaps !== undefined &&
input.TargetMaps !== null && { TargetMaps: serializeAws_json1_1TargetMaps(input.TargetMaps, context) }),
...(input.Targets !== undefined &&
input.Targets !== null && { Targets: serializeAws_json1_1Targets(input.Targets, context) }),
};
Expand Down Expand Up @@ -15268,6 +15297,10 @@ const deserializeAws_json1_1Association = (output: any, context: __SerdeContext)
: undefined,
ScheduleExpression: __expectString(output.ScheduleExpression),
ScheduleOffset: __expectInt32(output.ScheduleOffset),
TargetMaps:
output.TargetMaps !== undefined && output.TargetMaps !== null
? deserializeAws_json1_1TargetMaps(output.TargetMaps, context)
: undefined,
Targets:
output.Targets !== undefined && output.Targets !== null
? deserializeAws_json1_1Targets(output.Targets, context)
Expand Down Expand Up @@ -15338,6 +15371,10 @@ const deserializeAws_json1_1AssociationDescription = (output: any, context: __Se
output.TargetLocations !== undefined && output.TargetLocations !== null
? deserializeAws_json1_1TargetLocations(output.TargetLocations, context)
: undefined,
TargetMaps:
output.TargetMaps !== undefined && output.TargetMaps !== null
? deserializeAws_json1_1TargetMaps(output.TargetMaps, context)
: undefined,
Targets:
output.Targets !== undefined && output.Targets !== null
? deserializeAws_json1_1Targets(output.Targets, context)
Expand Down Expand Up @@ -15541,6 +15578,10 @@ const deserializeAws_json1_1AssociationVersionInfo = (output: any, context: __Se
output.TargetLocations !== undefined && output.TargetLocations !== null
? deserializeAws_json1_1TargetLocations(output.TargetLocations, context)
: undefined,
TargetMaps:
output.TargetMaps !== undefined && output.TargetMaps !== null
? deserializeAws_json1_1TargetMaps(output.TargetMaps, context)
: undefined,
Targets:
output.Targets !== undefined && output.Targets !== null
? deserializeAws_json1_1Targets(output.Targets, context)
Expand Down Expand Up @@ -16190,6 +16231,10 @@ const deserializeAws_json1_1CreateAssociationBatchRequestEntry = (
output.TargetLocations !== undefined && output.TargetLocations !== null
? deserializeAws_json1_1TargetLocations(output.TargetLocations, context)
: undefined,
TargetMaps:
output.TargetMaps !== undefined && output.TargetMaps !== null
? deserializeAws_json1_1TargetMaps(output.TargetMaps, context)
: undefined,
Targets:
output.Targets !== undefined && output.Targets !== null
? deserializeAws_json1_1Targets(output.Targets, context)
Expand Down Expand Up @@ -18245,6 +18290,12 @@ const deserializeAws_json1_1InvalidTarget = (output: any, context: __SerdeContex
} as any;
};

const deserializeAws_json1_1InvalidTargetMaps = (output: any, context: __SerdeContext): InvalidTargetMaps => {
return {
Message: __expectString(output.Message),
} as any;
};

const deserializeAws_json1_1InvalidTypeNameException = (
output: any,
context: __SerdeContext
Expand Down
Loading

0 comments on commit f0b9bd4

Please sign in to comment.