Skip to content

Commit

Permalink
feat(client-ssm): Add SSM DescribeInstanceProperties API to public AW…
Browse files Browse the repository at this point in the history
…S SDK.
  • Loading branch information
awstools committed Apr 24, 2024
1 parent 6121a23 commit aef9d12
Show file tree
Hide file tree
Showing 18 changed files with 1,900 additions and 588 deletions.
8 changes: 8 additions & 0 deletions clients/client-ssm/README.md
Expand Up @@ -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/)

</details>
<details>
<summary>
DescribeInstanceProperties
</summary>

[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/)

</details>
<details>
<summary>
Expand Down
24 changes: 24 additions & 0 deletions clients/client-ssm/src/SSM.ts
Expand Up @@ -227,6 +227,11 @@ import {
DescribeInstancePatchStatesForPatchGroupCommandInput,
DescribeInstancePatchStatesForPatchGroupCommandOutput,
} from "./commands/DescribeInstancePatchStatesForPatchGroupCommand";
import {
DescribeInstancePropertiesCommand,
DescribeInstancePropertiesCommandInput,
DescribeInstancePropertiesCommandOutput,
} from "./commands/DescribeInstancePropertiesCommand";
import {
DescribeInventoryDeletionsCommand,
DescribeInventoryDeletionsCommandInput,
Expand Down Expand Up @@ -733,6 +738,7 @@ const commands = {
DescribeInstancePatchesCommand,
DescribeInstancePatchStatesCommand,
DescribeInstancePatchStatesForPatchGroupCommand,
DescribeInstancePropertiesCommand,
DescribeInventoryDeletionsCommand,
DescribeMaintenanceWindowExecutionsCommand,
DescribeMaintenanceWindowExecutionTaskInvocationsCommand,
Expand Down Expand Up @@ -1571,6 +1577,24 @@ export interface SSM {
cb: (err: any, data?: DescribeInstancePatchStatesForPatchGroupCommandOutput) => void
): void;

/**
* @see {@link DescribeInstancePropertiesCommand}
*/
describeInstanceProperties(): Promise<DescribeInstancePropertiesCommandOutput>;
describeInstanceProperties(
args: DescribeInstancePropertiesCommandInput,
options?: __HttpHandlerOptions
): Promise<DescribeInstancePropertiesCommandOutput>;
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}
*/
Expand Down
6 changes: 6 additions & 0 deletions clients/client-ssm/src/SSMClient.ts
Expand Up @@ -185,6 +185,10 @@ import {
DescribeInstancePatchStatesForPatchGroupCommandInput,
DescribeInstancePatchStatesForPatchGroupCommandOutput,
} from "./commands/DescribeInstancePatchStatesForPatchGroupCommand";
import {
DescribeInstancePropertiesCommandInput,
DescribeInstancePropertiesCommandOutput,
} from "./commands/DescribeInstancePropertiesCommand";
import {
DescribeInventoryDeletionsCommandInput,
DescribeInventoryDeletionsCommandOutput,
Expand Down Expand Up @@ -528,6 +532,7 @@ export type ServiceInputTypes =
| DescribeInstancePatchStatesCommandInput
| DescribeInstancePatchStatesForPatchGroupCommandInput
| DescribeInstancePatchesCommandInput
| DescribeInstancePropertiesCommandInput
| DescribeInventoryDeletionsCommandInput
| DescribeMaintenanceWindowExecutionTaskInvocationsCommandInput
| DescribeMaintenanceWindowExecutionTasksCommandInput
Expand Down Expand Up @@ -672,6 +677,7 @@ export type ServiceOutputTypes =
| DescribeInstancePatchStatesCommandOutput
| DescribeInstancePatchStatesForPatchGroupCommandOutput
| DescribeInstancePatchesCommandOutput
| DescribeInstancePropertiesCommandOutput
| DescribeInventoryDeletionsCommandOutput
| DescribeMaintenanceWindowExecutionTaskInvocationsCommandOutput
| DescribeMaintenanceWindowExecutionTasksCommandOutput
Expand Down
173 changes: 173 additions & 0 deletions 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 {}

/**
* <p>An API operation used by the Systems Manager console to display information about Systems Manager managed nodes.</p>
* @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
* // "<keys>": 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)
* <p>An error occurred on the server side.</p>
*
* @throws {@link InvalidActivationId} (client fault)
* <p>The activation ID isn't valid. Verify the you entered the correct ActivationId or
* ActivationCode and try again.</p>
*
* @throws {@link InvalidDocument} (client fault)
* <p>The specified SSM document doesn't exist.</p>
*
* @throws {@link InvalidFilterKey} (client fault)
* <p>The specified key isn't valid.</p>
*
* @throws {@link InvalidInstanceId} (client fault)
* <p>The following problems can cause this exception:</p>
* <ul>
* <li>
* <p>You don't have permission to access the managed node.</p>
* </li>
* <li>
* <p>Amazon Web Services Systems Manager Agent (SSM Agent) isn't running. Verify that SSM Agent is
* running.</p>
* </li>
* <li>
* <p>SSM Agent isn't registered with the SSM endpoint. Try reinstalling SSM Agent.</p>
* </li>
* <li>
* <p>The managed node isn't in a valid state. Valid states are: <code>Running</code>,
* <code>Pending</code>, <code>Stopped</code>, and <code>Stopping</code>. Invalid states are:
* <code>Shutting-down</code> and <code>Terminated</code>.</p>
* </li>
* </ul>
*
* @throws {@link InvalidInstancePropertyFilterValue} (client fault)
* <p>The specified filter value isn't valid.</p>
*
* @throws {@link InvalidNextToken} (client fault)
* <p>The specified token isn't valid.</p>
*
* @throws {@link SSMServiceException}
* <p>Base exception class for all service exceptions from SSM service.</p>
*
* @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() {}
Expand Up @@ -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,
Expand Down
Expand Up @@ -9,7 +9,7 @@ import {
DescribeMaintenanceWindowTargetsRequest,
DescribeMaintenanceWindowTargetsResult,
DescribeMaintenanceWindowTargetsResultFilterSensitiveLog,
} from "../models/models_0";
} from "../models/models_1";
import {
de_DescribeMaintenanceWindowTargetsCommand,
se_DescribeMaintenanceWindowTargetsCommand,
Expand Down
Expand Up @@ -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";
Expand Down
Expand Up @@ -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,
Expand Down
Expand Up @@ -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";

Expand Down
2 changes: 1 addition & 1 deletion clients/client-ssm/src/commands/StartSessionCommand.ts
Expand Up @@ -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";

Expand Down
1 change: 1 addition & 0 deletions clients/client-ssm/src/commands/index.ts
Expand Up @@ -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";
Expand Down

0 comments on commit aef9d12

Please sign in to comment.