Skip to content

Commit e8b6d98

Browse files
author
awstools
committed
feat(client-ssm): Added offset support for specifying the number of days to wait after the date and time specified by a CRON expression when creating SSM association.
1 parent 047ace0 commit e8b6d98

File tree

6 files changed

+120
-11
lines changed

6 files changed

+120
-11
lines changed

clients/client-ssm/src/SSM.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,7 @@ import { SSMClient } from "./SSMClient";
707707
export class SSM extends SSMClient {
708708
/**
709709
* <p>Adds or overwrites one or more tags for the specified resource. Tags are metadata that you
710-
* can assign to your documents, managed nodes, maintenance windows, Parameter Store parameters, and
710+
* can assign to your automations, documents, managed nodes, maintenance windows, Parameter Store parameters, and
711711
* patch baselines. Tags enable you to categorize your resources in different ways, for example, by
712712
* purpose, owner, or environment. Each tag consists of a key and an optional value, both of which
713713
* you define. For example, you could define a set of tags for your account's managed nodes that
@@ -744,11 +744,11 @@ export class SSM extends SSMClient {
744744
* </p>
745745
* </li>
746746
* </ul>
747-
* <p>Each resource can have a maximum of 50 tags.</p>
747+
* <p>Most resources can have a maximum of 50 tags. Automations can have a maximum of 5 tags.</p>
748748
* <p>We recommend that you devise a set of tag keys that meets your needs for each resource type.
749749
* Using a consistent set of tag keys makes it easier for you to manage your resources. You can
750750
* search and filter the resources based on the tags you add. Tags don't have any semantic meaning
751-
* to and are interpreted strictly as a string of characters. </p>
751+
* to and are interpreted strictly as a string of characters.</p>
752752
* <p>For more information about using tags with Amazon Elastic Compute Cloud (Amazon EC2) instances, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html">Tagging your Amazon EC2
753753
* resources</a> in the <i>Amazon EC2 User Guide</i>.</p>
754754
*/

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export interface AddTagsToResourceCommandOutput extends AddTagsToResourceResult,
2323

2424
/**
2525
* <p>Adds or overwrites one or more tags for the specified resource. Tags are metadata that you
26-
* can assign to your documents, managed nodes, maintenance windows, Parameter Store parameters, and
26+
* can assign to your automations, documents, managed nodes, maintenance windows, Parameter Store parameters, and
2727
* patch baselines. Tags enable you to categorize your resources in different ways, for example, by
2828
* purpose, owner, or environment. Each tag consists of a key and an optional value, both of which
2929
* you define. For example, you could define a set of tags for your account's managed nodes that
@@ -60,11 +60,11 @@ export interface AddTagsToResourceCommandOutput extends AddTagsToResourceResult,
6060
* </p>
6161
* </li>
6262
* </ul>
63-
* <p>Each resource can have a maximum of 50 tags.</p>
63+
* <p>Most resources can have a maximum of 50 tags. Automations can have a maximum of 5 tags.</p>
6464
* <p>We recommend that you devise a set of tag keys that meets your needs for each resource type.
6565
* Using a consistent set of tag keys makes it easier for you to manage your resources. You can
6666
* search and filter the resources based on the tags you add. Tags don't have any semantic meaning
67-
* to and are interpreted strictly as a string of characters. </p>
67+
* to and are interpreted strictly as a string of characters.</p>
6868
* <p>For more information about using tags with Amazon Elastic Compute Cloud (Amazon EC2) instances, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html">Tagging your Amazon EC2
6969
* resources</a> in the <i>Amazon EC2 User Guide</i>.</p>
7070
* @example

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

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,9 @@ export interface AddTagsToResourceRequest {
155155
* <code>PatchBaseline</code>: <code>pb-012345abcde</code>
156156
* </p>
157157
* <p>
158+
* <code>Automation</code>: <code>example-c160-4567-8519-012345abcde</code>
159+
* </p>
160+
* <p>
158161
* <code>OpsMetadata</code> object: <code>ResourceID</code> for tagging is created from the
159162
* Amazon Resource Name (ARN) for the object. Specifically, <code>ResourceID</code> is created from
160163
* the strings that come after the word <code>opsmetadata</code> in the ARN. For example, an
@@ -1228,6 +1231,17 @@ export interface CreateAssociationRequest {
12281231
* accounts.</p>
12291232
*/
12301233
TargetLocations?: TargetLocation[];
1234+
1235+
/**
1236+
* <p>Number of days to wait after the scheduled day to run an association. For example, if you
1237+
* specified a cron schedule of <code>cron(0 0 ? * THU#2 *)</code>, you could specify an offset of 3
1238+
* to run the association each Sunday after the second Thursday of the month. For more information about cron schedules for associations, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/reference-cron-and-rate-expressions.html">Reference: Cron and rate expressions for Systems Manager</a> in the <i>Amazon Web Services Systems Manager User Guide</i>. </p>
1239+
* <note>
1240+
* <p>To use offsets, you must specify the <code>ApplyOnlyAtCronInterval</code> parameter. This
1241+
* option tells the system not to run an association immediately after you create it. </p>
1242+
* </note>
1243+
*/
1244+
ScheduleOffset?: number;
12311245
}
12321246

12331247
export namespace CreateAssociationRequest {
@@ -1468,6 +1482,11 @@ export interface AssociationDescription {
14681482
* association.</p>
14691483
*/
14701484
TargetLocations?: TargetLocation[];
1485+
1486+
/**
1487+
* <p>Number of days to wait after the scheduled day to run an association.</p>
1488+
*/
1489+
ScheduleOffset?: number;
14711490
}
14721491

14731492
export namespace AssociationDescription {
@@ -1772,6 +1791,11 @@ export interface CreateAssociationBatchRequestEntry {
17721791
* <p>Use this action to create an association in multiple Regions and multiple accounts.</p>
17731792
*/
17741793
TargetLocations?: TargetLocation[];
1794+
1795+
/**
1796+
* <p>Number of days to wait after the scheduled day to run an association.</p>
1797+
*/
1798+
ScheduleOffset?: number;
17751799
}
17761800

17771801
export namespace CreateAssociationBatchRequestEntry {

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

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4518,6 +4518,11 @@ export interface Association {
45184518
* <p>The association name.</p>
45194519
*/
45204520
AssociationName?: string;
4521+
4522+
/**
4523+
* <p>Number of days to wait after the scheduled day to run an association.</p>
4524+
*/
4525+
ScheduleOffset?: number;
45214526
}
45224527

45234528
export namespace Association {
@@ -4702,6 +4707,11 @@ export interface AssociationVersionInfo {
47024707
* when this association version was created.</p>
47034708
*/
47044709
TargetLocations?: TargetLocation[];
4710+
4711+
/**
4712+
* <p>Number of days to wait after the scheduled day to run an association.</p>
4713+
*/
4714+
ScheduleOffset?: number;
47054715
}
47064716

47074717
export namespace AssociationVersionInfo {
@@ -8971,6 +8981,9 @@ export interface RemoveTagsFromResourceRequest {
89718981
* <p>The ID of the resource from which you want to remove tags. For example:</p>
89728982
* <p>ManagedInstance: mi-012345abcde</p>
89738983
* <p>MaintenanceWindow: mw-012345abcde</p>
8984+
* <p>
8985+
* <code>Automation</code>: <code>example-c160-4567-8519-012345abcde</code>
8986+
* </p>
89748987
* <p>PatchBaseline: pb-012345abcde</p>
89758988
* <p>OpsMetadata object: <code>ResourceID</code> for tagging is created from the Amazon Resource
89768989
* Name (ARN) for the object. Specifically, <code>ResourceID</code> is created from the strings that
@@ -9700,7 +9713,7 @@ export interface StartAutomationExecutionRequest {
97009713
* </li>
97019714
* </ul>
97029715
* <note>
9703-
* <p>To add tags to an existing patch baseline, use the <a>AddTagsToResource</a>
9716+
* <p>To add tags to an existing automation, use the <a>AddTagsToResource</a>
97049717
* operation.</p>
97059718
* </note>
97069719
*/
@@ -10314,6 +10327,17 @@ export interface UpdateAssociationRequest {
1031410327
* accounts.</p>
1031510328
*/
1031610329
TargetLocations?: TargetLocation[];
10330+
10331+
/**
10332+
* <p>Number of days to wait after the scheduled day to run an association. For example, if you
10333+
* specified a cron schedule of <code>cron(0 0 ? * THU#2 *)</code>, you could specify an offset of 3
10334+
* to run the association each Sunday after the second Thursday of the month. For more information about cron schedules for associations, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/reference-cron-and-rate-expressions.html">Reference: Cron and rate expressions for Systems Manager</a> in the <i>Amazon Web Services Systems Manager User Guide</i>. </p>
10335+
* <note>
10336+
* <p>To use offsets, you must specify the <code>ApplyOnlyAtCronInterval</code> parameter. This
10337+
* option tells the system not to run an association immediately after you create it. </p>
10338+
* </note>
10339+
*/
10340+
ScheduleOffset?: number;
1031710341
}
1031810342

1031910343
export namespace UpdateAssociationRequest {

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11705,6 +11705,8 @@ const serializeAws_json1_1CreateAssociationBatchRequestEntry = (
1170511705
input.Parameters !== null && { Parameters: serializeAws_json1_1Parameters(input.Parameters, context) }),
1170611706
...(input.ScheduleExpression !== undefined &&
1170711707
input.ScheduleExpression !== null && { ScheduleExpression: input.ScheduleExpression }),
11708+
...(input.ScheduleOffset !== undefined &&
11709+
input.ScheduleOffset !== null && { ScheduleOffset: input.ScheduleOffset }),
1170811710
...(input.SyncCompliance !== undefined &&
1170911711
input.SyncCompliance !== null && { SyncCompliance: input.SyncCompliance }),
1171011712
...(input.TargetLocations !== undefined &&
@@ -11750,6 +11752,8 @@ const serializeAws_json1_1CreateAssociationRequest = (
1175011752
input.Parameters !== null && { Parameters: serializeAws_json1_1Parameters(input.Parameters, context) }),
1175111753
...(input.ScheduleExpression !== undefined &&
1175211754
input.ScheduleExpression !== null && { ScheduleExpression: input.ScheduleExpression }),
11755+
...(input.ScheduleOffset !== undefined &&
11756+
input.ScheduleOffset !== null && { ScheduleOffset: input.ScheduleOffset }),
1175311757
...(input.SyncCompliance !== undefined &&
1175411758
input.SyncCompliance !== null && { SyncCompliance: input.SyncCompliance }),
1175511759
...(input.TargetLocations !== undefined &&
@@ -14861,6 +14865,8 @@ const serializeAws_json1_1UpdateAssociationRequest = (
1486114865
input.Parameters !== null && { Parameters: serializeAws_json1_1Parameters(input.Parameters, context) }),
1486214866
...(input.ScheduleExpression !== undefined &&
1486314867
input.ScheduleExpression !== null && { ScheduleExpression: input.ScheduleExpression }),
14868+
...(input.ScheduleOffset !== undefined &&
14869+
input.ScheduleOffset !== null && { ScheduleOffset: input.ScheduleOffset }),
1486414870
...(input.SyncCompliance !== undefined &&
1486514871
input.SyncCompliance !== null && { SyncCompliance: input.SyncCompliance }),
1486614872
...(input.TargetLocations !== undefined &&
@@ -15259,6 +15265,7 @@ const deserializeAws_json1_1Association = (output: any, context: __SerdeContext)
1525915265
? deserializeAws_json1_1AssociationOverview(output.Overview, context)
1526015266
: undefined,
1526115267
ScheduleExpression: __expectString(output.ScheduleExpression),
15268+
ScheduleOffset: __expectInt32(output.ScheduleOffset),
1526215269
Targets:
1526315270
output.Targets !== undefined && output.Targets !== null
1526415271
? deserializeAws_json1_1Targets(output.Targets, context)
@@ -15319,6 +15326,7 @@ const deserializeAws_json1_1AssociationDescription = (output: any, context: __Se
1531915326
? deserializeAws_json1_1Parameters(output.Parameters, context)
1532015327
: undefined,
1532115328
ScheduleExpression: __expectString(output.ScheduleExpression),
15329+
ScheduleOffset: __expectInt32(output.ScheduleOffset),
1532215330
Status:
1532315331
output.Status !== undefined && output.Status !== null
1532415332
? deserializeAws_json1_1AssociationStatus(output.Status, context)
@@ -15525,6 +15533,7 @@ const deserializeAws_json1_1AssociationVersionInfo = (output: any, context: __Se
1552515533
? deserializeAws_json1_1Parameters(output.Parameters, context)
1552615534
: undefined,
1552715535
ScheduleExpression: __expectString(output.ScheduleExpression),
15536+
ScheduleOffset: __expectInt32(output.ScheduleOffset),
1552815537
SyncCompliance: __expectString(output.SyncCompliance),
1552915538
TargetLocations:
1553015539
output.TargetLocations !== undefined && output.TargetLocations !== null
@@ -16173,6 +16182,7 @@ const deserializeAws_json1_1CreateAssociationBatchRequestEntry = (
1617316182
? deserializeAws_json1_1Parameters(output.Parameters, context)
1617416183
: undefined,
1617516184
ScheduleExpression: __expectString(output.ScheduleExpression),
16185+
ScheduleOffset: __expectInt32(output.ScheduleOffset),
1617616186
SyncCompliance: __expectString(output.SyncCompliance),
1617716187
TargetLocations:
1617816188
output.TargetLocations !== undefined && output.TargetLocations !== null

0 commit comments

Comments
 (0)