Skip to content

Commit c587e27

Browse files
author
awstools
committedJan 31, 2024
feat(client-ssm): This release adds an optional Duration parameter to StateManager Associations. This allows customers to specify how long an apply-only-on-cron association execution should run. Once the specified Duration is out all the ongoing cancellable commands or automations are cancelled.
1 parent 1751692 commit c587e27

13 files changed

+181
-25
lines changed
 

‎clients/client-ssm/src/commands/CreateAssociationBatchCommand.ts

+3
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ export interface CreateAssociationBatchCommandOutput extends CreateAssociationBa
105105
* },
106106
* ],
107107
* ScheduleOffset: Number("int"),
108+
* Duration: Number("int"),
108109
* TargetMaps: [ // TargetMaps
109110
* { // TargetMap
110111
* "<keys>": [ // TargetMapValueList
@@ -203,6 +204,7 @@ export interface CreateAssociationBatchCommandOutput extends CreateAssociationBa
203204
* // },
204205
* // ],
205206
* // ScheduleOffset: Number("int"),
207+
* // Duration: Number("int"),
206208
* // TargetMaps: [ // TargetMaps
207209
* // { // TargetMap
208210
* // "<keys>": [ // TargetMapValueList
@@ -278,6 +280,7 @@ export interface CreateAssociationBatchCommandOutput extends CreateAssociationBa
278280
* // },
279281
* // ],
280282
* // ScheduleOffset: Number("int"),
283+
* // Duration: Number("int"),
281284
* // TargetMaps: [
282285
* // {
283286
* // "<keys>": [

‎clients/client-ssm/src/commands/CreateAssociationCommand.ts

+2
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ export interface CreateAssociationCommandOutput extends CreateAssociationResult,
106106
* },
107107
* ],
108108
* ScheduleOffset: Number("int"),
109+
* Duration: Number("int"),
109110
* TargetMaps: [ // TargetMaps
110111
* { // TargetMap
111112
* "<keys>": [ // TargetMapValueList
@@ -207,6 +208,7 @@ export interface CreateAssociationCommandOutput extends CreateAssociationResult,
207208
* // },
208209
* // ],
209210
* // ScheduleOffset: Number("int"),
211+
* // Duration: Number("int"),
210212
* // TargetMaps: [ // TargetMaps
211213
* // { // TargetMap
212214
* // "<keys>": [ // TargetMapValueList

‎clients/client-ssm/src/commands/DescribeAssociationCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ export interface DescribeAssociationCommandOutput extends DescribeAssociationRes
126126
* // },
127127
* // ],
128128
* // ScheduleOffset: Number("int"),
129+
* // Duration: Number("int"),
129130
* // TargetMaps: [ // TargetMaps
130131
* // { // TargetMap
131132
* // "<keys>": [ // TargetMapValueList

‎clients/client-ssm/src/commands/DescribeAvailablePatchesCommand.ts

+4
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ export interface DescribeAvailablePatchesCommandOutput extends DescribeAvailable
2929
/**
3030
* @public
3131
* <p>Lists all patches eligible to be included in a patch baseline.</p>
32+
* <note>
33+
* <p>Currently, <code>DescribeAvailablePatches</code> supports only the Amazon Linux 1, Amazon
34+
* Linux 2, and Windows Server operating systems.</p>
35+
* </note>
3236
* @example
3337
* Use a bare-bones client and the command you need to make an API call.
3438
* ```javascript

‎clients/client-ssm/src/commands/ListAssociationVersionsCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ export interface ListAssociationVersionsCommandOutput extends ListAssociationVer
106106
* // },
107107
* // ],
108108
* // ScheduleOffset: Number("int"),
109+
* // Duration: Number("int"),
109110
* // TargetMaps: [ // TargetMaps
110111
* // { // TargetMap
111112
* // "<keys>": [ // TargetMapValueList

‎clients/client-ssm/src/commands/ListAssociationsCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ export interface ListAssociationsCommandOutput extends ListAssociationsResult, _
7676
* // ScheduleExpression: "STRING_VALUE",
7777
* // AssociationName: "STRING_VALUE",
7878
* // ScheduleOffset: Number("int"),
79+
* // Duration: Number("int"),
7980
* // TargetMaps: [ // TargetMaps
8081
* // { // TargetMap
8182
* // "<keys>": [ // TargetMapValueList

‎clients/client-ssm/src/commands/UpdateAssociationCommand.ts

+2
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ export interface UpdateAssociationCommandOutput extends UpdateAssociationResult,
117117
* },
118118
* ],
119119
* ScheduleOffset: Number("int"),
120+
* Duration: Number("int"),
120121
* TargetMaps: [ // TargetMaps
121122
* { // TargetMap
122123
* "<keys>": [ // TargetMapValueList
@@ -212,6 +213,7 @@ export interface UpdateAssociationCommandOutput extends UpdateAssociationResult,
212213
* // },
213214
* // ],
214215
* // ScheduleOffset: Number("int"),
216+
* // Duration: Number("int"),
215217
* // TargetMaps: [ // TargetMaps
216218
* // { // TargetMap
217219
* // "<keys>": [ // TargetMapValueList

‎clients/client-ssm/src/commands/UpdateAssociationStatusCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ export interface UpdateAssociationStatusCommandOutput extends UpdateAssociationS
133133
* // },
134134
* // ],
135135
* // ScheduleOffset: Number("int"),
136+
* // Duration: Number("int"),
136137
* // TargetMaps: [ // TargetMaps
137138
* // { // TargetMap
138139
* // "<keys>": [ // TargetMapValueList

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

+58-2
Original file line numberDiff line numberDiff line change
@@ -1329,6 +1329,28 @@ export interface CreateAssociationRequest {
13291329
*/
13301330
ScheduleOffset?: number;
13311331

1332+
/**
1333+
* @public
1334+
* <p>The number of hours the association can run before it is canceled. Duration applies to
1335+
* associations that are currently running, and any pending and in progress commands on all targets.
1336+
* If a target was taken offline for the association to run, it is made available again immediately,
1337+
* without a reboot. </p>
1338+
* <p>The <code>Duration</code> parameter applies only when both these conditions are true:</p>
1339+
* <ul>
1340+
* <li>
1341+
* <p>The association for which you specify a duration is cancelable according to the parameters
1342+
* of the SSM command document or Automation runbook associated with this execution. </p>
1343+
* </li>
1344+
* <li>
1345+
* <p>The command specifies the <code>
1346+
* <a href="https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_CreateAssociation.html#systemsmanager-CreateAssociation-request-ApplyOnlyAtCronInterval">ApplyOnlyAtCronInterval</a>
1347+
* </code> parameter, which means that the association doesn't
1348+
* run immediately after it is created, but only according to the specified schedule.</p>
1349+
* </li>
1350+
* </ul>
1351+
*/
1352+
Duration?: number;
1353+
13321354
/**
13331355
* @public
13341356
* <p>A key-value mapping of document parameters to target resources. Both Targets and TargetMaps
@@ -1613,6 +1635,14 @@ export interface AssociationDescription {
16131635
*/
16141636
ScheduleOffset?: number;
16151637

1638+
/**
1639+
* @public
1640+
* <p>The number of hours that an association can run on specified targets. After the resulting
1641+
* cutoff time passes, associations that are currently running are cancelled, and no pending
1642+
* executions are started on remaining targets.</p>
1643+
*/
1644+
Duration?: number;
1645+
16161646
/**
16171647
* @public
16181648
* <p>A key-value mapping of document parameters to target resources. Both Targets and TargetMaps
@@ -1993,6 +2023,28 @@ export interface CreateAssociationBatchRequestEntry {
19932023
*/
19942024
ScheduleOffset?: number;
19952025

2026+
/**
2027+
* @public
2028+
* <p>The number of hours the association can run before it is canceled. Duration applies to
2029+
* associations that are currently running, and any pending and in progress commands on all targets.
2030+
* If a target was taken offline for the association to run, it is made available again immediately,
2031+
* without a reboot. </p>
2032+
* <p>The <code>Duration</code> parameter applies only when both these conditions are true:</p>
2033+
* <ul>
2034+
* <li>
2035+
* <p>The association for which you specify a duration is cancelable according to the parameters
2036+
* of the SSM command document or Automation runbook associated with this execution. </p>
2037+
* </li>
2038+
* <li>
2039+
* <p>The command specifies the <code>
2040+
* <a href="https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_CreateAssociationBatchRequestEntry.html#systemsmanager-Type-CreateAssociationBatchRequestEntry-ApplyOnlyAtCronInterval">ApplyOnlyAtCronInterval</a>
2041+
* </code> parameter, which means that the association doesn't
2042+
* run immediately after it is created, but only according to the specified schedule.</p>
2043+
* </li>
2044+
* </ul>
2045+
*/
2046+
Duration?: number;
2047+
19962048
/**
19972049
* @public
19982050
* <p>A key-value mapping of document parameters to target resources. Both Targets and TargetMaps
@@ -2217,7 +2269,7 @@ export interface DocumentRequires {
22172269
/**
22182270
* @public
22192271
* <p>An optional field specifying the version of the artifact associated with the document. For
2220-
* example, "Release 12, Update 6". This value is unique across all versions of a document, and
2272+
* example, 12.6. This value is unique across all versions of a document, and
22212273
* can't be changed.</p>
22222274
*/
22232275
VersionName?: string;
@@ -6810,7 +6862,7 @@ export interface DescribeDocumentRequest {
68106862
/**
68116863
* @public
68126864
* <p>An optional field specifying the version of the artifact associated with the document. For
6813-
* example, "Release 12, Update 6". This value is unique across all versions of a document, and
6865+
* example, 12.6. This value is unique across all versions of a document, and
68146866
* can't be changed.</p>
68156867
*/
68166868
VersionName?: string;
@@ -7794,6 +7846,10 @@ export interface PatchComplianceData {
77947846
* @public
77957847
* <p>The IDs of one or more Common Vulnerabilities and Exposure (CVE) issues that are resolved by
77967848
* the patch.</p>
7849+
* <note>
7850+
* <p>Currently, CVE ID values are reported only for patches with a status of
7851+
* <code>Missing</code> or <code>Failed</code>.</p>
7852+
* </note>
77977853
*/
77987854
CVEIds?: string;
77997855
}

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

+25-10
Original file line numberDiff line numberDiff line change
@@ -739,7 +739,8 @@ export interface ParameterMetadata {
739739

740740
/**
741741
* @public
742-
* <p>The ID of the query key used for this parameter.</p>
742+
* <p>The alias of the Key Management Service (KMS) key used to encrypt the
743+
* parameter. Applies to <code>SecureString</code> parameters only.</p>
743744
*/
744745
KeyId?: string;
745746

@@ -2262,8 +2263,7 @@ export interface GetConnectionStatusResponse {
22622263

22632264
/**
22642265
* @public
2265-
* <p>The status of the connection to the managed node. For example, 'Connected' or 'Not
2266-
* Connected'.</p>
2266+
* <p>The status of the connection to the managed node.</p>
22672267
*/
22682268
Status?: ConnectionStatus;
22692269
}
@@ -2461,7 +2461,7 @@ export interface GetDocumentRequest {
24612461
/**
24622462
* @public
24632463
* <p>An optional field specifying the version of the artifact associated with the document. For
2464-
* example, "Release 12, Update 6". This value is unique across all versions of a document and can't
2464+
* example, 12.6. This value is unique across all versions of a document and can't
24652465
* be changed.</p>
24662466
*/
24672467
VersionName?: string;
@@ -2554,8 +2554,7 @@ export interface GetDocumentResult {
25542554

25552555
/**
25562556
* @public
2557-
* <p>The version of the artifact associated with the document. For example, "Release 12, Update
2558-
* 6". This value is unique across all versions of a document, and can't be changed.</p>
2557+
* <p>The version of the artifact associated with the document. For example, 12.6. This value is unique across all versions of a document, and can't be changed.</p>
25592558
*/
25602559
VersionName?: string;
25612560

@@ -4434,7 +4433,8 @@ export interface ParameterHistory {
44344433

44354434
/**
44364435
* @public
4437-
* <p>The ID of the query key used for this parameter.</p>
4436+
* <p>The alias of the Key Management Service (KMS) key used to encrypt the
4437+
* parameter. Applies to <code>SecureString</code> parameters only</p>
44384438
*/
44394439
KeyId?: string;
44404440

@@ -5254,6 +5254,14 @@ export interface Association {
52545254
*/
52555255
ScheduleOffset?: number;
52565256

5257+
/**
5258+
* @public
5259+
* <p>The number of hours that an association can run on specified targets. After the resulting
5260+
* cutoff time passes, associations that are currently running are cancelled, and no pending
5261+
* executions are started on remaining targets.</p>
5262+
*/
5263+
Duration?: number;
5264+
52575265
/**
52585266
* @public
52595267
* <p>A key-value mapping of document parameters to target resources. Both Targets and TargetMaps
@@ -5453,6 +5461,14 @@ export interface AssociationVersionInfo {
54535461
*/
54545462
ScheduleOffset?: number;
54555463

5464+
/**
5465+
* @public
5466+
* <p>The number of hours that an association can run on specified targets. After the resulting
5467+
* cutoff time passes, associations that are currently running are cancelled, and no pending
5468+
* executions are started on remaining targets.</p>
5469+
*/
5470+
Duration?: number;
5471+
54565472
/**
54575473
* @public
54585474
* <p>A key-value mapping of document parameters to target resources. Both Targets and TargetMaps
@@ -7225,7 +7241,7 @@ export interface DocumentIdentifier {
72257241
/**
72267242
* @public
72277243
* <p>An optional field specifying the version of the artifact associated with the document. For
7228-
* example, "Release 12, Update 6". This value is unique across all versions of a document, and
7244+
* example, 12.6. This value is unique across all versions of a document, and
72297245
* can't be changed.</p>
72307246
*/
72317247
VersionName?: string;
@@ -7364,8 +7380,7 @@ export interface DocumentVersionInfo {
73647380

73657381
/**
73667382
* @public
7367-
* <p>The version of the artifact associated with the document. For example, "Release 12, Update
7368-
* 6". This value is unique across all versions of a document, and can't be changed.</p>
7383+
* <p>The version of the artifact associated with the document. For example, 12.6. This value is unique across all versions of a document, and can't be changed.</p>
73697384
*/
73707385
VersionName?: string;
73717386

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

+23-1
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,28 @@ export interface UpdateAssociationRequest {
335335
*/
336336
ScheduleOffset?: number;
337337

338+
/**
339+
* @public
340+
* <p>The number of hours the association can run before it is canceled. Duration applies to
341+
* associations that are currently running, and any pending and in progress commands on all targets.
342+
* If a target was taken offline for the association to run, it is made available again immediately,
343+
* without a reboot. </p>
344+
* <p>The <code>Duration</code> parameter applies only when both these conditions are true:</p>
345+
* <ul>
346+
* <li>
347+
* <p>The association for which you specify a duration is cancelable according to the parameters
348+
* of the SSM command document or Automation runbook associated with this execution. </p>
349+
* </li>
350+
* <li>
351+
* <p>The command specifies the <code>
352+
* <a href="https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_UpdateAssociation.html#systemsmanager-UpdateAssociation-request-ApplyOnlyAtCronInterval">ApplyOnlyAtCronInterval</a>
353+
* </code> parameter, which means that the association doesn't
354+
* run immediately after it is updated, but only according to the specified schedule.</p>
355+
* </li>
356+
* </ul>
357+
*/
358+
Duration?: number;
359+
338360
/**
339361
* @public
340362
* <p>A key-value mapping of document parameters to target resources. Both Targets and TargetMaps
@@ -517,7 +539,7 @@ export interface UpdateDocumentRequest {
517539
/**
518540
* @public
519541
* <p>An optional field specifying the version of the artifact you are updating with the document.
520-
* For example, "Release 12, Update 6". This value is unique across all versions of a document, and
542+
* For example, 12.6. This value is unique across all versions of a document, and
521543
* can't be changed.</p>
522544
*/
523545
VersionName?: string;

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

+3
Original file line numberDiff line numberDiff line change
@@ -13198,6 +13198,7 @@ const de_Association = (output: any, context: __SerdeContext): Association => {
1319813198
AssociationName: __expectString,
1319913199
AssociationVersion: __expectString,
1320013200
DocumentVersion: __expectString,
13201+
Duration: __expectInt32,
1320113202
InstanceId: __expectString,
1320213203
LastExecutionDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1320313204
Name: __expectString,
@@ -13226,6 +13227,7 @@ const de_AssociationDescription = (output: any, context: __SerdeContext): Associ
1322613227
ComplianceSeverity: __expectString,
1322713228
Date: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1322813229
DocumentVersion: __expectString,
13230+
Duration: __expectInt32,
1322913231
InstanceId: __expectString,
1323013232
LastExecutionDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1323113233
LastSuccessfulExecutionDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
@@ -13365,6 +13367,7 @@ const de_AssociationVersionInfo = (output: any, context: __SerdeContext): Associ
1336513367
ComplianceSeverity: __expectString,
1336613368
CreatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1336713369
DocumentVersion: __expectString,
13370+
Duration: __expectInt32,
1336813371
MaxConcurrency: __expectString,
1336913372
MaxErrors: __expectString,
1337013373
Name: __expectString,

‎codegen/sdk-codegen/aws-models/ssm.json

+57-12
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)
Please sign in to comment.