Skip to content

Commit

Permalink
feat(client-ssm): This release introduces the ability to filter autom…
Browse files Browse the repository at this point in the history
…ation execution steps which have parent steps. In addition, runbook variable information is returned by GetAutomationExecution and parent step information is returned by the DescribeAutomationStepExecutions API.
  • Loading branch information
awstools committed Nov 16, 2023
1 parent e9e1aaa commit 35113ae
Show file tree
Hide file tree
Showing 13 changed files with 336 additions and 201 deletions.
2 changes: 1 addition & 1 deletion clients/client-ssm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ operations at scale.</p>
</p>
<ul>
<li>
<p>For information about each of the capabilities that comprise Systems Manager, see <a href="https://docs.aws.amazon.com/systems-manager-automation-runbooks/latest/userguide/systems-manager-capabilities.html">Systems Manager capabilities</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
<p>For information about each of the capabilities that comprise Systems Manager, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/what-is-systems-manager.html#systems-manager-capabilities">Systems Manager capabilities</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
</li>
<li>
<p>For details about predefined runbooks for Automation, a capability of Amazon Web Services Systems Manager, see the
Expand Down
2 changes: 1 addition & 1 deletion clients/client-ssm/src/SSM.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3082,7 +3082,7 @@ export interface SSM {
* </p>
* <ul>
* <li>
* <p>For information about each of the capabilities that comprise Systems Manager, see <a href="https://docs.aws.amazon.com/systems-manager-automation-runbooks/latest/userguide/systems-manager-capabilities.html">Systems Manager capabilities</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
* <p>For information about each of the capabilities that comprise Systems Manager, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/what-is-systems-manager.html#systems-manager-capabilities">Systems Manager capabilities</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
* </li>
* <li>
* <p>For details about predefined runbooks for Automation, a capability of Amazon Web Services Systems Manager, see the
Expand Down
2 changes: 1 addition & 1 deletion clients/client-ssm/src/SSMClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -945,7 +945,7 @@ export interface SSMClientResolvedConfig extends SSMClientResolvedConfigType {}
* </p>
* <ul>
* <li>
* <p>For information about each of the capabilities that comprise Systems Manager, see <a href="https://docs.aws.amazon.com/systems-manager-automation-runbooks/latest/userguide/systems-manager-capabilities.html">Systems Manager capabilities</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
* <p>For information about each of the capabilities that comprise Systems Manager, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/what-is-systems-manager.html#systems-manager-capabilities">Systems Manager capabilities</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
* </li>
* <li>
* <p>For details about predefined runbooks for Automation, a capability of Amazon Web Services Systems Manager, see the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export interface DescribeAutomationExecutionsCommandOutput
* // AutomationExecutionId: "STRING_VALUE",
* // DocumentName: "STRING_VALUE",
* // DocumentVersion: "STRING_VALUE",
* // AutomationExecutionStatus: "Pending" || "InProgress" || "Waiting" || "Success" || "TimedOut" || "Cancelling" || "Cancelled" || "Failed" || "PendingApproval" || "Approved" || "Rejected" || "Scheduled" || "RunbookInProgress" || "PendingChangeCalendarOverride" || "ChangeCalendarOverrideApproved" || "ChangeCalendarOverrideRejected" || "CompletedWithSuccess" || "CompletedWithFailure",
* // AutomationExecutionStatus: "Pending" || "InProgress" || "Waiting" || "Success" || "TimedOut" || "Cancelling" || "Cancelled" || "Failed" || "PendingApproval" || "Approved" || "Rejected" || "Scheduled" || "RunbookInProgress" || "PendingChangeCalendarOverride" || "ChangeCalendarOverrideApproved" || "ChangeCalendarOverrideRejected" || "CompletedWithSuccess" || "CompletedWithFailure" || "Exited",
* // ExecutionStartTime: new Date("TIMESTAMP"),
* // ExecutionEndTime: new Date("TIMESTAMP"),
* // ExecutedBy: "STRING_VALUE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export interface DescribeAutomationStepExecutionsCommandOutput
* AutomationExecutionId: "STRING_VALUE", // required
* Filters: [ // StepExecutionFilterList
* { // StepExecutionFilter
* Key: "StartTimeBefore" || "StartTimeAfter" || "StepExecutionStatus" || "StepExecutionId" || "StepName" || "Action", // required
* Key: "StartTimeBefore" || "StartTimeAfter" || "StepExecutionStatus" || "StepExecutionId" || "StepName" || "Action" || "ParentStepExecutionId" || "ParentStepIteration" || "ParentStepIteratorValue", // required
* Values: [ // StepExecutionFilterValueList // required
* "STRING_VALUE",
* ],
Expand All @@ -76,7 +76,7 @@ export interface DescribeAutomationStepExecutionsCommandOutput
* // MaxAttempts: Number("int"),
* // ExecutionStartTime: new Date("TIMESTAMP"),
* // ExecutionEndTime: new Date("TIMESTAMP"),
* // StepStatus: "Pending" || "InProgress" || "Waiting" || "Success" || "TimedOut" || "Cancelling" || "Cancelled" || "Failed" || "PendingApproval" || "Approved" || "Rejected" || "Scheduled" || "RunbookInProgress" || "PendingChangeCalendarOverride" || "ChangeCalendarOverrideApproved" || "ChangeCalendarOverrideRejected" || "CompletedWithSuccess" || "CompletedWithFailure",
* // StepStatus: "Pending" || "InProgress" || "Waiting" || "Success" || "TimedOut" || "Cancelling" || "Cancelled" || "Failed" || "PendingApproval" || "Approved" || "Rejected" || "Scheduled" || "RunbookInProgress" || "PendingChangeCalendarOverride" || "ChangeCalendarOverrideApproved" || "ChangeCalendarOverrideRejected" || "CompletedWithSuccess" || "CompletedWithFailure" || "Exited",
* // ResponseCode: "STRING_VALUE",
* // Inputs: { // NormalStringMap
* // "<keys>": "STRING_VALUE",
Expand Down Expand Up @@ -142,6 +142,13 @@ export interface DescribeAutomationStepExecutionsCommandOutput
* // State: "UNKNOWN" || "ALARM", // required
* // },
* // ],
* // ParentStepDetails: { // ParentStepDetails
* // StepExecutionId: "STRING_VALUE",
* // StepName: "STRING_VALUE",
* // Action: "STRING_VALUE",
* // Iteration: Number("int"),
* // IteratorValue: "STRING_VALUE",
* // },
* // },
* // ],
* // NextToken: "STRING_VALUE",
Expand Down
12 changes: 10 additions & 2 deletions clients/client-ssm/src/commands/GetAutomationExecutionCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export interface GetAutomationExecutionCommandOutput extends GetAutomationExecut
* // DocumentVersion: "STRING_VALUE",
* // ExecutionStartTime: new Date("TIMESTAMP"),
* // ExecutionEndTime: new Date("TIMESTAMP"),
* // AutomationExecutionStatus: "Pending" || "InProgress" || "Waiting" || "Success" || "TimedOut" || "Cancelling" || "Cancelled" || "Failed" || "PendingApproval" || "Approved" || "Rejected" || "Scheduled" || "RunbookInProgress" || "PendingChangeCalendarOverride" || "ChangeCalendarOverrideApproved" || "ChangeCalendarOverrideRejected" || "CompletedWithSuccess" || "CompletedWithFailure",
* // AutomationExecutionStatus: "Pending" || "InProgress" || "Waiting" || "Success" || "TimedOut" || "Cancelling" || "Cancelled" || "Failed" || "PendingApproval" || "Approved" || "Rejected" || "Scheduled" || "RunbookInProgress" || "PendingChangeCalendarOverride" || "ChangeCalendarOverrideApproved" || "ChangeCalendarOverrideRejected" || "CompletedWithSuccess" || "CompletedWithFailure" || "Exited",
* // StepExecutions: [ // StepExecutionList
* // { // StepExecution
* // StepName: "STRING_VALUE",
Expand All @@ -66,7 +66,7 @@ export interface GetAutomationExecutionCommandOutput extends GetAutomationExecut
* // MaxAttempts: Number("int"),
* // ExecutionStartTime: new Date("TIMESTAMP"),
* // ExecutionEndTime: new Date("TIMESTAMP"),
* // StepStatus: "Pending" || "InProgress" || "Waiting" || "Success" || "TimedOut" || "Cancelling" || "Cancelled" || "Failed" || "PendingApproval" || "Approved" || "Rejected" || "Scheduled" || "RunbookInProgress" || "PendingChangeCalendarOverride" || "ChangeCalendarOverrideApproved" || "ChangeCalendarOverrideRejected" || "CompletedWithSuccess" || "CompletedWithFailure",
* // StepStatus: "Pending" || "InProgress" || "Waiting" || "Success" || "TimedOut" || "Cancelling" || "Cancelled" || "Failed" || "PendingApproval" || "Approved" || "Rejected" || "Scheduled" || "RunbookInProgress" || "PendingChangeCalendarOverride" || "ChangeCalendarOverrideApproved" || "ChangeCalendarOverrideRejected" || "CompletedWithSuccess" || "CompletedWithFailure" || "Exited",
* // ResponseCode: "STRING_VALUE",
* // Inputs: { // NormalStringMap
* // "<keys>": "STRING_VALUE",
Expand Down Expand Up @@ -132,6 +132,13 @@ export interface GetAutomationExecutionCommandOutput extends GetAutomationExecut
* // State: "UNKNOWN" || "ALARM", // required
* // },
* // ],
* // ParentStepDetails: { // ParentStepDetails
* // StepExecutionId: "STRING_VALUE",
* // StepName: "STRING_VALUE",
* // Action: "STRING_VALUE",
* // Iteration: Number("int"),
* // IteratorValue: "STRING_VALUE",
* // },
* // },
* // ],
* // StepExecutionsTruncated: true || false,
Expand Down Expand Up @@ -236,6 +243,7 @@ export interface GetAutomationExecutionCommandOutput extends GetAutomationExecut
* // OpsItemId: "STRING_VALUE",
* // AssociationId: "STRING_VALUE",
* // ChangeRequestName: "STRING_VALUE",
* // Variables: "<AutomationParameterMap>",
* // },
* // };
*
Expand Down
3 changes: 2 additions & 1 deletion clients/client-ssm/src/commands/TerminateSessionCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ import {
SMITHY_CONTEXT_KEY,
} from "@smithy/types";

import { TerminateSessionRequest, TerminateSessionResponse } from "../models/models_1";
import { TerminateSessionRequest } from "../models/models_1";
import { TerminateSessionResponse } from "../models/models_2";
import { de_TerminateSessionCommand, se_TerminateSessionCommand } from "../protocols/Aws_json1_1";
import { ServiceInputTypes, ServiceOutputTypes, SSMClientResolvedConfig } from "../SSMClient";

Expand Down
2 changes: 1 addition & 1 deletion clients/client-ssm/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* </p>
* <ul>
* <li>
* <p>For information about each of the capabilities that comprise Systems Manager, see <a href="https://docs.aws.amazon.com/systems-manager-automation-runbooks/latest/userguide/systems-manager-capabilities.html">Systems Manager capabilities</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
* <p>For information about each of the capabilities that comprise Systems Manager, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/what-is-systems-manager.html#systems-manager-capabilities">Systems Manager capabilities</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
* </li>
* <li>
* <p>For details about predefined runbooks for Automation, a capability of Amazon Web Services Systems Manager, see the
Expand Down
196 changes: 50 additions & 146 deletions clients/client-ssm/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3113,7 +3113,7 @@ export interface CreateOpsItemRequest {
* </li>
* <li>
* <p>
* <code>/aws/insights</code>
* <code>/aws/insight</code>
* </p>
* <p>This type of OpsItem is used by OpsCenter for aggregating and reporting on duplicate
* OpsItems. </p>
Expand Down Expand Up @@ -5610,6 +5610,7 @@ export const AutomationExecutionStatus = {
CHANGE_CALENDAR_OVERRIDE_REJECTED: "ChangeCalendarOverrideRejected",
COMPLETED_WITH_FAILURE: "CompletedWithFailure",
COMPLETED_WITH_SUCCESS: "CompletedWithSuccess",
EXITED: "Exited",
FAILED: "Failed",
INPROGRESS: "InProgress",
PENDING: "Pending",
Expand Down Expand Up @@ -6048,6 +6049,9 @@ export class AutomationExecutionNotFoundException extends __BaseException {
*/
export const StepExecutionFilterKey = {
ACTION: "Action",
PARENT_STEP_EXECUTION_ID: "ParentStepExecutionId",
PARENT_STEP_ITERATION: "ParentStepIteration",
PARENT_STEP_ITERATOR_VALUE: "ParentStepIteratorValue",
START_TIME_AFTER: "StartTimeAfter",
START_TIME_BEFORE: "StartTimeBefore",
STEP_EXECUTION_ID: "StepExecutionId",
Expand All @@ -6067,8 +6071,7 @@ export type StepExecutionFilterKey = (typeof StepExecutionFilterKey)[keyof typeo
export interface StepExecutionFilter {
/**
* @public
* <p>One or more keys to limit the results. Valid filter keys include the following: StepName,
* Action, StepExecutionId, StepExecutionStatus, StartTimeBefore, StartTimeAfter.</p>
* <p>One or more keys to limit the results.</p>
*/
Key: StepExecutionFilterKey | undefined;

Expand Down Expand Up @@ -6143,6 +6146,42 @@ export interface FailureDetails {
Details?: Record<string, string[]>;
}

/**
* @public
* <p>A detailed status of the parent step.</p>
*/
export interface ParentStepDetails {
/**
* @public
* <p>The unique ID of a step execution.</p>
*/
StepExecutionId?: string;

/**
* @public
* <p>The name of the step.</p>
*/
StepName?: string;

/**
* @public
* <p>The name of the automation action.</p>
*/
Action?: string;

/**
* @public
* <p>The current repetition of the loop represented by an integer.</p>
*/
Iteration?: number;

/**
* @public
* <p>The current value of the specified iterator in the loop.</p>
*/
IteratorValue?: string;
}

/**
* @public
* <p>Detailed information about an the execution state of an Automation step.</p>
Expand Down Expand Up @@ -6294,6 +6333,12 @@ export interface StepExecution {
* <p>The CloudWatch alarms that were invoked by the automation.</p>
*/
TriggeredAlarms?: AlarmStateInformation[];

/**
* @public
* <p>Information about the parent step.</p>
*/
ParentStepDetails?: ParentStepDetails;
}

/**
Expand Down Expand Up @@ -7659,6 +7704,8 @@ export interface DescribeInstancePatchesRequest {
* <p>Sample values: <code>Installed</code> | <code>InstalledOther</code> |
* <code>InstalledPendingReboot</code>
* </p>
* <p>For lists of all <code>State</code> values, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-compliance-states.html">Understanding
* patch compliance state values</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
* </li>
* </ul>
*/
Expand Down Expand Up @@ -9309,140 +9356,6 @@ export interface MaintenanceWindowTaskParameterValueExpression {
Values?: string[];
}

/**
* @public
* <p>Information about a task defined for a maintenance window.</p>
*/
export interface MaintenanceWindowTask {
/**
* @public
* <p>The ID of the maintenance window where the task is registered.</p>
*/
WindowId?: string;

/**
* @public
* <p>The task ID.</p>
*/
WindowTaskId?: string;

/**
* @public
* <p>The resource that the task uses during execution. For <code>RUN_COMMAND</code> and
* <code>AUTOMATION</code> task types, <code>TaskArn</code> is the Amazon Web Services Systems Manager (SSM document) name or
* ARN. For <code>LAMBDA</code> tasks, it's the function name or ARN. For
* <code>STEP_FUNCTIONS</code> tasks, it's the state machine ARN.</p>
*/
TaskArn?: string;

/**
* @public
* <p>The type of task.</p>
*/
Type?: MaintenanceWindowTaskType;

/**
* @public
* <p>The targets (either managed nodes or tags). Managed nodes are specified using
* <code>Key=instanceids,Values=<instanceid1>,<instanceid2></code>. Tags are specified
* using <code>Key=<tag name>,Values=<tag value></code>.</p>
*/
Targets?: Target[];

/**
* @public
* <p>The parameters that should be passed to the task when it is run.</p>
* <note>
* <p>
* <code>TaskParameters</code> has been deprecated. To specify parameters to pass to a task when it runs,
* instead use the <code>Parameters</code> option in the <code>TaskInvocationParameters</code> structure. For information
* about how Systems Manager handles these options for the supported maintenance window task
* types, see <a>MaintenanceWindowTaskInvocationParameters</a>.</p>
* </note>
*/
TaskParameters?: Record<string, MaintenanceWindowTaskParameterValueExpression>;

/**
* @public
* <p>The priority of the task in the maintenance window. The lower the number, the higher the
* priority. Tasks that have the same priority are scheduled in parallel.</p>
*/
Priority?: number;

/**
* @public
* <p>Information about an S3 bucket to write task-level logs to.</p>
* <note>
* <p>
* <code>LoggingInfo</code> has been deprecated. To specify an Amazon Simple Storage Service (Amazon S3) bucket to contain logs, instead use the
* <code>OutputS3BucketName</code> and <code>OutputS3KeyPrefix</code> options in the <code>TaskInvocationParameters</code> structure.
* For information about how Amazon Web Services Systems Manager handles these options for the supported maintenance
* window task types, see <a>MaintenanceWindowTaskInvocationParameters</a>.</p>
* </note>
*/
LoggingInfo?: LoggingInfo;

/**
* @public
* <p>The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) service role to use to publish Amazon Simple Notification Service
* (Amazon SNS) notifications for maintenance window Run Command tasks.</p>
*/
ServiceRoleArn?: string;

/**
* @public
* <p>The maximum number of targets this task can be run for, in parallel.</p>
* <note>
* <p>Although this element is listed as "Required: No", a value can be omitted only when you are
* registering or updating a <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html">targetless
* task</a> You must provide a value in all other cases.</p>
* <p>For maintenance window tasks without a target specified, you can't supply a value for this
* option. Instead, the system inserts a placeholder value of <code>1</code>. This value doesn't
* affect the running of your task.</p>
* </note>
*/
MaxConcurrency?: string;

/**
* @public
* <p>The maximum number of errors allowed before this task stops being scheduled.</p>
* <note>
* <p>Although this element is listed as "Required: No", a value can be omitted only when you are
* registering or updating a <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html">targetless
* task</a> You must provide a value in all other cases.</p>
* <p>For maintenance window tasks without a target specified, you can't supply a value for this
* option. Instead, the system inserts a placeholder value of <code>1</code>. This value doesn't
* affect the running of your task.</p>
* </note>
*/
MaxErrors?: string;

/**
* @public
* <p>The task name.</p>
*/
Name?: string;

/**
* @public
* <p>A description of the task.</p>
*/
Description?: string;

/**
* @public
* <p>The specification for whether tasks should continue to run after the cutoff time specified
* in the maintenance windows is reached. </p>
*/
CutoffBehavior?: MaintenanceWindowTaskCutoffBehavior;

/**
* @public
* <p>The details for the CloudWatch alarm applied to your maintenance window task.</p>
*/
AlarmConfiguration?: AlarmConfiguration;
}

/**
* @internal
*/
Expand Down Expand Up @@ -9639,12 +9552,3 @@ export const MaintenanceWindowTaskParameterValueExpressionFilterSensitiveLog = (
...obj,
...(obj.Values && { Values: SENSITIVE_STRING }),
});

/**
* @internal
*/
export const MaintenanceWindowTaskFilterSensitiveLog = (obj: MaintenanceWindowTask): any => ({
...obj,
...(obj.TaskParameters && { TaskParameters: SENSITIVE_STRING }),
...(obj.Description && { Description: SENSITIVE_STRING }),
});
Loading

0 comments on commit 35113ae

Please sign in to comment.