Skip to content

Commit 7141bb4

Browse files
author
awstools
committed
feat(client-ssm): This release adds support for Systems Manager State Manager Association tagging.
1 parent c7ddd0d commit 7141bb4

File tree

5 files changed

+156
-69
lines changed

5 files changed

+156
-69
lines changed

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

Lines changed: 41 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ export interface Activation {
9595
}
9696

9797
export enum ResourceTypeForTagging {
98+
ASSOCIATION = "Association",
9899
AUTOMATION = "Automation",
99100
DOCUMENT = "Document",
100101
MAINTENANCE_WINDOW = "MaintenanceWindow",
@@ -1088,6 +1089,14 @@ export interface CreateAssociationRequest {
10881089
* can't be specified together.</p>
10891090
*/
10901091
TargetMaps?: Record<string, string[]>[];
1092+
1093+
/**
1094+
* <p>Adds or overwrites one or more tags for a State Manager association. <i>Tags</i>
1095+
* are metadata that you can assign to your Amazon Web Services resources. Tags enable you to categorize your
1096+
* resources in different ways, for example, by purpose, owner, or environment. Each tag consists of
1097+
* a key and an optional value, both of which you define. </p>
1098+
*/
1099+
Tags?: Tag[];
10911100
}
10921101

10931102
/**
@@ -1406,6 +1415,27 @@ export class InvalidSchedule extends __BaseException {
14061415
}
14071416
}
14081417

1418+
/**
1419+
* <p>The specified tag key or value is not valid.</p>
1420+
*/
1421+
export class InvalidTag extends __BaseException {
1422+
readonly name: "InvalidTag" = "InvalidTag";
1423+
readonly $fault: "client" = "client";
1424+
Message?: string;
1425+
/**
1426+
* @internal
1427+
*/
1428+
constructor(opts: __ExceptionOptionType<InvalidTag, __BaseException>) {
1429+
super({
1430+
name: "InvalidTag",
1431+
$fault: "client",
1432+
...opts,
1433+
});
1434+
Object.setPrototypeOf(this, InvalidTag.prototype);
1435+
this.Message = opts.Message;
1436+
}
1437+
}
1438+
14091439
/**
14101440
* <p>The target isn't valid or doesn't exist. It might not be configured for Systems Manager or you might
14111441
* not have permission to perform the operation.</p>
@@ -1815,7 +1845,7 @@ export interface CreateDocumentRequest {
18151845
* <ul>
18161846
* <li>
18171847
* <p>
1818-
* <code>aws-</code>
1848+
* <code>aws</code>
18191849
* </p>
18201850
* </li>
18211851
* <li>
@@ -5700,14 +5730,16 @@ export interface DescribeInstanceAssociationsStatusResult {
57005730
export interface InstanceInformationStringFilter {
57015731
/**
57025732
* <p>The filter key name to describe your managed nodes. For example:</p>
5703-
* <p>"InstanceIds"|"AgentVersion"|"PingStatus"|"PlatformTypes"|"ActivationIds"|"IamRole"|"ResourceType"|"AssociationStatus"|"Tag
5704-
* Key"</p>
5733+
* <p>"InstanceIds" | "AgentVersion" | "PingStatus" | "PlatformTypes" | "ActivationIds" |
5734+
* "IamRole" | "ResourceType" | "AssociationStatus" | "tag-key" | "tag:<code>{keyname}</code>
5735+
* </p>
57055736
* <important>
57065737
* <p>
5707-
* <code>Tag key</code> isn't a valid filter. You must specify either <code>tag-key</code> or
5708-
* <code>tag:keyname</code> and a string. Here are some valid examples: tag-key, tag:123, tag:al!,
5709-
* tag:Windows. Here are some <i>invalid</i> examples: tag-keys, Tag Key, tag:,
5710-
* tagKey, abc:keyname.</p>
5738+
* <code>Tag Key</code> isn't a valid filter. You must specify either <code>tag-key</code> or
5739+
* <code>tag:{keyname}</code> and a string. Here are some valid examples: <code>tag-key</code>,
5740+
* <code>tag:123</code>, <code>tag:al!</code>, <code>tag:Windows</code>. Here are some
5741+
* <i>invalid</i> examples: <code>tag-keys</code>, <code>Tag Key</code>,
5742+
* <code>tag:</code>, <code>tagKey</code>, <code>abc:keyname</code>.</p>
57115743
* </important>
57125744
*/
57135745
Key: string | undefined;
@@ -5762,8 +5794,8 @@ export interface DescribeInstanceInformationRequest {
57625794

57635795
/**
57645796
* <p>One or more filters. Use a filter to return a more specific list of managed nodes. You can
5765-
* filter based on tags applied to EC2 instances. Use this <code>Filters</code> data type instead of
5766-
* <code>InstanceInformationFilterList</code>, which is deprecated.</p>
5797+
* filter based on tags applied to your managed nodes. Use this <code>Filters</code> data type
5798+
* instead of <code>InstanceInformationFilterList</code>, which is deprecated.</p>
57675799
*/
57685800
Filters?: InstanceInformationStringFilter[];
57695801

@@ -7807,29 +7839,6 @@ export interface DescribeParametersRequest {
78077839
NextToken?: string;
78087840
}
78097841

7810-
/**
7811-
* <p>One or more policies assigned to a parameter.</p>
7812-
*/
7813-
export interface ParameterInlinePolicy {
7814-
/**
7815-
* <p>The JSON text of the policy.</p>
7816-
*/
7817-
PolicyText?: string;
7818-
7819-
/**
7820-
* <p>The type of policy. Parameter Store, a capability of Amazon Web Services Systems Manager, supports the following
7821-
* policy types: Expiration, ExpirationNotification, and NoChangeNotification. </p>
7822-
*/
7823-
PolicyType?: string;
7824-
7825-
/**
7826-
* <p>The status of the policy. Policies report the following statuses: Pending (the policy hasn't
7827-
* been enforced or applied yet), Finished (the policy was applied), Failed (the policy wasn't
7828-
* applied), or InProgress (the policy is being applied now). </p>
7829-
*/
7830-
PolicyStatus?: string;
7831-
}
7832-
78337842
/**
78347843
* @internal
78357844
*/
@@ -9262,10 +9271,3 @@ export const ParameterStringFilterFilterSensitiveLog = (obj: ParameterStringFilt
92629271
export const DescribeParametersRequestFilterSensitiveLog = (obj: DescribeParametersRequest): any => ({
92639272
...obj,
92649273
});
9265-
9266-
/**
9267-
* @internal
9268-
*/
9269-
export const ParameterInlinePolicyFilterSensitiveLog = (obj: ParameterInlinePolicy): any => ({
9270-
...obj,
9271-
});

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

Lines changed: 31 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ import {
3131
OpsItemDataValue,
3232
OpsItemNotification,
3333
OpsItemStatus,
34-
ParameterInlinePolicy,
3534
ParameterStringFilter,
3635
PatchAction,
3736
PatchComplianceLevel,
@@ -55,6 +54,29 @@ import {
5554
} from "./models_0";
5655
import { SSMServiceException as __BaseException } from "./SSMServiceException";
5756

57+
/**
58+
* <p>One or more policies assigned to a parameter.</p>
59+
*/
60+
export interface ParameterInlinePolicy {
61+
/**
62+
* <p>The JSON text of the policy.</p>
63+
*/
64+
PolicyText?: string;
65+
66+
/**
67+
* <p>The type of policy. Parameter Store, a capability of Amazon Web Services Systems Manager, supports the following
68+
* policy types: Expiration, ExpirationNotification, and NoChangeNotification. </p>
69+
*/
70+
PolicyType?: string;
71+
72+
/**
73+
* <p>The status of the policy. Policies report the following statuses: Pending (the policy hasn't
74+
* been enforced or applied yet), Finished (the policy was applied), Failed (the policy wasn't
75+
* applied), or InProgress (the policy is being applied now). </p>
76+
*/
77+
PolicyStatus?: string;
78+
}
79+
5880
export enum ParameterTier {
5981
ADVANCED = "Advanced",
6082
INTELLIGENT_TIERING = "Intelligent-Tiering",
@@ -7797,6 +7819,9 @@ export interface SendCommandRequest {
77977819
/**
77987820
* <p>The ARN of the Identity and Access Management (IAM) service role to use to publish
77997821
* Amazon Simple Notification Service (Amazon SNS) notifications for Run Command commands.</p>
7822+
* <p>This role must provide the <code>sns:Publish</code> permission for your notification topic.
7823+
* For information about creating and using this service role, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/monitoring-sns-notifications.html">Monitoring Systems Manager status changes using Amazon SNS notifications</a> in the
7824+
* <i>Amazon Web Services Systems Manager User Guide</i>.</p>
78007825
*/
78017826
ServiceRoleArn?: string;
78027827

@@ -8210,8 +8235,7 @@ export interface StartSessionResponse {
82108235
SessionId?: string;
82118236

82128237
/**
8213-
* <p>An encrypted token value containing session and caller information. Used to authenticate the
8214-
* connection to the managed node.</p>
8238+
* <p>An encrypted token value containing session and caller information. This token is used to authenticate the connection to the managed node, and is valid only long enough to ensure the connection is successful. Never share your session's token.</p>
82158239
*/
82168240
TokenValue?: string;
82178241

@@ -8788,19 +8812,11 @@ export enum DocumentReviewAction {
87888812
}
87898813

87908814
/**
8791-
* <p>Information about a document approval review.</p>
8815+
* @internal
87928816
*/
8793-
export interface DocumentReviews {
8794-
/**
8795-
* <p>The action to take on a document approval review request.</p>
8796-
*/
8797-
Action: DocumentReviewAction | string | undefined;
8798-
8799-
/**
8800-
* <p>A comment entered by a user in your organization about the document review request.</p>
8801-
*/
8802-
Comment?: DocumentReviewCommentSource[];
8803-
}
8817+
export const ParameterInlinePolicyFilterSensitiveLog = (obj: ParameterInlinePolicy): any => ({
8818+
...obj,
8819+
});
88048820

88058821
/**
88068822
* @internal
@@ -10352,10 +10368,3 @@ export const DocumentDefaultVersionDescriptionFilterSensitiveLog = (obj: Documen
1035210368
export const UpdateDocumentDefaultVersionResultFilterSensitiveLog = (obj: UpdateDocumentDefaultVersionResult): any => ({
1035310369
...obj,
1035410370
});
10355-
10356-
/**
10357-
* @internal
10358-
*/
10359-
export const DocumentReviewsFilterSensitiveLog = (obj: DocumentReviews): any => ({
10360-
...obj,
10361-
});

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

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ import {
2121
Target,
2222
} from "./models_0";
2323
import {
24-
DocumentReviews,
24+
DocumentReviewAction,
25+
DocumentReviewCommentSource,
2526
InventoryFilter,
2627
InventoryGroup,
2728
MaintenanceWindowTaskInvocationParameters,
@@ -32,6 +33,21 @@ import {
3233
} from "./models_1";
3334
import { SSMServiceException as __BaseException } from "./SSMServiceException";
3435

36+
/**
37+
* <p>Information about a document approval review.</p>
38+
*/
39+
export interface DocumentReviews {
40+
/**
41+
* <p>The action to take on a document approval review request.</p>
42+
*/
43+
Action: DocumentReviewAction | string | undefined;
44+
45+
/**
46+
* <p>A comment entered by a user in your organization about the document review request.</p>
47+
*/
48+
Comment?: DocumentReviewCommentSource[];
49+
}
50+
3551
export interface UpdateDocumentMetadataRequest {
3652
/**
3753
* <p>The name of the change template for which a version's metadata is to be updated.</p>
@@ -1147,6 +1163,13 @@ export interface GetOpsSummaryRequest {
11471163
MaxResults?: number;
11481164
}
11491165

1166+
/**
1167+
* @internal
1168+
*/
1169+
export const DocumentReviewsFilterSensitiveLog = (obj: DocumentReviews): any => ({
1170+
...obj,
1171+
});
1172+
11501173
/**
11511174
* @internal
11521175
*/

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

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -601,6 +601,7 @@ import {
601601
InvalidResourceId,
602602
InvalidResourceType,
603603
InvalidSchedule,
604+
InvalidTag,
604605
InvalidTarget,
605606
InvalidTargetMaps,
606607
InvalidTypeNameException,
@@ -634,7 +635,6 @@ import {
634635
OpsMetadataNotFoundException,
635636
OpsMetadataTooManyUpdatesException,
636637
OutputSource,
637-
ParameterInlinePolicy,
638638
ParameterNotFound,
639639
ParametersFilter,
640640
ParameterStringFilter,
@@ -725,7 +725,6 @@ import {
725725
DocumentPermissionLimit,
726726
DocumentReviewCommentSource,
727727
DocumentReviewerResponseSource,
728-
DocumentReviews,
729728
DocumentVersionInfo,
730729
DocumentVersionLimitExceeded,
731730
DuplicateDocumentContent,
@@ -870,6 +869,7 @@ import {
870869
Parameter,
871870
ParameterAlreadyExists,
872871
ParameterHistory,
872+
ParameterInlinePolicy,
873873
ParameterLimitExceeded,
874874
ParameterMaxVersionLimitExceeded,
875875
ParameterMetadata,
@@ -947,6 +947,7 @@ import {
947947
UpdateDocumentResult,
948948
} from "../models/models_1";
949949
import {
950+
DocumentReviews,
950951
GetInventoryRequest,
951952
GetOpsSummaryRequest,
952953
InventoryAggregator,
@@ -3029,6 +3030,9 @@ const deserializeAws_json1_1CreateAssociationCommandError = async (
30293030
case "InvalidSchedule":
30303031
case "com.amazonaws.ssm#InvalidSchedule":
30313032
throw await deserializeAws_json1_1InvalidScheduleResponse(parsedOutput, context);
3033+
case "InvalidTag":
3034+
case "com.amazonaws.ssm#InvalidTag":
3035+
throw await deserializeAws_json1_1InvalidTagResponse(parsedOutput, context);
30323036
case "InvalidTarget":
30333037
case "com.amazonaws.ssm#InvalidTarget":
30343038
throw await deserializeAws_json1_1InvalidTargetResponse(parsedOutput, context);
@@ -10310,6 +10314,19 @@ const deserializeAws_json1_1InvalidScheduleResponse = async (
1031010314
return __decorateServiceException(exception, body);
1031110315
};
1031210316

10317+
const deserializeAws_json1_1InvalidTagResponse = async (
10318+
parsedOutput: any,
10319+
context: __SerdeContext
10320+
): Promise<InvalidTag> => {
10321+
const body = parsedOutput.body;
10322+
const deserialized: any = deserializeAws_json1_1InvalidTag(body, context);
10323+
const exception = new InvalidTag({
10324+
$metadata: deserializeMetadata(parsedOutput),
10325+
...deserialized,
10326+
});
10327+
return __decorateServiceException(exception, body);
10328+
};
10329+
1031310330
const deserializeAws_json1_1InvalidTargetResponse = async (
1031410331
parsedOutput: any,
1031510332
context: __SerdeContext
@@ -11401,6 +11418,7 @@ const serializeAws_json1_1CreateAssociationRequest = (
1140111418
...(input.ScheduleExpression != null && { ScheduleExpression: input.ScheduleExpression }),
1140211419
...(input.ScheduleOffset != null && { ScheduleOffset: input.ScheduleOffset }),
1140311420
...(input.SyncCompliance != null && { SyncCompliance: input.SyncCompliance }),
11421+
...(input.Tags != null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }),
1140411422
...(input.TargetLocations != null && {
1140511423
TargetLocations: serializeAws_json1_1TargetLocations(input.TargetLocations, context),
1140611424
}),
@@ -17183,6 +17201,12 @@ const deserializeAws_json1_1InvalidSchedule = (output: any, context: __SerdeCont
1718317201
} as any;
1718417202
};
1718517203

17204+
const deserializeAws_json1_1InvalidTag = (output: any, context: __SerdeContext): InvalidTag => {
17205+
return {
17206+
Message: __expectString(output.Message),
17207+
} as any;
17208+
};
17209+
1718617210
const deserializeAws_json1_1InvalidTarget = (output: any, context: __SerdeContext): InvalidTarget => {
1718717211
return {
1718817212
Message: __expectString(output.Message),

0 commit comments

Comments
 (0)