From aef9d12aa193419265f6adcd137a66262c51838f Mon Sep 17 00:00:00 2001 From: awstools Date: Wed, 24 Apr 2024 18:15:59 +0000 Subject: [PATCH] feat(client-ssm): Add SSM DescribeInstanceProperties API to public AWS SDK. --- clients/client-ssm/README.md | 8 + clients/client-ssm/src/SSM.ts | 24 + clients/client-ssm/src/SSMClient.ts | 6 + .../DescribeInstancePropertiesCommand.ts | 173 +++++ ...escribeMaintenanceWindowScheduleCommand.ts | 3 +- ...DescribeMaintenanceWindowTargetsCommand.ts | 2 +- .../DescribeMaintenanceWindowTasksCommand.ts | 2 +- ...cribeMaintenanceWindowsForTargetCommand.ts | 2 +- .../StartChangeRequestExecutionCommand.ts | 2 +- .../src/commands/StartSessionCommand.ts | 2 +- clients/client-ssm/src/commands/index.ts | 1 + clients/client-ssm/src/models/models_0.ts | 665 ++++++++++-------- clients/client-ssm/src/models/models_1.ts | 535 +++++++------- clients/client-ssm/src/models/models_2.ts | 301 +++++++- .../DescribeInstancePropertiesPaginator.ts | 24 + clients/client-ssm/src/pagination/index.ts | 1 + .../client-ssm/src/protocols/Aws_json1_1.ts | 151 +++- codegen/sdk-codegen/aws-models/ssm.json | 586 ++++++++++++++- 18 files changed, 1900 insertions(+), 588 deletions(-) create mode 100644 clients/client-ssm/src/commands/DescribeInstancePropertiesCommand.ts create mode 100644 clients/client-ssm/src/pagination/DescribeInstancePropertiesPaginator.ts diff --git a/clients/client-ssm/README.md b/clients/client-ssm/README.md index a3584de8841a..0d270adbd39a 100644 --- a/clients/client-ssm/README.md +++ b/clients/client-ssm/README.md @@ -597,6 +597,14 @@ DescribeInstancePatchStatesForPatchGroup [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/ssm/command/DescribeInstancePatchStatesForPatchGroupCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-ssm/Interface/DescribeInstancePatchStatesForPatchGroupCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-ssm/Interface/DescribeInstancePatchStatesForPatchGroupCommandOutput/) + +
+ +DescribeInstanceProperties + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/ssm/command/DescribeInstancePropertiesCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-ssm/Interface/DescribeInstancePropertiesCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-ssm/Interface/DescribeInstancePropertiesCommandOutput/) +
diff --git a/clients/client-ssm/src/SSM.ts b/clients/client-ssm/src/SSM.ts index 160c9d547248..c58d70199e81 100644 --- a/clients/client-ssm/src/SSM.ts +++ b/clients/client-ssm/src/SSM.ts @@ -227,6 +227,11 @@ import { DescribeInstancePatchStatesForPatchGroupCommandInput, DescribeInstancePatchStatesForPatchGroupCommandOutput, } from "./commands/DescribeInstancePatchStatesForPatchGroupCommand"; +import { + DescribeInstancePropertiesCommand, + DescribeInstancePropertiesCommandInput, + DescribeInstancePropertiesCommandOutput, +} from "./commands/DescribeInstancePropertiesCommand"; import { DescribeInventoryDeletionsCommand, DescribeInventoryDeletionsCommandInput, @@ -733,6 +738,7 @@ const commands = { DescribeInstancePatchesCommand, DescribeInstancePatchStatesCommand, DescribeInstancePatchStatesForPatchGroupCommand, + DescribeInstancePropertiesCommand, DescribeInventoryDeletionsCommand, DescribeMaintenanceWindowExecutionsCommand, DescribeMaintenanceWindowExecutionTaskInvocationsCommand, @@ -1571,6 +1577,24 @@ export interface SSM { cb: (err: any, data?: DescribeInstancePatchStatesForPatchGroupCommandOutput) => void ): void; + /** + * @see {@link DescribeInstancePropertiesCommand} + */ + describeInstanceProperties(): Promise; + describeInstanceProperties( + args: DescribeInstancePropertiesCommandInput, + options?: __HttpHandlerOptions + ): Promise; + describeInstanceProperties( + args: DescribeInstancePropertiesCommandInput, + cb: (err: any, data?: DescribeInstancePropertiesCommandOutput) => void + ): void; + describeInstanceProperties( + args: DescribeInstancePropertiesCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DescribeInstancePropertiesCommandOutput) => void + ): void; + /** * @see {@link DescribeInventoryDeletionsCommand} */ diff --git a/clients/client-ssm/src/SSMClient.ts b/clients/client-ssm/src/SSMClient.ts index d00d5247444d..2a4976fa6e95 100644 --- a/clients/client-ssm/src/SSMClient.ts +++ b/clients/client-ssm/src/SSMClient.ts @@ -185,6 +185,10 @@ import { DescribeInstancePatchStatesForPatchGroupCommandInput, DescribeInstancePatchStatesForPatchGroupCommandOutput, } from "./commands/DescribeInstancePatchStatesForPatchGroupCommand"; +import { + DescribeInstancePropertiesCommandInput, + DescribeInstancePropertiesCommandOutput, +} from "./commands/DescribeInstancePropertiesCommand"; import { DescribeInventoryDeletionsCommandInput, DescribeInventoryDeletionsCommandOutput, @@ -528,6 +532,7 @@ export type ServiceInputTypes = | DescribeInstancePatchStatesCommandInput | DescribeInstancePatchStatesForPatchGroupCommandInput | DescribeInstancePatchesCommandInput + | DescribeInstancePropertiesCommandInput | DescribeInventoryDeletionsCommandInput | DescribeMaintenanceWindowExecutionTaskInvocationsCommandInput | DescribeMaintenanceWindowExecutionTasksCommandInput @@ -672,6 +677,7 @@ export type ServiceOutputTypes = | DescribeInstancePatchStatesCommandOutput | DescribeInstancePatchStatesForPatchGroupCommandOutput | DescribeInstancePatchesCommandOutput + | DescribeInstancePropertiesCommandOutput | DescribeInventoryDeletionsCommandOutput | DescribeMaintenanceWindowExecutionTaskInvocationsCommandOutput | DescribeMaintenanceWindowExecutionTasksCommandOutput diff --git a/clients/client-ssm/src/commands/DescribeInstancePropertiesCommand.ts b/clients/client-ssm/src/commands/DescribeInstancePropertiesCommand.ts new file mode 100644 index 000000000000..eddb9d2220ae --- /dev/null +++ b/clients/client-ssm/src/commands/DescribeInstancePropertiesCommand.ts @@ -0,0 +1,173 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { commonParams } from "../endpoint/EndpointParameters"; +import { DescribeInstancePropertiesRequest, DescribeInstancePropertiesResult } from "../models/models_0"; +import { de_DescribeInstancePropertiesCommand, se_DescribeInstancePropertiesCommand } from "../protocols/Aws_json1_1"; +import { ServiceInputTypes, ServiceOutputTypes, SSMClientResolvedConfig } from "../SSMClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link DescribeInstancePropertiesCommand}. + */ +export interface DescribeInstancePropertiesCommandInput extends DescribeInstancePropertiesRequest {} +/** + * @public + * + * The output of {@link DescribeInstancePropertiesCommand}. + */ +export interface DescribeInstancePropertiesCommandOutput extends DescribeInstancePropertiesResult, __MetadataBearer {} + +/** + *

An API operation used by the Systems Manager console to display information about Systems Manager managed nodes.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { SSMClient, DescribeInstancePropertiesCommand } from "@aws-sdk/client-ssm"; // ES Modules import + * // const { SSMClient, DescribeInstancePropertiesCommand } = require("@aws-sdk/client-ssm"); // CommonJS import + * const client = new SSMClient(config); + * const input = { // DescribeInstancePropertiesRequest + * InstancePropertyFilterList: [ // InstancePropertyFilterList + * { // InstancePropertyFilter + * key: "InstanceIds" || "AgentVersion" || "PingStatus" || "PlatformTypes" || "DocumentName" || "ActivationIds" || "IamRole" || "ResourceType" || "AssociationStatus", // required + * valueSet: [ // InstancePropertyFilterValueSet // required + * "STRING_VALUE", + * ], + * }, + * ], + * FiltersWithOperator: [ // InstancePropertyStringFilterList + * { // InstancePropertyStringFilter + * Key: "STRING_VALUE", // required + * Values: [ // required + * "STRING_VALUE", + * ], + * Operator: "Equal" || "NotEqual" || "BeginWith" || "LessThan" || "GreaterThan", + * }, + * ], + * MaxResults: Number("int"), + * NextToken: "STRING_VALUE", + * }; + * const command = new DescribeInstancePropertiesCommand(input); + * const response = await client.send(command); + * // { // DescribeInstancePropertiesResult + * // InstanceProperties: [ // InstanceProperties + * // { // InstanceProperty + * // Name: "STRING_VALUE", + * // InstanceId: "STRING_VALUE", + * // InstanceType: "STRING_VALUE", + * // InstanceRole: "STRING_VALUE", + * // KeyName: "STRING_VALUE", + * // InstanceState: "STRING_VALUE", + * // Architecture: "STRING_VALUE", + * // IPAddress: "STRING_VALUE", + * // LaunchTime: new Date("TIMESTAMP"), + * // PingStatus: "Online" || "ConnectionLost" || "Inactive", + * // LastPingDateTime: new Date("TIMESTAMP"), + * // AgentVersion: "STRING_VALUE", + * // PlatformType: "Windows" || "Linux" || "MacOS", + * // PlatformName: "STRING_VALUE", + * // PlatformVersion: "STRING_VALUE", + * // ActivationId: "STRING_VALUE", + * // IamRole: "STRING_VALUE", + * // RegistrationDate: new Date("TIMESTAMP"), + * // ResourceType: "STRING_VALUE", + * // ComputerName: "STRING_VALUE", + * // AssociationStatus: "STRING_VALUE", + * // LastAssociationExecutionDate: new Date("TIMESTAMP"), + * // LastSuccessfulAssociationExecutionDate: new Date("TIMESTAMP"), + * // AssociationOverview: { // InstanceAggregatedAssociationOverview + * // DetailedStatus: "STRING_VALUE", + * // InstanceAssociationStatusAggregatedCount: { // InstanceAssociationStatusAggregatedCount + * // "": Number("int"), + * // }, + * // }, + * // SourceId: "STRING_VALUE", + * // SourceType: "AWS::EC2::Instance" || "AWS::IoT::Thing" || "AWS::SSM::ManagedInstance", + * // }, + * // ], + * // NextToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param DescribeInstancePropertiesCommandInput - {@link DescribeInstancePropertiesCommandInput} + * @returns {@link DescribeInstancePropertiesCommandOutput} + * @see {@link DescribeInstancePropertiesCommandInput} for command's `input` shape. + * @see {@link DescribeInstancePropertiesCommandOutput} for command's `response` shape. + * @see {@link SSMClientResolvedConfig | config} for SSMClient's `config` shape. + * + * @throws {@link InternalServerError} (server fault) + *

An error occurred on the server side.

+ * + * @throws {@link InvalidActivationId} (client fault) + *

The activation ID isn't valid. Verify the you entered the correct ActivationId or + * ActivationCode and try again.

+ * + * @throws {@link InvalidDocument} (client fault) + *

The specified SSM document doesn't exist.

+ * + * @throws {@link InvalidFilterKey} (client fault) + *

The specified key isn't valid.

+ * + * @throws {@link InvalidInstanceId} (client fault) + *

The following problems can cause this exception:

+ *
    + *
  • + *

    You don't have permission to access the managed node.

    + *
  • + *
  • + *

    Amazon Web Services Systems Manager Agent (SSM Agent) isn't running. Verify that SSM Agent is + * running.

    + *
  • + *
  • + *

    SSM Agent isn't registered with the SSM endpoint. Try reinstalling SSM Agent.

    + *
  • + *
  • + *

    The managed node isn't in a valid state. Valid states are: Running, + * Pending, Stopped, and Stopping. Invalid states are: + * Shutting-down and Terminated.

    + *
  • + *
+ * + * @throws {@link InvalidInstancePropertyFilterValue} (client fault) + *

The specified filter value isn't valid.

+ * + * @throws {@link InvalidNextToken} (client fault) + *

The specified token isn't valid.

+ * + * @throws {@link SSMServiceException} + *

Base exception class for all service exceptions from SSM service.

+ * + * @public + */ +export class DescribeInstancePropertiesCommand extends $Command + .classBuilder< + DescribeInstancePropertiesCommandInput, + DescribeInstancePropertiesCommandOutput, + SSMClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep({ + ...commonParams, + }) + .m(function (this: any, Command: any, cs: any, config: SSMClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AmazonSSM", "DescribeInstanceProperties", {}) + .n("SSMClient", "DescribeInstancePropertiesCommand") + .f(void 0, void 0) + .ser(se_DescribeInstancePropertiesCommand) + .de(de_DescribeInstancePropertiesCommand) + .build() {} diff --git a/clients/client-ssm/src/commands/DescribeMaintenanceWindowScheduleCommand.ts b/clients/client-ssm/src/commands/DescribeMaintenanceWindowScheduleCommand.ts index 765b433c5b86..3e50857cfce7 100644 --- a/clients/client-ssm/src/commands/DescribeMaintenanceWindowScheduleCommand.ts +++ b/clients/client-ssm/src/commands/DescribeMaintenanceWindowScheduleCommand.ts @@ -5,7 +5,8 @@ import { Command as $Command } from "@smithy/smithy-client"; import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { commonParams } from "../endpoint/EndpointParameters"; -import { DescribeMaintenanceWindowScheduleRequest, DescribeMaintenanceWindowScheduleResult } from "../models/models_0"; +import { DescribeMaintenanceWindowScheduleRequest } from "../models/models_0"; +import { DescribeMaintenanceWindowScheduleResult } from "../models/models_1"; import { de_DescribeMaintenanceWindowScheduleCommand, se_DescribeMaintenanceWindowScheduleCommand, diff --git a/clients/client-ssm/src/commands/DescribeMaintenanceWindowTargetsCommand.ts b/clients/client-ssm/src/commands/DescribeMaintenanceWindowTargetsCommand.ts index 94abc934e81a..690950072f7a 100644 --- a/clients/client-ssm/src/commands/DescribeMaintenanceWindowTargetsCommand.ts +++ b/clients/client-ssm/src/commands/DescribeMaintenanceWindowTargetsCommand.ts @@ -9,7 +9,7 @@ import { DescribeMaintenanceWindowTargetsRequest, DescribeMaintenanceWindowTargetsResult, DescribeMaintenanceWindowTargetsResultFilterSensitiveLog, -} from "../models/models_0"; +} from "../models/models_1"; import { de_DescribeMaintenanceWindowTargetsCommand, se_DescribeMaintenanceWindowTargetsCommand, diff --git a/clients/client-ssm/src/commands/DescribeMaintenanceWindowTasksCommand.ts b/clients/client-ssm/src/commands/DescribeMaintenanceWindowTasksCommand.ts index 6cb9b61224f1..2272d3ba0bae 100644 --- a/clients/client-ssm/src/commands/DescribeMaintenanceWindowTasksCommand.ts +++ b/clients/client-ssm/src/commands/DescribeMaintenanceWindowTasksCommand.ts @@ -5,8 +5,8 @@ import { Command as $Command } from "@smithy/smithy-client"; import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { commonParams } from "../endpoint/EndpointParameters"; -import { DescribeMaintenanceWindowTasksRequest } from "../models/models_0"; import { + DescribeMaintenanceWindowTasksRequest, DescribeMaintenanceWindowTasksResult, DescribeMaintenanceWindowTasksResultFilterSensitiveLog, } from "../models/models_1"; diff --git a/clients/client-ssm/src/commands/DescribeMaintenanceWindowsForTargetCommand.ts b/clients/client-ssm/src/commands/DescribeMaintenanceWindowsForTargetCommand.ts index 652d45b8a1b7..b161f9c478f4 100644 --- a/clients/client-ssm/src/commands/DescribeMaintenanceWindowsForTargetCommand.ts +++ b/clients/client-ssm/src/commands/DescribeMaintenanceWindowsForTargetCommand.ts @@ -8,7 +8,7 @@ import { commonParams } from "../endpoint/EndpointParameters"; import { DescribeMaintenanceWindowsForTargetRequest, DescribeMaintenanceWindowsForTargetResult, -} from "../models/models_0"; +} from "../models/models_1"; import { de_DescribeMaintenanceWindowsForTargetCommand, se_DescribeMaintenanceWindowsForTargetCommand, diff --git a/clients/client-ssm/src/commands/StartChangeRequestExecutionCommand.ts b/clients/client-ssm/src/commands/StartChangeRequestExecutionCommand.ts index c434bb309d32..c7c1c612c008 100644 --- a/clients/client-ssm/src/commands/StartChangeRequestExecutionCommand.ts +++ b/clients/client-ssm/src/commands/StartChangeRequestExecutionCommand.ts @@ -5,7 +5,7 @@ import { Command as $Command } from "@smithy/smithy-client"; import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { commonParams } from "../endpoint/EndpointParameters"; -import { StartChangeRequestExecutionRequest, StartChangeRequestExecutionResult } from "../models/models_1"; +import { StartChangeRequestExecutionRequest, StartChangeRequestExecutionResult } from "../models/models_2"; import { de_StartChangeRequestExecutionCommand, se_StartChangeRequestExecutionCommand } from "../protocols/Aws_json1_1"; import { ServiceInputTypes, ServiceOutputTypes, SSMClientResolvedConfig } from "../SSMClient"; diff --git a/clients/client-ssm/src/commands/StartSessionCommand.ts b/clients/client-ssm/src/commands/StartSessionCommand.ts index 46afdd9150db..b6cf531205a1 100644 --- a/clients/client-ssm/src/commands/StartSessionCommand.ts +++ b/clients/client-ssm/src/commands/StartSessionCommand.ts @@ -5,7 +5,7 @@ import { Command as $Command } from "@smithy/smithy-client"; import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { commonParams } from "../endpoint/EndpointParameters"; -import { StartSessionRequest, StartSessionResponse } from "../models/models_1"; +import { StartSessionRequest, StartSessionResponse } from "../models/models_2"; import { de_StartSessionCommand, se_StartSessionCommand } from "../protocols/Aws_json1_1"; import { ServiceInputTypes, ServiceOutputTypes, SSMClientResolvedConfig } from "../SSMClient"; diff --git a/clients/client-ssm/src/commands/index.ts b/clients/client-ssm/src/commands/index.ts index ee030cf93628..77a6b319df48 100644 --- a/clients/client-ssm/src/commands/index.ts +++ b/clients/client-ssm/src/commands/index.ts @@ -44,6 +44,7 @@ export * from "./DescribeInstanceInformationCommand"; export * from "./DescribeInstancePatchStatesCommand"; export * from "./DescribeInstancePatchStatesForPatchGroupCommand"; export * from "./DescribeInstancePatchesCommand"; +export * from "./DescribeInstancePropertiesCommand"; export * from "./DescribeInventoryDeletionsCommand"; export * from "./DescribeMaintenanceWindowExecutionTaskInvocationsCommand"; export * from "./DescribeMaintenanceWindowExecutionTasksCommand"; diff --git a/clients/client-ssm/src/models/models_0.ts b/clients/client-ssm/src/models/models_0.ts index 0b7ebfbf5e41..93c45123c1e2 100644 --- a/clients/client-ssm/src/models/models_0.ts +++ b/clients/client-ssm/src/models/models_0.ts @@ -1036,86 +1036,104 @@ export interface TargetLocation { * Amazon Web Services Systems Manager User Guide.

* *

Supported formats include the following.

+ *

+ * For all Systems Manager capabilities: + *

*
    *
  • *

    - * Key=InstanceIds,Values=,, + * Key=tag-key,Values=tag-value-1,tag-value-2 *

    *
  • + *
+ *

+ * For Automation and Change Manager: + *

+ *
    *
  • *

    - * Key=tag:,Values=, + * Key=tag:tag-key,Values=tag-value *

    *
  • *
  • *

    - * Key=tag-key,Values=, + * Key=ResourceGroup,Values=resource-group-name *

    *
  • *
  • *

    - * Run Command and Maintenance window targets only: - * Key=resource-groups:Name,Values= + * Key=ParameterValues,Values=value-1,value-2,value-3 *

    *
  • *
  • - *

    - * Maintenance window targets only: - * Key=resource-groups:ResourceTypeFilters,Values=, - *

    - *
  • - *
  • - *

    - * Automation targets only: - * Key=ResourceGroup;Values= - *

    + *

    To target all instances in the Amazon Web Services Region:

    + *
      + *
    • + *

      + * Key=AWS::EC2::Instance,Values=* + *

      + *
    • + *
    • + *

      + * Key=InstanceIds,Values=* + *

      + *
    • + *
    *
  • *
- *

For example:

+ *

+ * For Run Command and Maintenance Windows: + *

*
    *
  • *

    - * Key=InstanceIds,Values=i-02573cafcfEXAMPLE,i-0471e04240EXAMPLE,i-07782c72faEXAMPLE + * Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3 *

    *
  • *
  • *

    - * Key=tag:CostCenter,Values=CostCenter1,CostCenter2,CostCenter3 + * Key=tag:tag-key,Values=tag-value-1,tag-value-2 *

    *
  • *
  • *

    - * Key=tag-key,Values=Name,Instance-Type,CostCenter + * Key=resource-groups:Name,Values=resource-group-name *

    *
  • *
  • - *

    - * Run Command and Maintenance window targets only: - * Key=resource-groups:Name,Values=ProductionResourceGroup - *

    - *

    This example demonstrates how to target all resources in the resource group ProductionResourceGroup in your maintenance window.

    + *

    Additionally, Maintenance Windows support targeting resource types:

    + *
      + *
    • + *

      + * Key=resource-groups:ResourceTypeFilters,Values=resource-type-1,resource-type-2 + *

      + *
    • + *
    *
  • + *
+ *

+ * For State Manager: + *

+ *
    *
  • *

    - * Maintenance window targets only: - * Key=resource-groups:ResourceTypeFilters,Values=AWS::EC2::INSTANCE,AWS::EC2::VPC + * Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3 *

    - *

    This example demonstrates how to target only Amazon Elastic Compute Cloud (Amazon EC2) - * instances and VPCs in your maintenance window.

    *
  • *
  • *

    - * Automation targets only: - * Key=ResourceGroup,Values=MyResourceGroup + * Key=tag:tag-key,Values=tag-value-1,tag-value-2 *

    *
  • *
  • - *

    - * State Manager association targets only: - * Key=InstanceIds,Values=* - *

    - *

    This example demonstrates how to target all managed instances in the Amazon Web Services Region where - * the association was created.

    + *

    To target all instances in the Amazon Web Services Region:

    + *
      + *
    • + *

      + * Key=InstanceIds,Values=* + *

      + *
    • + *
    *
  • *
*

For more information about how to send commands that target managed nodes using @@ -2348,6 +2366,21 @@ export interface CreateDocumentRequest { * amzn *

* + *
  • + *

    + * AWSEC2 + *

    + *
  • + *
  • + *

    + * AWSConfigRemediation + *

    + *
  • + *
  • + *

    + * AWSSupport + *

    + *
  • * * * @public @@ -2915,6 +2948,10 @@ export interface CreateMaintenanceWindowRequest { *

    The date and time, in ISO-8601 Extended format, for when you want the maintenance window to * become active. StartDate allows you to delay activation of the maintenance window * until the specified future date.

    + * + *

    When using a rate schedule, if you provide a start date that occurs in the past, the + * current date and time are used as the start date.

    + *
    * @public */ StartDate?: string; @@ -8408,6 +8445,317 @@ export interface DescribeInstancePatchStatesForPatchGroupResult { NextToken?: string; } +/** + * @public + * @enum + */ +export const InstancePropertyFilterOperator = { + BEGIN_WITH: "BeginWith", + EQUAL: "Equal", + GREATER_THAN: "GreaterThan", + LESS_THAN: "LessThan", + NOT_EQUAL: "NotEqual", +} as const; + +/** + * @public + */ +export type InstancePropertyFilterOperator = + (typeof InstancePropertyFilterOperator)[keyof typeof InstancePropertyFilterOperator]; + +/** + *

    The filters to describe or get information about your managed nodes.

    + * @public + */ +export interface InstancePropertyStringFilter { + /** + *

    The filter key name to describe your managed nodes.

    + * @public + */ + Key: string | undefined; + + /** + *

    The filter key name to describe your managed nodes.

    + * @public + */ + Values: string[] | undefined; + + /** + *

    The operator used by the filter call.

    + * @public + */ + Operator?: InstancePropertyFilterOperator; +} + +/** + * @public + * @enum + */ +export const InstancePropertyFilterKey = { + ACTIVATION_IDS: "ActivationIds", + AGENT_VERSION: "AgentVersion", + ASSOCIATION_STATUS: "AssociationStatus", + DOCUMENT_NAME: "DocumentName", + IAM_ROLE: "IamRole", + INSTANCE_IDS: "InstanceIds", + PING_STATUS: "PingStatus", + PLATFORM_TYPES: "PlatformTypes", + RESOURCE_TYPE: "ResourceType", +} as const; + +/** + * @public + */ +export type InstancePropertyFilterKey = (typeof InstancePropertyFilterKey)[keyof typeof InstancePropertyFilterKey]; + +/** + *

    Describes a filter for a specific list of managed nodes. You can filter node information by using tags. You specify tags by using a key-value mapping.

    + * @public + */ +export interface InstancePropertyFilter { + /** + *

    The name of the filter.

    + * @public + */ + key: InstancePropertyFilterKey | undefined; + + /** + *

    The filter values.

    + * @public + */ + valueSet: string[] | undefined; +} + +/** + * @public + */ +export interface DescribeInstancePropertiesRequest { + /** + *

    An array of instance property filters.

    + * @public + */ + InstancePropertyFilterList?: InstancePropertyFilter[]; + + /** + *

    The request filters to use with the operator.

    + * @public + */ + FiltersWithOperator?: InstancePropertyStringFilter[]; + + /** + *

    The maximum number of items to return for the call. The call also returns a token that you + * can specify in a subsequent call to get the next set of results.

    + * @public + */ + MaxResults?: number; + + /** + *

    The token provided by a previous request to use to return the next set of properties.

    + * @public + */ + NextToken?: string; +} + +/** + *

    An object containing various properties of a managed node.

    + * @public + */ +export interface InstanceProperty { + /** + *

    The value of the EC2 Name tag associated with the node. If a Name tag hasn't been applied to the node, this value is blank.

    + * @public + */ + Name?: string; + + /** + *

    The ID of the managed node.

    + * @public + */ + InstanceId?: string; + + /** + *

    The instance type of the managed node. For example, t3.large.

    + * @public + */ + InstanceType?: string; + + /** + *

    The instance profile attached to the node. If an instance profile isn't attached to the node, this value is blank.

    + * @public + */ + InstanceRole?: string; + + /** + *

    The name of the key pair associated with the node. If a key pair isnt't associated with the node, this value is blank.

    + * @public + */ + KeyName?: string; + + /** + *

    The current state of the node.

    + * @public + */ + InstanceState?: string; + + /** + *

    The CPU architecture of the node. For example, x86_64.

    + * @public + */ + Architecture?: string; + + /** + *

    The public IPv4 address assigned to the node. If a public IPv4 address isn't assigned to the node, this value is blank.

    + * @public + */ + IPAddress?: string; + + /** + *

    The timestamp for when the node was launched.

    + * @public + */ + LaunchTime?: Date; + + /** + *

    Connection status of the SSM Agent on the managed node.

    + * @public + */ + PingStatus?: PingStatus; + + /** + *

    The date and time when the SSM Agent last pinged the Systems Manager service.

    + * @public + */ + LastPingDateTime?: Date; + + /** + *

    The version of SSM Agent running on your managed node.

    + * @public + */ + AgentVersion?: string; + + /** + *

    The operating system platform type of the managed node. For example, Windows.

    + * @public + */ + PlatformType?: PlatformType; + + /** + *

    The name of the operating system platform running on your managed node.

    + * @public + */ + PlatformName?: string; + + /** + *

    The version of the OS platform running on your managed node.

    + * @public + */ + PlatformVersion?: string; + + /** + *

    The activation ID created by Systems Manager when the server or virtual machine (VM) was registered

    + * @public + */ + ActivationId?: string; + + /** + *

    The IAM role used in the hybrid activation to register the node with Systems Manager.

    + * @public + */ + IamRole?: string; + + /** + *

    The date the node was registered with Systems Manager.

    + * @public + */ + RegistrationDate?: Date; + + /** + *

    The type of managed node.

    + * @public + */ + ResourceType?: string; + + /** + *

    The fully qualified host name of the managed node.

    + * @public + */ + ComputerName?: string; + + /** + *

    The status of the State Manager association applied to the managed node.

    + * @public + */ + AssociationStatus?: string; + + /** + *

    The date the association was last run.

    + * @public + */ + LastAssociationExecutionDate?: Date; + + /** + *

    The last date the association was successfully run.

    + * @public + */ + LastSuccessfulAssociationExecutionDate?: Date; + + /** + *

    Status information about the aggregated associations.

    + * @public + */ + AssociationOverview?: InstanceAggregatedAssociationOverview; + + /** + *

    The ID of the source resource.

    + * @public + */ + SourceId?: string; + + /** + *

    The type of the source resource.

    + * @public + */ + SourceType?: SourceType; +} + +/** + * @public + */ +export interface DescribeInstancePropertiesResult { + /** + *

    Properties for the managed instances.

    + * @public + */ + InstanceProperties?: InstanceProperty[]; + + /** + *

    The token for the next set of properties to return. Use this token to get the next set of + * results.

    + * @public + */ + NextToken?: string; +} + +/** + *

    The specified filter value isn't valid.

    + * @public + */ +export class InvalidInstancePropertyFilterValue extends __BaseException { + readonly name: "InvalidInstancePropertyFilterValue" = "InvalidInstancePropertyFilterValue"; + readonly $fault: "client" = "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "InvalidInstancePropertyFilterValue", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, InvalidInstancePropertyFilterValue.prototype); + } +} + /** * @public */ @@ -9204,232 +9552,6 @@ export interface ScheduledWindowExecution { ExecutionTime?: string; } -/** - * @public - */ -export interface DescribeMaintenanceWindowScheduleResult { - /** - *

    Information about maintenance window executions scheduled for the specified time - * range.

    - * @public - */ - ScheduledWindowExecutions?: ScheduledWindowExecution[]; - - /** - *

    The token for the next set of items to return. (You use this token in the next call.)

    - * @public - */ - NextToken?: string; -} - -/** - * @public - */ -export interface DescribeMaintenanceWindowsForTargetRequest { - /** - *

    The managed node ID or key-value pair to retrieve information about.

    - * @public - */ - Targets: Target[] | undefined; - - /** - *

    The type of resource you want to retrieve information about. For example, - * INSTANCE.

    - * @public - */ - ResourceType: MaintenanceWindowResourceType | undefined; - - /** - *

    The maximum number of items to return for this call. The call also returns a token that you - * can specify in a subsequent call to get the next set of results.

    - * @public - */ - MaxResults?: number; - - /** - *

    The token for the next set of items to return. (You received this token from a previous - * call.)

    - * @public - */ - NextToken?: string; -} - -/** - *

    The maintenance window to which the specified target belongs.

    - * @public - */ -export interface MaintenanceWindowIdentityForTarget { - /** - *

    The ID of the maintenance window.

    - * @public - */ - WindowId?: string; - - /** - *

    The name of the maintenance window.

    - * @public - */ - Name?: string; -} - -/** - * @public - */ -export interface DescribeMaintenanceWindowsForTargetResult { - /** - *

    Information about the maintenance window targets and tasks a managed node is associated - * with.

    - * @public - */ - WindowIdentities?: MaintenanceWindowIdentityForTarget[]; - - /** - *

    The token for the next set of items to return. (You use this token in the next call.)

    - * @public - */ - NextToken?: string; -} - -/** - * @public - */ -export interface DescribeMaintenanceWindowTargetsRequest { - /** - *

    The ID of the maintenance window whose targets should be retrieved.

    - * @public - */ - WindowId: string | undefined; - - /** - *

    Optional filters that can be used to narrow down the scope of the returned window targets. - * The supported filter keys are Type, WindowTargetId, and - * OwnerInformation.

    - * @public - */ - Filters?: MaintenanceWindowFilter[]; - - /** - *

    The maximum number of items to return for this call. The call also returns a token that you - * can specify in a subsequent call to get the next set of results.

    - * @public - */ - MaxResults?: number; - - /** - *

    The token for the next set of items to return. (You received this token from a previous - * call.)

    - * @public - */ - NextToken?: string; -} - -/** - *

    The target registered with the maintenance window.

    - * @public - */ -export interface MaintenanceWindowTarget { - /** - *

    The ID of the maintenance window to register the target with.

    - * @public - */ - WindowId?: string; - - /** - *

    The ID of the target.

    - * @public - */ - WindowTargetId?: string; - - /** - *

    The type of target that is being registered with the maintenance window.

    - * @public - */ - ResourceType?: MaintenanceWindowResourceType; - - /** - *

    The targets, either managed nodes or tags.

    - *

    Specify managed nodes using the following format:

    - *

    - * Key=instanceids,Values=, - *

    - *

    Tags are specified using the following format:

    - *

    - * Key=,Values=.

    - * @public - */ - Targets?: Target[]; - - /** - *

    A user-provided value that will be included in any Amazon CloudWatch Events events that are - * raised while running tasks for these targets in this maintenance window.

    - * @public - */ - OwnerInformation?: string; - - /** - *

    The name for the maintenance window target.

    - * @public - */ - Name?: string; - - /** - *

    A description for the target.

    - * @public - */ - Description?: string; -} - -/** - * @public - */ -export interface DescribeMaintenanceWindowTargetsResult { - /** - *

    Information about the targets in the maintenance window.

    - * @public - */ - Targets?: MaintenanceWindowTarget[]; - - /** - *

    The token to use when requesting the next set of items. If there are no additional items to - * return, the string is empty.

    - * @public - */ - NextToken?: string; -} - -/** - * @public - */ -export interface DescribeMaintenanceWindowTasksRequest { - /** - *

    The ID of the maintenance window whose tasks should be retrieved.

    - * @public - */ - WindowId: string | undefined; - - /** - *

    Optional filters used to narrow down the scope of the returned tasks. The supported filter - * keys are WindowTaskId, TaskArn, Priority, and - * TaskType.

    - * @public - */ - Filters?: MaintenanceWindowFilter[]; - - /** - *

    The maximum number of items to return for this call. The call also returns a token that you - * can specify in a subsequent call to get the next set of results.

    - * @public - */ - MaxResults?: number; - - /** - *

    The token for the next set of items to return. (You received this token from a previous - * call.)

    - * @public - */ - NextToken?: string; -} - /** * @internal */ @@ -9597,22 +9719,3 @@ export const DescribeMaintenanceWindowsResultFilterSensitiveLog = (obj: Describe WindowIdentities: obj.WindowIdentities.map((item) => MaintenanceWindowIdentityFilterSensitiveLog(item)), }), }); - -/** - * @internal - */ -export const MaintenanceWindowTargetFilterSensitiveLog = (obj: MaintenanceWindowTarget): any => ({ - ...obj, - ...(obj.OwnerInformation && { OwnerInformation: SENSITIVE_STRING }), - ...(obj.Description && { Description: SENSITIVE_STRING }), -}); - -/** - * @internal - */ -export const DescribeMaintenanceWindowTargetsResultFilterSensitiveLog = ( - obj: DescribeMaintenanceWindowTargetsResult -): any => ({ - ...obj, - ...(obj.Targets && { Targets: obj.Targets.map((item) => MaintenanceWindowTargetFilterSensitiveLog(item)) }), -}); diff --git a/clients/client-ssm/src/models/models_1.ts b/clients/client-ssm/src/models/models_1.ts index 26a357070999..a766415c5eb4 100644 --- a/clients/client-ssm/src/models/models_1.ts +++ b/clients/client-ssm/src/models/models_1.ts @@ -18,6 +18,7 @@ import { ExecutionMode, InstanceAssociationOutputLocation, MaintenanceWindowExecutionStatus, + MaintenanceWindowFilter, MaintenanceWindowResourceType, MaintenanceWindowTaskType, MetadataValue, @@ -39,6 +40,7 @@ import { ResourceTypeForTagging, ReviewStatus, Runbook, + ScheduledWindowExecution, StepExecution, Tag, Target, @@ -47,6 +49,232 @@ import { import { SSMServiceException as __BaseException } from "./SSMServiceException"; +/** + * @public + */ +export interface DescribeMaintenanceWindowScheduleResult { + /** + *

    Information about maintenance window executions scheduled for the specified time + * range.

    + * @public + */ + ScheduledWindowExecutions?: ScheduledWindowExecution[]; + + /** + *

    The token for the next set of items to return. (You use this token in the next call.)

    + * @public + */ + NextToken?: string; +} + +/** + * @public + */ +export interface DescribeMaintenanceWindowsForTargetRequest { + /** + *

    The managed node ID or key-value pair to retrieve information about.

    + * @public + */ + Targets: Target[] | undefined; + + /** + *

    The type of resource you want to retrieve information about. For example, + * INSTANCE.

    + * @public + */ + ResourceType: MaintenanceWindowResourceType | undefined; + + /** + *

    The maximum number of items to return for this call. The call also returns a token that you + * can specify in a subsequent call to get the next set of results.

    + * @public + */ + MaxResults?: number; + + /** + *

    The token for the next set of items to return. (You received this token from a previous + * call.)

    + * @public + */ + NextToken?: string; +} + +/** + *

    The maintenance window to which the specified target belongs.

    + * @public + */ +export interface MaintenanceWindowIdentityForTarget { + /** + *

    The ID of the maintenance window.

    + * @public + */ + WindowId?: string; + + /** + *

    The name of the maintenance window.

    + * @public + */ + Name?: string; +} + +/** + * @public + */ +export interface DescribeMaintenanceWindowsForTargetResult { + /** + *

    Information about the maintenance window targets and tasks a managed node is associated + * with.

    + * @public + */ + WindowIdentities?: MaintenanceWindowIdentityForTarget[]; + + /** + *

    The token for the next set of items to return. (You use this token in the next call.)

    + * @public + */ + NextToken?: string; +} + +/** + * @public + */ +export interface DescribeMaintenanceWindowTargetsRequest { + /** + *

    The ID of the maintenance window whose targets should be retrieved.

    + * @public + */ + WindowId: string | undefined; + + /** + *

    Optional filters that can be used to narrow down the scope of the returned window targets. + * The supported filter keys are Type, WindowTargetId, and + * OwnerInformation.

    + * @public + */ + Filters?: MaintenanceWindowFilter[]; + + /** + *

    The maximum number of items to return for this call. The call also returns a token that you + * can specify in a subsequent call to get the next set of results.

    + * @public + */ + MaxResults?: number; + + /** + *

    The token for the next set of items to return. (You received this token from a previous + * call.)

    + * @public + */ + NextToken?: string; +} + +/** + *

    The target registered with the maintenance window.

    + * @public + */ +export interface MaintenanceWindowTarget { + /** + *

    The ID of the maintenance window to register the target with.

    + * @public + */ + WindowId?: string; + + /** + *

    The ID of the target.

    + * @public + */ + WindowTargetId?: string; + + /** + *

    The type of target that is being registered with the maintenance window.

    + * @public + */ + ResourceType?: MaintenanceWindowResourceType; + + /** + *

    The targets, either managed nodes or tags.

    + *

    Specify managed nodes using the following format:

    + *

    + * Key=instanceids,Values=, + *

    + *

    Tags are specified using the following format:

    + *

    + * Key=,Values=.

    + * @public + */ + Targets?: Target[]; + + /** + *

    A user-provided value that will be included in any Amazon CloudWatch Events events that are + * raised while running tasks for these targets in this maintenance window.

    + * @public + */ + OwnerInformation?: string; + + /** + *

    The name for the maintenance window target.

    + * @public + */ + Name?: string; + + /** + *

    A description for the target.

    + * @public + */ + Description?: string; +} + +/** + * @public + */ +export interface DescribeMaintenanceWindowTargetsResult { + /** + *

    Information about the targets in the maintenance window.

    + * @public + */ + Targets?: MaintenanceWindowTarget[]; + + /** + *

    The token to use when requesting the next set of items. If there are no additional items to + * return, the string is empty.

    + * @public + */ + NextToken?: string; +} + +/** + * @public + */ +export interface DescribeMaintenanceWindowTasksRequest { + /** + *

    The ID of the maintenance window whose tasks should be retrieved.

    + * @public + */ + WindowId: string | undefined; + + /** + *

    Optional filters used to narrow down the scope of the returned tasks. The supported filter + * keys are WindowTaskId, TaskArn, Priority, and + * TaskType.

    + * @public + */ + Filters?: MaintenanceWindowFilter[]; + + /** + *

    The maximum number of items to return for this call. The call also returns a token that you + * can specify in a subsequent call to get the next set of results.

    + * @public + */ + MaxResults?: number; + + /** + *

    The token for the next set of items to return. (You received this token from a previous + * call.)

    + * @public + */ + NextToken?: string; +} + /** * @public * @enum @@ -4616,7 +4844,11 @@ export interface GetParametersRequest { * parameters shared with you from another account, you must use the full ARNs.

    *

    To query by parameter label, use "Name": "name:label". To query by parameter * version, use "Name": "name:version".

    - *

    For more information about shared parameters, see Working with + * + *

    The results for GetParameters requests are listed in alphabetical order in + * query responses.

    + * + *

    For information about shared parameters, see Working with * shared parameters in the Amazon Web Services Systems Manager User Guide.

    * @public */ @@ -9733,12 +9965,16 @@ export interface RegisterTaskWithMaintenanceWindowRequest { TaskArn: string | undefined; /** - *

    The Amazon Resource Name (ARN) of the IAM service role for Amazon Web Services Systems Manager to assume when running a - * maintenance window task. If you do not specify a service role ARN, Systems Manager uses your account's - * service-linked role. If no service-linked role for Systems Manager exists in your account, it is created when you run - * RegisterTaskWithMaintenanceWindow.

    - *

    For more information, see Using - * service-linked roles for Systems Manager in the in the Amazon Web Services Systems Manager User Guide:

    + *

    The Amazon Resource Name (ARN) of the IAM service role for + * Amazon Web Services Systems Manager to assume when running a maintenance window task. If you do not specify a + * service role ARN, Systems Manager uses a service-linked role in your account. If no + * appropriate service-linked role for Systems Manager exists in your account, it is created when + * you run RegisterTaskWithMaintenanceWindow.

    + *

    However, for an improved security posture, we strongly recommend creating a custom + * policy and custom service role for running your maintenance window tasks. The policy + * can be crafted to provide only the permissions needed for your particular + * maintenance window tasks. For more information, see Setting up maintenance windows in the in the + * Amazon Web Services Systems Manager User Guide.

    * @public */ ServiceRoleArn?: string; @@ -10665,282 +10901,23 @@ export interface StartAutomationExecutionResult { } /** - *

    Indicates that the Change Manager change template used in the change request was rejected or is - * still in a pending state.

    - * @public - */ -export class AutomationDefinitionNotApprovedException extends __BaseException { - readonly name: "AutomationDefinitionNotApprovedException" = "AutomationDefinitionNotApprovedException"; - readonly $fault: "client" = "client"; - Message?: string; - /** - * @internal - */ - constructor(opts: __ExceptionOptionType) { - super({ - name: "AutomationDefinitionNotApprovedException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, AutomationDefinitionNotApprovedException.prototype); - this.Message = opts.Message; - } -} - -/** - * @public - */ -export interface StartChangeRequestExecutionRequest { - /** - *

    The date and time specified in the change request to run the Automation runbooks.

    - * - *

    The Automation runbooks specified for the runbook workflow can't run until all required - * approvals for the change request have been received.

    - *
    - * @public - */ - ScheduledTime?: Date; - - /** - *

    The name of the change template document to run during the runbook workflow.

    - * @public - */ - DocumentName: string | undefined; - - /** - *

    The version of the change template document to run during the runbook workflow.

    - * @public - */ - DocumentVersion?: string; - - /** - *

    A key-value map of parameters that match the declared parameters in the change template - * document.

    - * @public - */ - Parameters?: Record; - - /** - *

    The name of the change request associated with the runbook workflow to be run.

    - * @public - */ - ChangeRequestName?: string; - - /** - *

    The user-provided idempotency token. The token must be unique, is case insensitive, enforces - * the UUID format, and can't be reused.

    - * @public - */ - ClientToken?: string; - - /** - *

    Indicates whether the change request can be approved automatically without the need for - * manual approvals.

    - *

    If AutoApprovable is enabled in a change template, then setting - * AutoApprove to true in StartChangeRequestExecution - * creates a change request that bypasses approver review.

    - * - *

    Change Calendar restrictions are not bypassed in this scenario. If the state of an - * associated calendar is CLOSED, change freeze approvers must still grant permission - * for this change request to run. If they don't, the change won't be processed until the calendar - * state is again OPEN.

    - *
    - * @public - */ - AutoApprove?: boolean; - - /** - *

    Information about the Automation runbooks that are run during the runbook workflow.

    - * - *

    The Automation runbooks specified for the runbook workflow can't run until all required - * approvals for the change request have been received.

    - *
    - * @public - */ - Runbooks: Runbook[] | undefined; - - /** - *

    Optional metadata that you assign to a resource. You can specify a maximum of five tags for - * a change request. Tags enable you to categorize a resource in different ways, such as by - * purpose, owner, or environment. For example, you might want to tag a change request to identify - * an environment or target Amazon Web Services Region. In this case, you could specify the following key-value - * pairs:

    - *
      - *
    • - *

      - * Key=Environment,Value=Production - *

      - *
    • - *
    • - *

      - * Key=Region,Value=us-east-2 - *

      - *
    • - *
    - * @public - */ - Tags?: Tag[]; - - /** - *

    The time that the requester expects the runbook workflow related to the change request to - * complete. The time is an estimate only that the requester provides for reviewers.

    - * @public - */ - ScheduledEndTime?: Date; - - /** - *

    User-provided details about the change. If no details are provided, content specified in the - * Template information section of the associated change template - * is added.

    - * @public - */ - ChangeDetails?: string; -} - -/** - * @public - */ -export interface StartChangeRequestExecutionResult { - /** - *

    The unique ID of a runbook workflow operation. (A runbook workflow is a type of Automation - * operation.)

    - * @public - */ - AutomationExecutionId?: string; -} - -/** - * @public - */ -export interface StartSessionRequest { - /** - *

    The managed node to connect to for the session.

    - * @public - */ - Target: string | undefined; - - /** - *

    The name of the SSM document you want to use to define the type of session, input - * parameters, or preferences for the session. For example, SSM-SessionManagerRunShell. - * You can call the GetDocument API to verify the document exists before - * attempting to start a session. If no document name is provided, a shell to the managed node is - * launched by default. For more information, see Start a - * session in the Amazon Web Services Systems Manager User Guide.

    - * @public - */ - DocumentName?: string; - - /** - *

    The reason for connecting to the instance. This value is included in the details for the - * Amazon CloudWatch Events event created when you start the session.

    - * @public - */ - Reason?: string; - - /** - *

    The values you want to specify for the parameters defined in the Session - * document.

    - * @public - */ - Parameters?: Record; -} - -/** - * @public - */ -export interface StartSessionResponse { - /** - *

    The ID of the session.

    - * @public - */ - SessionId?: string; - - /** - *

    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.

    - * @public - */ - TokenValue?: string; - - /** - *

    A URL back to SSM Agent on the managed node that the Session Manager client uses to send commands and - * receive output from the node. Format: wss://ssmmessages.region.amazonaws.com/v1/data-channel/session-id?stream=(input|output) - *

    - *

    - * region represents the Region identifier for an - * Amazon Web Services Region supported by Amazon Web Services Systems Manager, such as us-east-2 for the US East (Ohio) Region. - * For a list of supported region values, see the Region column in Systems Manager service endpoints in the - * Amazon Web Services General Reference.

    - *

    - * session-id represents the ID of a Session Manager session, such as - * 1a2b3c4dEXAMPLE.

    - * @public - */ - StreamUrl?: string; -} - -/** - *

    The specified target managed node for the session isn't fully configured for use with Session Manager. - * For more information, see Getting started with - * Session Manager in the Amazon Web Services Systems Manager User Guide. This error is also returned if you - * attempt to start a session on a managed node that is located in a different account or - * Region

    - * @public - */ -export class TargetNotConnected extends __BaseException { - readonly name: "TargetNotConnected" = "TargetNotConnected"; - readonly $fault: "client" = "client"; - Message?: string; - /** - * @internal - */ - constructor(opts: __ExceptionOptionType) { - super({ - name: "TargetNotConnected", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, TargetNotConnected.prototype); - this.Message = opts.Message; - } -} - -/** - *

    The specified update status operation isn't valid.

    - * @public - */ -export class InvalidAutomationStatusUpdateException extends __BaseException { - readonly name: "InvalidAutomationStatusUpdateException" = "InvalidAutomationStatusUpdateException"; - readonly $fault: "client" = "client"; - Message?: string; - /** - * @internal - */ - constructor(opts: __ExceptionOptionType) { - super({ - name: "InvalidAutomationStatusUpdateException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, InvalidAutomationStatusUpdateException.prototype); - this.Message = opts.Message; - } -} - -/** - * @public - * @enum + * @internal */ -export const StopType = { - CANCEL: "Cancel", - COMPLETE: "Complete", -} as const; +export const MaintenanceWindowTargetFilterSensitiveLog = (obj: MaintenanceWindowTarget): any => ({ + ...obj, + ...(obj.OwnerInformation && { OwnerInformation: SENSITIVE_STRING }), + ...(obj.Description && { Description: SENSITIVE_STRING }), +}); /** - * @public + * @internal */ -export type StopType = (typeof StopType)[keyof typeof StopType]; +export const DescribeMaintenanceWindowTargetsResultFilterSensitiveLog = ( + obj: DescribeMaintenanceWindowTargetsResult +): any => ({ + ...obj, + ...(obj.Targets && { Targets: obj.Targets.map((item) => MaintenanceWindowTargetFilterSensitiveLog(item)) }), +}); /** * @internal diff --git a/clients/client-ssm/src/models/models_2.ts b/clients/client-ssm/src/models/models_2.ts index d4d33214312e..551c9265ebd7 100644 --- a/clients/client-ssm/src/models/models_2.ts +++ b/clients/client-ssm/src/models/models_2.ts @@ -24,6 +24,8 @@ import { PatchSourceFilterSensitiveLog, RelatedOpsItem, ResourceDataSyncSource, + Runbook, + Tag, Target, TargetLocation, } from "./models_0"; @@ -41,11 +43,288 @@ import { OpsItemStatus, OpsResultAttribute, ResultAttribute, - StopType, } from "./models_1"; import { SSMServiceException as __BaseException } from "./SSMServiceException"; +/** + *

    Indicates that the Change Manager change template used in the change request was rejected or is + * still in a pending state.

    + * @public + */ +export class AutomationDefinitionNotApprovedException extends __BaseException { + readonly name: "AutomationDefinitionNotApprovedException" = "AutomationDefinitionNotApprovedException"; + readonly $fault: "client" = "client"; + Message?: string; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "AutomationDefinitionNotApprovedException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, AutomationDefinitionNotApprovedException.prototype); + this.Message = opts.Message; + } +} + +/** + * @public + */ +export interface StartChangeRequestExecutionRequest { + /** + *

    The date and time specified in the change request to run the Automation runbooks.

    + * + *

    The Automation runbooks specified for the runbook workflow can't run until all required + * approvals for the change request have been received.

    + *
    + * @public + */ + ScheduledTime?: Date; + + /** + *

    The name of the change template document to run during the runbook workflow.

    + * @public + */ + DocumentName: string | undefined; + + /** + *

    The version of the change template document to run during the runbook workflow.

    + * @public + */ + DocumentVersion?: string; + + /** + *

    A key-value map of parameters that match the declared parameters in the change template + * document.

    + * @public + */ + Parameters?: Record; + + /** + *

    The name of the change request associated with the runbook workflow to be run.

    + * @public + */ + ChangeRequestName?: string; + + /** + *

    The user-provided idempotency token. The token must be unique, is case insensitive, enforces + * the UUID format, and can't be reused.

    + * @public + */ + ClientToken?: string; + + /** + *

    Indicates whether the change request can be approved automatically without the need for + * manual approvals.

    + *

    If AutoApprovable is enabled in a change template, then setting + * AutoApprove to true in StartChangeRequestExecution + * creates a change request that bypasses approver review.

    + * + *

    Change Calendar restrictions are not bypassed in this scenario. If the state of an + * associated calendar is CLOSED, change freeze approvers must still grant permission + * for this change request to run. If they don't, the change won't be processed until the calendar + * state is again OPEN.

    + *
    + * @public + */ + AutoApprove?: boolean; + + /** + *

    Information about the Automation runbooks that are run during the runbook workflow.

    + * + *

    The Automation runbooks specified for the runbook workflow can't run until all required + * approvals for the change request have been received.

    + *
    + * @public + */ + Runbooks: Runbook[] | undefined; + + /** + *

    Optional metadata that you assign to a resource. You can specify a maximum of five tags for + * a change request. Tags enable you to categorize a resource in different ways, such as by + * purpose, owner, or environment. For example, you might want to tag a change request to identify + * an environment or target Amazon Web Services Region. In this case, you could specify the following key-value + * pairs:

    + *
      + *
    • + *

      + * Key=Environment,Value=Production + *

      + *
    • + *
    • + *

      + * Key=Region,Value=us-east-2 + *

      + *
    • + *
    + * @public + */ + Tags?: Tag[]; + + /** + *

    The time that the requester expects the runbook workflow related to the change request to + * complete. The time is an estimate only that the requester provides for reviewers.

    + * @public + */ + ScheduledEndTime?: Date; + + /** + *

    User-provided details about the change. If no details are provided, content specified in the + * Template information section of the associated change template + * is added.

    + * @public + */ + ChangeDetails?: string; +} + +/** + * @public + */ +export interface StartChangeRequestExecutionResult { + /** + *

    The unique ID of a runbook workflow operation. (A runbook workflow is a type of Automation + * operation.)

    + * @public + */ + AutomationExecutionId?: string; +} + +/** + * @public + */ +export interface StartSessionRequest { + /** + *

    The managed node to connect to for the session.

    + * @public + */ + Target: string | undefined; + + /** + *

    The name of the SSM document you want to use to define the type of session, input + * parameters, or preferences for the session. For example, SSM-SessionManagerRunShell. + * You can call the GetDocument API to verify the document exists before + * attempting to start a session. If no document name is provided, a shell to the managed node is + * launched by default. For more information, see Start a + * session in the Amazon Web Services Systems Manager User Guide.

    + * @public + */ + DocumentName?: string; + + /** + *

    The reason for connecting to the instance. This value is included in the details for the + * Amazon CloudWatch Events event created when you start the session.

    + * @public + */ + Reason?: string; + + /** + *

    The values you want to specify for the parameters defined in the Session + * document.

    + * @public + */ + Parameters?: Record; +} + +/** + * @public + */ +export interface StartSessionResponse { + /** + *

    The ID of the session.

    + * @public + */ + SessionId?: string; + + /** + *

    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.

    + * @public + */ + TokenValue?: string; + + /** + *

    A URL back to SSM Agent on the managed node that the Session Manager client uses to send commands and + * receive output from the node. Format: wss://ssmmessages.region.amazonaws.com/v1/data-channel/session-id?stream=(input|output) + *

    + *

    + * region represents the Region identifier for an + * Amazon Web Services Region supported by Amazon Web Services Systems Manager, such as us-east-2 for the US East (Ohio) Region. + * For a list of supported region values, see the Region column in Systems Manager service endpoints in the + * Amazon Web Services General Reference.

    + *

    + * session-id represents the ID of a Session Manager session, such as + * 1a2b3c4dEXAMPLE.

    + * @public + */ + StreamUrl?: string; +} + +/** + *

    The specified target managed node for the session isn't fully configured for use with Session Manager. + * For more information, see Getting started with + * Session Manager in the Amazon Web Services Systems Manager User Guide. This error is also returned if you + * attempt to start a session on a managed node that is located in a different account or + * Region

    + * @public + */ +export class TargetNotConnected extends __BaseException { + readonly name: "TargetNotConnected" = "TargetNotConnected"; + readonly $fault: "client" = "client"; + Message?: string; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "TargetNotConnected", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, TargetNotConnected.prototype); + this.Message = opts.Message; + } +} + +/** + *

    The specified update status operation isn't valid.

    + * @public + */ +export class InvalidAutomationStatusUpdateException extends __BaseException { + readonly name: "InvalidAutomationStatusUpdateException" = "InvalidAutomationStatusUpdateException"; + readonly $fault: "client" = "client"; + Message?: string; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "InvalidAutomationStatusUpdateException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, InvalidAutomationStatusUpdateException.prototype); + this.Message = opts.Message; + } +} + +/** + * @public + * @enum + */ +export const StopType = { + CANCEL: "Cancel", + COMPLETE: "Complete", +} as const; + +/** + * @public + */ +export type StopType = (typeof StopType)[keyof typeof StopType]; + /** * @public */ @@ -761,6 +1040,10 @@ export interface UpdateMaintenanceWindowRequest { *

    The date and time, in ISO-8601 Extended format, for when you want the maintenance window to * become active. StartDate allows you to delay activation of the maintenance window * until the specified future date.

    + * + *

    When using a rate schedule, if you provide a start date that occurs in the past, the + * current date and time are used as the start date.

    + *
    * @public */ StartDate?: string; @@ -1050,12 +1333,16 @@ export interface UpdateMaintenanceWindowTaskRequest { TaskArn?: string; /** - *

    The Amazon Resource Name (ARN) of the IAM service role for Amazon Web Services Systems Manager to assume when running a - * maintenance window task. If you do not specify a service role ARN, Systems Manager uses your account's - * service-linked role. If no service-linked role for Systems Manager exists in your account, it is created when you run - * RegisterTaskWithMaintenanceWindow.

    - *

    For more information, see Using - * service-linked roles for Systems Manager in the in the Amazon Web Services Systems Manager User Guide:

    + *

    The Amazon Resource Name (ARN) of the IAM service role for + * Amazon Web Services Systems Manager to assume when running a maintenance window task. If you do not specify a + * service role ARN, Systems Manager uses a service-linked role in your account. If no + * appropriate service-linked role for Systems Manager exists in your account, it is created when + * you run RegisterTaskWithMaintenanceWindow.

    + *

    However, for an improved security posture, we strongly recommend creating a custom + * policy and custom service role for running your maintenance window tasks. The policy + * can be crafted to provide only the permissions needed for your particular + * maintenance window tasks. For more information, see Setting up maintenance windows in the in the + * Amazon Web Services Systems Manager User Guide.

    * @public */ ServiceRoleArn?: string; diff --git a/clients/client-ssm/src/pagination/DescribeInstancePropertiesPaginator.ts b/clients/client-ssm/src/pagination/DescribeInstancePropertiesPaginator.ts new file mode 100644 index 000000000000..dd9585a5e9ec --- /dev/null +++ b/clients/client-ssm/src/pagination/DescribeInstancePropertiesPaginator.ts @@ -0,0 +1,24 @@ +// smithy-typescript generated code +import { createPaginator } from "@smithy/core"; +import { Paginator } from "@smithy/types"; + +import { + DescribeInstancePropertiesCommand, + DescribeInstancePropertiesCommandInput, + DescribeInstancePropertiesCommandOutput, +} from "../commands/DescribeInstancePropertiesCommand"; +import { SSMClient } from "../SSMClient"; +import { SSMPaginationConfiguration } from "./Interfaces"; + +/** + * @public + */ +export const paginateDescribeInstanceProperties: ( + config: SSMPaginationConfiguration, + input: DescribeInstancePropertiesCommandInput, + ...rest: any[] +) => Paginator = createPaginator< + SSMPaginationConfiguration, + DescribeInstancePropertiesCommandInput, + DescribeInstancePropertiesCommandOutput +>(SSMClient, DescribeInstancePropertiesCommand, "NextToken", "NextToken", "MaxResults"); diff --git a/clients/client-ssm/src/pagination/index.ts b/clients/client-ssm/src/pagination/index.ts index 29b20ab9bb23..a4a4ffd78920 100644 --- a/clients/client-ssm/src/pagination/index.ts +++ b/clients/client-ssm/src/pagination/index.ts @@ -22,6 +22,7 @@ export * from "./Interfaces"; export * from "./DescribeInstancePatchStatesForPatchGroupPaginator"; export * from "./DescribeInstancePatchStatesPaginator"; export * from "./DescribeInstancePatchesPaginator"; +export * from "./DescribeInstancePropertiesPaginator"; export * from "./DescribeInventoryDeletionsPaginator"; export * from "./DescribeMaintenanceWindowExecutionTaskInvocationsPaginator"; export * from "./DescribeMaintenanceWindowExecutionTasksPaginator"; diff --git a/clients/client-ssm/src/protocols/Aws_json1_1.ts b/clients/client-ssm/src/protocols/Aws_json1_1.ts index 5002ca24f440..a40cbf202016 100644 --- a/clients/client-ssm/src/protocols/Aws_json1_1.ts +++ b/clients/client-ssm/src/protocols/Aws_json1_1.ts @@ -155,6 +155,10 @@ import { DescribeInstancePatchStatesForPatchGroupCommandInput, DescribeInstancePatchStatesForPatchGroupCommandOutput, } from "../commands/DescribeInstancePatchStatesForPatchGroupCommand"; +import { + DescribeInstancePropertiesCommandInput, + DescribeInstancePropertiesCommandOutput, +} from "../commands/DescribeInstancePropertiesCommand"; import { DescribeInventoryDeletionsCommandInput, DescribeInventoryDeletionsCommandOutput, @@ -522,6 +526,8 @@ import { DescribeInstancePatchStatesForPatchGroupResult, DescribeInstancePatchStatesRequest, DescribeInstancePatchStatesResult, + DescribeInstancePropertiesRequest, + DescribeInstancePropertiesResult, DescribeInventoryDeletionsRequest, DescribeInventoryDeletionsResult, DescribeMaintenanceWindowExecutionsRequest, @@ -531,10 +537,7 @@ import { DescribeMaintenanceWindowExecutionTasksRequest, DescribeMaintenanceWindowExecutionTasksResult, DescribeMaintenanceWindowScheduleRequest, - DescribeMaintenanceWindowsForTargetRequest, DescribeMaintenanceWindowsRequest, - DescribeMaintenanceWindowTargetsRequest, - DescribeMaintenanceWindowTasksRequest, DocumentAlreadyExists, DocumentDescription, DocumentLimitExceeded, @@ -550,6 +553,9 @@ import { InstanceInformationStringFilter, InstancePatchState, InstancePatchStateFilter, + InstanceProperty, + InstancePropertyFilter, + InstancePropertyStringFilter, InternalServerError, InvalidActivation, InvalidActivationId, @@ -567,6 +573,7 @@ import { InvalidFilterValue, InvalidInstanceId, InvalidInstanceInformationFilterValue, + InvalidInstancePropertyFilterValue, InvalidInventoryRequestException, InvalidNextToken, InvalidOptionException, @@ -647,7 +654,6 @@ import { Association, AssociationFilter, AssociationVersionInfo, - AutomationDefinitionNotApprovedException, AutomationDefinitionNotFoundException, AutomationDefinitionVersionNotFoundException, AutomationExecution, @@ -665,6 +671,9 @@ import { ComplianceStringFilter, ComplianceTypeCountLimitExceededException, CustomSchemaCountLimitExceededException, + DescribeMaintenanceWindowsForTargetRequest, + DescribeMaintenanceWindowTargetsRequest, + DescribeMaintenanceWindowTasksRequest, DescribeOpsItemsRequest, DescribeOpsItemsResponse, DescribeParametersRequest, @@ -730,7 +739,6 @@ import { InvalidAssociation, InvalidAutomationExecutionParametersException, InvalidAutomationSignalException, - InvalidAutomationStatusUpdateException, InvalidDocumentType, InvalidFilterOption, InvalidInventoryGroupException, @@ -839,10 +847,7 @@ import { SessionFilter, StartAssociationsOnceRequest, StartAutomationExecutionRequest, - StartChangeRequestExecutionRequest, - StartSessionRequest, SubTypeCountLimitExceededException, - TargetNotConnected, TotalSizeLimitExceededException, UnsupportedCalendarException, UnsupportedFeatureRequiredException, @@ -852,19 +857,24 @@ import { } from "../models/models_1"; import { AssociationVersionLimitExceeded, + AutomationDefinitionNotApprovedException, DocumentReviews, DocumentVersionLimitExceeded, DuplicateDocumentContent, DuplicateDocumentVersionName, GetInventoryRequest, GetOpsSummaryRequest, + InvalidAutomationStatusUpdateException, InvalidUpdate, InventoryAggregator, OpsAggregator, OpsMetadataKeyLimitExceededException, ResourceDataSyncConflictException, + StartChangeRequestExecutionRequest, + StartSessionRequest, StatusUnchanged, StopAutomationExecutionRequest, + TargetNotConnected, TerminateSessionRequest, UnlabelParameterVersionRequest, UpdateAssociationRequest, @@ -1474,6 +1484,19 @@ export const se_DescribeInstancePatchStatesForPatchGroupCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +/** + * serializeAws_json1_1DescribeInstancePropertiesCommand + */ +export const se_DescribeInstancePropertiesCommand = async ( + input: DescribeInstancePropertiesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("DescribeInstanceProperties"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + /** * serializeAws_json1_1DescribeInventoryDeletionsCommand */ @@ -3596,6 +3619,26 @@ export const de_DescribeInstancePatchStatesForPatchGroupCommand = async ( return response; }; +/** + * deserializeAws_json1_1DescribeInstancePropertiesCommand + */ +export const de_DescribeInstancePropertiesCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_DescribeInstancePropertiesResult(data, context); + const response: DescribeInstancePropertiesCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + /** * deserializeAws_json1_1DescribeInventoryDeletionsCommand */ @@ -5696,6 +5739,9 @@ const de_CommandError = async (output: __HttpResponse, context: __SerdeContext): case "InvalidInstanceInformationFilterValue": case "com.amazonaws.ssm#InvalidInstanceInformationFilterValue": throw await de_InvalidInstanceInformationFilterValueRes(parsedOutput, context); + case "InvalidInstancePropertyFilterValue": + case "com.amazonaws.ssm#InvalidInstancePropertyFilterValue": + throw await de_InvalidInstancePropertyFilterValueRes(parsedOutput, context); case "InvalidDeletionIdException": case "com.amazonaws.ssm#InvalidDeletionIdException": throw await de_InvalidDeletionIdExceptionRes(parsedOutput, context); @@ -6698,6 +6744,22 @@ const de_InvalidInstanceInformationFilterValueRes = async ( return __decorateServiceException(exception, body); }; +/** + * deserializeAws_json1_1InvalidInstancePropertyFilterValueRes + */ +const de_InvalidInstancePropertyFilterValueRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new InvalidInstancePropertyFilterValue({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + /** * deserializeAws_json1_1InvalidInventoryGroupExceptionRes */ @@ -8177,6 +8239,8 @@ const se_DeleteInventoryRequest = (input: DeleteInventoryRequest, context: __Ser // se_DescribeInstancePatchStatesRequest omitted. +// se_DescribeInstancePropertiesRequest omitted. + // se_DescribeInventoryDeletionsRequest omitted. // se_DescribeMaintenanceWindowExecutionsRequest omitted. @@ -8324,6 +8388,16 @@ const se_GetOpsSummaryRequest = (input: GetOpsSummaryRequest, context: __SerdeCo // se_InstancePatchStateFilterValues omitted. +// se_InstancePropertyFilter omitted. + +// se_InstancePropertyFilterList omitted. + +// se_InstancePropertyFilterValueSet omitted. + +// se_InstancePropertyStringFilter omitted. + +// se_InstancePropertyStringFilterList omitted. + /** * serializeAws_json1_1InventoryAggregator */ @@ -9650,6 +9724,19 @@ const de_DescribeInstancePatchStatesResult = ( }) as any; }; +/** + * deserializeAws_json1_1DescribeInstancePropertiesResult + */ +const de_DescribeInstancePropertiesResult = ( + output: any, + context: __SerdeContext +): DescribeInstancePropertiesResult => { + return take(output, { + InstanceProperties: (_: any) => de_InstanceProperties(_, context), + NextToken: __expectString, + }) as any; +}; + /** * deserializeAws_json1_1DescribeInventoryDeletionsResult */ @@ -10348,6 +10435,52 @@ const de_InstancePatchStatesList = (output: any, context: __SerdeContext): Insta return retVal; }; +/** + * deserializeAws_json1_1InstanceProperties + */ +const de_InstanceProperties = (output: any, context: __SerdeContext): InstanceProperty[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_InstanceProperty(entry, context); + }); + return retVal; +}; + +/** + * deserializeAws_json1_1InstanceProperty + */ +const de_InstanceProperty = (output: any, context: __SerdeContext): InstanceProperty => { + return take(output, { + ActivationId: __expectString, + AgentVersion: __expectString, + Architecture: __expectString, + AssociationOverview: _json, + AssociationStatus: __expectString, + ComputerName: __expectString, + IPAddress: __expectString, + IamRole: __expectString, + InstanceId: __expectString, + InstanceRole: __expectString, + InstanceState: __expectString, + InstanceType: __expectString, + KeyName: __expectString, + LastAssociationExecutionDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastPingDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastSuccessfulAssociationExecutionDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LaunchTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + PingStatus: __expectString, + PlatformName: __expectString, + PlatformType: __expectString, + PlatformVersion: __expectString, + RegistrationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ResourceType: __expectString, + SourceId: __expectString, + SourceType: __expectString, + }) as any; +}; + // de_InternalServerError omitted. // de_InvalidActivation omitted. @@ -10398,6 +10531,8 @@ const de_InstancePatchStatesList = (output: any, context: __SerdeContext): Insta // de_InvalidInstanceInformationFilterValue omitted. +// de_InvalidInstancePropertyFilterValue omitted. + // de_InvalidInventoryGroupException omitted. // de_InvalidInventoryItemContextException omitted. diff --git a/codegen/sdk-codegen/aws-models/ssm.json b/codegen/sdk-codegen/aws-models/ssm.json index fb1030a93b2b..9147e3f158a8 100644 --- a/codegen/sdk-codegen/aws-models/ssm.json +++ b/codegen/sdk-codegen/aws-models/ssm.json @@ -533,6 +533,9 @@ { "target": "com.amazonaws.ssm#DescribeInstancePatchStatesForPatchGroup" }, + { + "target": "com.amazonaws.ssm#DescribeInstanceProperties" + }, { "target": "com.amazonaws.ssm#DescribeInventoryDeletions" }, @@ -1868,6 +1871,15 @@ } } }, + "com.amazonaws.ssm#Architecture": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 120 + } + } + }, "com.amazonaws.ssm#AssociateOpsItemRelatedItem": { "type": "operation", "input": { @@ -6186,7 +6198,7 @@ "Name": { "target": "com.amazonaws.ssm#DocumentName", "traits": { - "smithy.api#documentation": "

    A name for the SSM document.

    \n \n

    You can't use the following strings as document name prefixes. These are reserved by Amazon Web Services\n for use as document name prefixes:

    \n
      \n
    • \n

      \n aws\n

      \n
    • \n
    • \n

      \n amazon\n

      \n
    • \n
    • \n

      \n amzn\n

      \n
    • \n
    \n
    ", + "smithy.api#documentation": "

    A name for the SSM document.

    \n \n

    You can't use the following strings as document name prefixes. These are reserved by Amazon Web Services\n for use as document name prefixes:

    \n
      \n
    • \n

      \n aws\n

      \n
    • \n
    • \n

      \n amazon\n

      \n
    • \n
    • \n

      \n amzn\n

      \n
    • \n
    • \n

      \n AWSEC2\n

      \n
    • \n
    • \n

      \n AWSConfigRemediation\n

      \n
    • \n
    • \n

      \n AWSSupport\n

      \n
    • \n
    \n
    ", "smithy.api#required": {} } }, @@ -6287,7 +6299,7 @@ "StartDate": { "target": "com.amazonaws.ssm#MaintenanceWindowStringDateTime", "traits": { - "smithy.api#documentation": "

    The date and time, in ISO-8601 Extended format, for when you want the maintenance window to\n become active. StartDate allows you to delay activation of the maintenance window\n until the specified future date.

    " + "smithy.api#documentation": "

    The date and time, in ISO-8601 Extended format, for when you want the maintenance window to\n become active. StartDate allows you to delay activation of the maintenance window\n until the specified future date.

    \n \n

    When using a rate schedule, if you provide a start date that occurs in the past, the\n current date and time are used as the start date.

    \n
    " } }, "EndDate": { @@ -9058,6 +9070,108 @@ "smithy.api#output": {} } }, + "com.amazonaws.ssm#DescribeInstanceProperties": { + "type": "operation", + "input": { + "target": "com.amazonaws.ssm#DescribeInstancePropertiesRequest" + }, + "output": { + "target": "com.amazonaws.ssm#DescribeInstancePropertiesResult" + }, + "errors": [ + { + "target": "com.amazonaws.ssm#InternalServerError" + }, + { + "target": "com.amazonaws.ssm#InvalidActivationId" + }, + { + "target": "com.amazonaws.ssm#InvalidDocument" + }, + { + "target": "com.amazonaws.ssm#InvalidFilterKey" + }, + { + "target": "com.amazonaws.ssm#InvalidInstanceId" + }, + { + "target": "com.amazonaws.ssm#InvalidInstancePropertyFilterValue" + }, + { + "target": "com.amazonaws.ssm#InvalidNextToken" + } + ], + "traits": { + "smithy.api#documentation": "

    An API operation used by the Systems Manager console to display information about Systems Manager managed nodes.

    ", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "InstanceProperties", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.ssm#DescribeInstancePropertiesMaxResults": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 5, + "max": 1000 + } + } + }, + "com.amazonaws.ssm#DescribeInstancePropertiesRequest": { + "type": "structure", + "members": { + "InstancePropertyFilterList": { + "target": "com.amazonaws.ssm#InstancePropertyFilterList", + "traits": { + "smithy.api#documentation": "

    An array of instance property filters.

    " + } + }, + "FiltersWithOperator": { + "target": "com.amazonaws.ssm#InstancePropertyStringFilterList", + "traits": { + "smithy.api#documentation": "

    The request filters to use with the operator.

    " + } + }, + "MaxResults": { + "target": "com.amazonaws.ssm#DescribeInstancePropertiesMaxResults", + "traits": { + "smithy.api#documentation": "

    The maximum number of items to return for the call. The call also returns a token that you\n can specify in a subsequent call to get the next set of results.

    " + } + }, + "NextToken": { + "target": "com.amazonaws.ssm#NextToken", + "traits": { + "smithy.api#documentation": "

    The token provided by a previous request to use to return the next set of properties.

    " + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.ssm#DescribeInstancePropertiesResult": { + "type": "structure", + "members": { + "InstanceProperties": { + "target": "com.amazonaws.ssm#InstanceProperties", + "traits": { + "smithy.api#documentation": "

    Properties for the managed instances.

    " + } + }, + "NextToken": { + "target": "com.amazonaws.ssm#NextToken", + "traits": { + "smithy.api#documentation": "

    The token for the next set of properties to return. Use this token to get the next set of\n results.

    " + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.ssm#DescribeInventoryDeletions": { "type": "operation", "input": { @@ -13900,7 +14014,7 @@ "Names": { "target": "com.amazonaws.ssm#ParameterNameList", "traits": { - "smithy.api#documentation": "

    The names or Amazon Resource Names (ARNs) of the parameters that you want to query. For\n parameters shared with you from another account, you must use the full ARNs.

    \n

    To query by parameter label, use \"Name\": \"name:label\". To query by parameter\n version, use \"Name\": \"name:version\".

    \n

    For more information about shared parameters, see Working with\n shared parameters in the Amazon Web Services Systems Manager User Guide.

    ", + "smithy.api#documentation": "

    The names or Amazon Resource Names (ARNs) of the parameters that you want to query. For\n parameters shared with you from another account, you must use the full ARNs.

    \n

    To query by parameter label, use \"Name\": \"name:label\". To query by parameter\n version, use \"Name\": \"name:version\".

    \n \n

    The results for GetParameters requests are listed in alphabetical order in\n query responses.

    \n
    \n

    For information about shared parameters, see Working with\n shared parameters in the Amazon Web Services Systems Manager User Guide.

    ", "smithy.api#required": {} } }, @@ -14921,6 +15035,15 @@ } } }, + "com.amazonaws.ssm#InstanceName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 255 + } + } + }, "com.amazonaws.ssm#InstancePatchState": { "type": "structure", "members": { @@ -15190,6 +15313,403 @@ } } }, + "com.amazonaws.ssm#InstanceProperties": { + "type": "list", + "member": { + "target": "com.amazonaws.ssm#InstanceProperty", + "traits": { + "smithy.api#xmlName": "InstanceProperty" + } + } + }, + "com.amazonaws.ssm#InstanceProperty": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.ssm#InstanceName", + "traits": { + "smithy.api#documentation": "

    The value of the EC2 Name tag associated with the node. If a Name tag hasn't been applied to the node, this value is blank.

    " + } + }, + "InstanceId": { + "target": "com.amazonaws.ssm#InstanceId", + "traits": { + "smithy.api#documentation": "

    The ID of the managed node.

    " + } + }, + "InstanceType": { + "target": "com.amazonaws.ssm#InstanceType", + "traits": { + "smithy.api#documentation": "

    The instance type of the managed node. For example, t3.large.

    " + } + }, + "InstanceRole": { + "target": "com.amazonaws.ssm#InstanceRole", + "traits": { + "smithy.api#documentation": "

    The instance profile attached to the node. If an instance profile isn't attached to the node, this value is blank.

    " + } + }, + "KeyName": { + "target": "com.amazonaws.ssm#KeyName", + "traits": { + "smithy.api#documentation": "

    The name of the key pair associated with the node. If a key pair isnt't associated with the node, this value is blank.

    " + } + }, + "InstanceState": { + "target": "com.amazonaws.ssm#InstanceState", + "traits": { + "smithy.api#documentation": "

    The current state of the node.

    " + } + }, + "Architecture": { + "target": "com.amazonaws.ssm#Architecture", + "traits": { + "smithy.api#documentation": "

    The CPU architecture of the node. For example, x86_64.

    " + } + }, + "IPAddress": { + "target": "com.amazonaws.ssm#IPAddress", + "traits": { + "smithy.api#documentation": "

    The public IPv4 address assigned to the node. If a public IPv4 address isn't assigned to the node, this value is blank.

    " + } + }, + "LaunchTime": { + "target": "com.amazonaws.ssm#DateTime", + "traits": { + "smithy.api#documentation": "

    The timestamp for when the node was launched.

    " + } + }, + "PingStatus": { + "target": "com.amazonaws.ssm#PingStatus", + "traits": { + "smithy.api#documentation": "

    Connection status of the SSM Agent on the managed node.

    " + } + }, + "LastPingDateTime": { + "target": "com.amazonaws.ssm#DateTime", + "traits": { + "smithy.api#documentation": "

    The date and time when the SSM Agent last pinged the Systems Manager service.

    " + } + }, + "AgentVersion": { + "target": "com.amazonaws.ssm#Version", + "traits": { + "smithy.api#documentation": "

    The version of SSM Agent running on your managed node.

    " + } + }, + "PlatformType": { + "target": "com.amazonaws.ssm#PlatformType", + "traits": { + "smithy.api#documentation": "

    The operating system platform type of the managed node. For example, Windows.

    " + } + }, + "PlatformName": { + "target": "com.amazonaws.ssm#PlatformName", + "traits": { + "smithy.api#documentation": "

    The name of the operating system platform running on your managed node.

    " + } + }, + "PlatformVersion": { + "target": "com.amazonaws.ssm#PlatformVersion", + "traits": { + "smithy.api#documentation": "

    The version of the OS platform running on your managed node.

    " + } + }, + "ActivationId": { + "target": "com.amazonaws.ssm#ActivationId", + "traits": { + "smithy.api#documentation": "

    The activation ID created by Systems Manager when the server or virtual machine (VM) was registered

    " + } + }, + "IamRole": { + "target": "com.amazonaws.ssm#IamRole", + "traits": { + "smithy.api#documentation": "

    The IAM role used in the hybrid activation to register the node with Systems Manager.

    " + } + }, + "RegistrationDate": { + "target": "com.amazonaws.ssm#DateTime", + "traits": { + "smithy.api#documentation": "

    The date the node was registered with Systems Manager.

    " + } + }, + "ResourceType": { + "target": "com.amazonaws.ssm#String", + "traits": { + "smithy.api#documentation": "

    The type of managed node.

    " + } + }, + "ComputerName": { + "target": "com.amazonaws.ssm#ComputerName", + "traits": { + "smithy.api#documentation": "

    The fully qualified host name of the managed node.

    " + } + }, + "AssociationStatus": { + "target": "com.amazonaws.ssm#StatusName", + "traits": { + "smithy.api#documentation": "

    The status of the State Manager association applied to the managed node.

    " + } + }, + "LastAssociationExecutionDate": { + "target": "com.amazonaws.ssm#DateTime", + "traits": { + "smithy.api#documentation": "

    The date the association was last run.

    " + } + }, + "LastSuccessfulAssociationExecutionDate": { + "target": "com.amazonaws.ssm#DateTime", + "traits": { + "smithy.api#documentation": "

    The last date the association was successfully run.

    " + } + }, + "AssociationOverview": { + "target": "com.amazonaws.ssm#InstanceAggregatedAssociationOverview" + }, + "SourceId": { + "target": "com.amazonaws.ssm#SourceId", + "traits": { + "smithy.api#documentation": "

    The ID of the source resource.

    " + } + }, + "SourceType": { + "target": "com.amazonaws.ssm#SourceType", + "traits": { + "smithy.api#documentation": "

    The type of the source resource.

    " + } + } + }, + "traits": { + "smithy.api#documentation": "

    An object containing various properties of a managed node.

    " + } + }, + "com.amazonaws.ssm#InstancePropertyFilter": { + "type": "structure", + "members": { + "key": { + "target": "com.amazonaws.ssm#InstancePropertyFilterKey", + "traits": { + "smithy.api#documentation": "

    The name of the filter.

    ", + "smithy.api#required": {} + } + }, + "valueSet": { + "target": "com.amazonaws.ssm#InstancePropertyFilterValueSet", + "traits": { + "smithy.api#documentation": "

    The filter values.

    ", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

    Describes a filter for a specific list of managed nodes. You can filter node information by using tags. You specify tags by using a key-value mapping.

    " + } + }, + "com.amazonaws.ssm#InstancePropertyFilterKey": { + "type": "enum", + "members": { + "INSTANCE_IDS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "InstanceIds" + } + }, + "AGENT_VERSION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AgentVersion" + } + }, + "PING_STATUS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PingStatus" + } + }, + "PLATFORM_TYPES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PlatformTypes" + } + }, + "DOCUMENT_NAME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DocumentName" + } + }, + "ACTIVATION_IDS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ActivationIds" + } + }, + "IAM_ROLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IamRole" + } + }, + "RESOURCE_TYPE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ResourceType" + } + }, + "ASSOCIATION_STATUS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AssociationStatus" + } + } + } + }, + "com.amazonaws.ssm#InstancePropertyFilterList": { + "type": "list", + "member": { + "target": "com.amazonaws.ssm#InstancePropertyFilter", + "traits": { + "smithy.api#xmlName": "InstancePropertyFilter" + } + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 40 + } + } + }, + "com.amazonaws.ssm#InstancePropertyFilterOperator": { + "type": "enum", + "members": { + "EQUAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Equal" + } + }, + "NOT_EQUAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NotEqual" + } + }, + "BEGIN_WITH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BeginWith" + } + }, + "LESS_THAN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LessThan" + } + }, + "GREATER_THAN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GreaterThan" + } + } + } + }, + "com.amazonaws.ssm#InstancePropertyFilterValue": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 100000 + }, + "smithy.api#pattern": "^.{1,100000}$" + } + }, + "com.amazonaws.ssm#InstancePropertyFilterValueSet": { + "type": "list", + "member": { + "target": "com.amazonaws.ssm#InstancePropertyFilterValue", + "traits": { + "smithy.api#xmlName": "InstancePropertyFilterValue" + } + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 40 + } + } + }, + "com.amazonaws.ssm#InstancePropertyStringFilter": { + "type": "structure", + "members": { + "Key": { + "target": "com.amazonaws.ssm#InstancePropertyStringFilterKey", + "traits": { + "smithy.api#documentation": "

    The filter key name to describe your managed nodes.

    ", + "smithy.api#required": {} + } + }, + "Values": { + "target": "com.amazonaws.ssm#InstancePropertyFilterValueSet", + "traits": { + "smithy.api#documentation": "

    The filter key name to describe your managed nodes.

    ", + "smithy.api#required": {} + } + }, + "Operator": { + "target": "com.amazonaws.ssm#InstancePropertyFilterOperator", + "traits": { + "smithy.api#documentation": "

    The operator used by the filter call.

    " + } + } + }, + "traits": { + "smithy.api#documentation": "

    The filters to describe or get information about your managed nodes.

    " + } + }, + "com.amazonaws.ssm#InstancePropertyStringFilterKey": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 100000 + }, + "smithy.api#pattern": "^.{1,100000}$" + } + }, + "com.amazonaws.ssm#InstancePropertyStringFilterList": { + "type": "list", + "member": { + "target": "com.amazonaws.ssm#InstancePropertyStringFilter", + "traits": { + "smithy.api#xmlName": "InstancePropertyStringFilter" + } + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 40 + } + } + }, + "com.amazonaws.ssm#InstanceRole": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 120 + } + } + }, + "com.amazonaws.ssm#InstanceState": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 120 + } + } + }, "com.amazonaws.ssm#InstanceTagName": { "type": "string", "traits": { @@ -15199,6 +15719,15 @@ } } }, + "com.amazonaws.ssm#InstanceType": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 120 + } + } + }, "com.amazonaws.ssm#InstancesCount": { "type": "integer", "traits": { @@ -15615,6 +16144,22 @@ "smithy.api#error": "client" } }, + "com.amazonaws.ssm#InvalidInstancePropertyFilterValue": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.ssm#String" + } + }, + "traits": { + "aws.protocols#awsQueryError": { + "code": "InvalidInstancePropertyFilterValue", + "httpResponseCode": 400 + }, + "smithy.api#documentation": "

    The specified filter value isn't valid.

    ", + "smithy.api#error": "client" + } + }, "com.amazonaws.ssm#InvalidInventoryGroupException": { "type": "structure", "members": { @@ -16766,6 +17311,15 @@ "target": "com.amazonaws.ssm#TagKey" } }, + "com.amazonaws.ssm#KeyName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 255 + } + } + }, "com.amazonaws.ssm#LabelParameterVersion": { "type": "operation", "input": { @@ -23654,6 +24208,15 @@ } } }, + "com.amazonaws.ssm#PlatformName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 120 + } + } + }, "com.amazonaws.ssm#PlatformType": { "type": "enum", "members": { @@ -23686,6 +24249,15 @@ } } }, + "com.amazonaws.ssm#PlatformVersion": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 120 + } + } + }, "com.amazonaws.ssm#PoliciesLimitExceededException": { "type": "structure", "members": { @@ -24496,7 +25068,7 @@ "ServiceRoleArn": { "target": "com.amazonaws.ssm#ServiceRole", "traits": { - "smithy.api#documentation": "

    The Amazon Resource Name (ARN) of the IAM service role for Amazon Web Services Systems Manager to assume when running a \n maintenance window task. If you do not specify a service role ARN, Systems Manager uses your account's \n service-linked role. If no service-linked role for Systems Manager exists in your account, it is created when you run \n RegisterTaskWithMaintenanceWindow.

    \n

    For more information, see Using \n service-linked roles for Systems Manager in the in the Amazon Web Services Systems Manager User Guide:

    " + "smithy.api#documentation": "

    The Amazon Resource Name (ARN) of the IAM service role for\n Amazon Web Services Systems Manager to assume when running a maintenance window task. If you do not specify a\n service role ARN, Systems Manager uses a service-linked role in your account. If no\n appropriate service-linked role for Systems Manager exists in your account, it is created when\n you run RegisterTaskWithMaintenanceWindow.

    \n

    However, for an improved security posture, we strongly recommend creating a custom\n policy and custom service role for running your maintenance window tasks. The policy\n can be crafted to provide only the permissions needed for your particular\n maintenance window tasks. For more information, see Setting up maintenance windows in the in the\n Amazon Web Services Systems Manager User Guide.

    " } }, "TaskType": { @@ -27708,7 +28280,7 @@ } }, "traits": { - "smithy.api#documentation": "

    An array of search criteria that targets managed nodes using a key-value pair that you\n specify.

    \n \n

    One or more targets must be specified for maintenance window Run Command-type tasks.\n Depending on the task, targets are optional for other maintenance window task types (Automation,\n Lambda, and Step Functions). For more information about running tasks\n that don't specify targets, see Registering\n maintenance window tasks without targets in the\n Amazon Web Services Systems Manager User Guide.

    \n
    \n

    Supported formats include the following.

    \n
      \n
    • \n

      \n Key=InstanceIds,Values=,,\n

      \n
    • \n
    • \n

      \n Key=tag:,Values=,\n

      \n
    • \n
    • \n

      \n Key=tag-key,Values=,\n

      \n
    • \n
    • \n

      \n Run Command and Maintenance window targets only:\n Key=resource-groups:Name,Values=\n

      \n
    • \n
    • \n

      \n Maintenance window targets only:\n Key=resource-groups:ResourceTypeFilters,Values=,\n

      \n
    • \n
    • \n

      \n Automation targets only:\n Key=ResourceGroup;Values=\n

      \n
    • \n
    \n

    For example:

    \n
      \n
    • \n

      \n Key=InstanceIds,Values=i-02573cafcfEXAMPLE,i-0471e04240EXAMPLE,i-07782c72faEXAMPLE\n

      \n
    • \n
    • \n

      \n Key=tag:CostCenter,Values=CostCenter1,CostCenter2,CostCenter3\n

      \n
    • \n
    • \n

      \n Key=tag-key,Values=Name,Instance-Type,CostCenter\n

      \n
    • \n
    • \n

      \n Run Command and Maintenance window targets only:\n Key=resource-groups:Name,Values=ProductionResourceGroup\n

      \n

      This example demonstrates how to target all resources in the resource group ProductionResourceGroup in your maintenance window.

      \n
    • \n
    • \n

      \n Maintenance window targets only:\n Key=resource-groups:ResourceTypeFilters,Values=AWS::EC2::INSTANCE,AWS::EC2::VPC\n

      \n

      This example demonstrates how to target only Amazon Elastic Compute Cloud (Amazon EC2)\n instances and VPCs in your maintenance window.

      \n
    • \n
    • \n

      \n Automation targets only:\n Key=ResourceGroup,Values=MyResourceGroup\n

      \n
    • \n
    • \n

      \n State Manager association targets only:\n Key=InstanceIds,Values=*\n

      \n

      This example demonstrates how to target all managed instances in the Amazon Web Services Region where\n the association was created.

      \n
    • \n
    \n

    For more information about how to send commands that target managed nodes using\n Key,Value parameters, see Targeting multiple managed nodes in the Amazon Web Services Systems Manager User Guide.

    " + "smithy.api#documentation": "

    An array of search criteria that targets managed nodes using a key-value pair that you\n specify.

    \n \n

    One or more targets must be specified for maintenance window Run Command-type tasks.\n Depending on the task, targets are optional for other maintenance window task types (Automation,\n Lambda, and Step Functions). For more information about running tasks\n that don't specify targets, see Registering\n maintenance window tasks without targets in the\n Amazon Web Services Systems Manager User Guide.

    \n
    \n

    Supported formats include the following.

    \n

    \n For all Systems Manager capabilities:\n

    \n
      \n
    • \n

      \n Key=tag-key,Values=tag-value-1,tag-value-2\n

      \n
    • \n
    \n

    \n For Automation and Change Manager:\n

    \n
      \n
    • \n

      \n Key=tag:tag-key,Values=tag-value\n

      \n
    • \n
    • \n

      \n Key=ResourceGroup,Values=resource-group-name\n

      \n
    • \n
    • \n

      \n Key=ParameterValues,Values=value-1,value-2,value-3\n

      \n
    • \n
    • \n

      To target all instances in the Amazon Web Services Region:

      \n
        \n
      • \n

        \n Key=AWS::EC2::Instance,Values=*\n

        \n
      • \n
      • \n

        \n Key=InstanceIds,Values=*\n

        \n
      • \n
      \n
    • \n
    \n

    \n For Run Command and Maintenance Windows:\n

    \n
      \n
    • \n

      \n Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3\n

      \n
    • \n
    • \n

      \n Key=tag:tag-key,Values=tag-value-1,tag-value-2\n

      \n
    • \n
    • \n

      \n Key=resource-groups:Name,Values=resource-group-name\n

      \n
    • \n
    • \n

      Additionally, Maintenance Windows support targeting resource types:

      \n
        \n
      • \n

        \n Key=resource-groups:ResourceTypeFilters,Values=resource-type-1,resource-type-2\n

        \n
      • \n
      \n
    • \n
    \n

    \n For State Manager:\n

    \n
      \n
    • \n

      \n Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3\n

      \n
    • \n
    • \n

      \n Key=tag:tag-key,Values=tag-value-1,tag-value-2\n

      \n
    • \n
    • \n

      To target all instances in the Amazon Web Services Region:

      \n
        \n
      • \n

        \n Key=InstanceIds,Values=*\n

        \n
      • \n
      \n
    • \n
    \n

    For more information about how to send commands that target managed nodes using\n Key,Value parameters, see Targeting multiple managed nodes in the Amazon Web Services Systems Manager User Guide.

    " } }, "com.amazonaws.ssm#TargetCount": { @@ -28782,7 +29354,7 @@ "StartDate": { "target": "com.amazonaws.ssm#MaintenanceWindowStringDateTime", "traits": { - "smithy.api#documentation": "

    The date and time, in ISO-8601 Extended format, for when you want the maintenance window to\n become active. StartDate allows you to delay activation of the maintenance window\n until the specified future date.

    " + "smithy.api#documentation": "

    The date and time, in ISO-8601 Extended format, for when you want the maintenance window to\n become active. StartDate allows you to delay activation of the maintenance window\n until the specified future date.

    \n \n

    When using a rate schedule, if you provide a start date that occurs in the past, the\n current date and time are used as the start date.

    \n
    " } }, "EndDate": { @@ -29100,7 +29672,7 @@ "ServiceRoleArn": { "target": "com.amazonaws.ssm#ServiceRole", "traits": { - "smithy.api#documentation": "

    The Amazon Resource Name (ARN) of the IAM service role for Amazon Web Services Systems Manager to assume when running a \n maintenance window task. If you do not specify a service role ARN, Systems Manager uses your account's \n service-linked role. If no service-linked role for Systems Manager exists in your account, it is created when you run \n RegisterTaskWithMaintenanceWindow.

    \n

    For more information, see Using \n service-linked roles for Systems Manager in the in the Amazon Web Services Systems Manager User Guide:

    " + "smithy.api#documentation": "

    The Amazon Resource Name (ARN) of the IAM service role for\n Amazon Web Services Systems Manager to assume when running a maintenance window task. If you do not specify a\n service role ARN, Systems Manager uses a service-linked role in your account. If no\n appropriate service-linked role for Systems Manager exists in your account, it is created when\n you run RegisterTaskWithMaintenanceWindow.

    \n

    However, for an improved security posture, we strongly recommend creating a custom\n policy and custom service role for running your maintenance window tasks. The policy\n can be crafted to provide only the permissions needed for your particular\n maintenance window tasks. For more information, see Setting up maintenance windows in the in the\n Amazon Web Services Systems Manager User Guide.

    " } }, "TaskParameters": {