Skip to content

Commit aef9d12

Browse files
author
awstools
committed
feat(client-ssm): Add SSM DescribeInstanceProperties API to public AWS SDK.
1 parent 6121a23 commit aef9d12

18 files changed

+1900
-588
lines changed

clients/client-ssm/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -597,6 +597,14 @@ DescribeInstancePatchStatesForPatchGroup
597597

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

600+
</details>
601+
<details>
602+
<summary>
603+
DescribeInstanceProperties
604+
</summary>
605+
606+
[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/)
607+
600608
</details>
601609
<details>
602610
<summary>

clients/client-ssm/src/SSM.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,11 @@ import {
227227
DescribeInstancePatchStatesForPatchGroupCommandInput,
228228
DescribeInstancePatchStatesForPatchGroupCommandOutput,
229229
} from "./commands/DescribeInstancePatchStatesForPatchGroupCommand";
230+
import {
231+
DescribeInstancePropertiesCommand,
232+
DescribeInstancePropertiesCommandInput,
233+
DescribeInstancePropertiesCommandOutput,
234+
} from "./commands/DescribeInstancePropertiesCommand";
230235
import {
231236
DescribeInventoryDeletionsCommand,
232237
DescribeInventoryDeletionsCommandInput,
@@ -733,6 +738,7 @@ const commands = {
733738
DescribeInstancePatchesCommand,
734739
DescribeInstancePatchStatesCommand,
735740
DescribeInstancePatchStatesForPatchGroupCommand,
741+
DescribeInstancePropertiesCommand,
736742
DescribeInventoryDeletionsCommand,
737743
DescribeMaintenanceWindowExecutionsCommand,
738744
DescribeMaintenanceWindowExecutionTaskInvocationsCommand,
@@ -1571,6 +1577,24 @@ export interface SSM {
15711577
cb: (err: any, data?: DescribeInstancePatchStatesForPatchGroupCommandOutput) => void
15721578
): void;
15731579

1580+
/**
1581+
* @see {@link DescribeInstancePropertiesCommand}
1582+
*/
1583+
describeInstanceProperties(): Promise<DescribeInstancePropertiesCommandOutput>;
1584+
describeInstanceProperties(
1585+
args: DescribeInstancePropertiesCommandInput,
1586+
options?: __HttpHandlerOptions
1587+
): Promise<DescribeInstancePropertiesCommandOutput>;
1588+
describeInstanceProperties(
1589+
args: DescribeInstancePropertiesCommandInput,
1590+
cb: (err: any, data?: DescribeInstancePropertiesCommandOutput) => void
1591+
): void;
1592+
describeInstanceProperties(
1593+
args: DescribeInstancePropertiesCommandInput,
1594+
options: __HttpHandlerOptions,
1595+
cb: (err: any, data?: DescribeInstancePropertiesCommandOutput) => void
1596+
): void;
1597+
15741598
/**
15751599
* @see {@link DescribeInventoryDeletionsCommand}
15761600
*/

clients/client-ssm/src/SSMClient.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,10 @@ import {
185185
DescribeInstancePatchStatesForPatchGroupCommandInput,
186186
DescribeInstancePatchStatesForPatchGroupCommandOutput,
187187
} from "./commands/DescribeInstancePatchStatesForPatchGroupCommand";
188+
import {
189+
DescribeInstancePropertiesCommandInput,
190+
DescribeInstancePropertiesCommandOutput,
191+
} from "./commands/DescribeInstancePropertiesCommand";
188192
import {
189193
DescribeInventoryDeletionsCommandInput,
190194
DescribeInventoryDeletionsCommandOutput,
@@ -528,6 +532,7 @@ export type ServiceInputTypes =
528532
| DescribeInstancePatchStatesCommandInput
529533
| DescribeInstancePatchStatesForPatchGroupCommandInput
530534
| DescribeInstancePatchesCommandInput
535+
| DescribeInstancePropertiesCommandInput
531536
| DescribeInventoryDeletionsCommandInput
532537
| DescribeMaintenanceWindowExecutionTaskInvocationsCommandInput
533538
| DescribeMaintenanceWindowExecutionTasksCommandInput
@@ -672,6 +677,7 @@ export type ServiceOutputTypes =
672677
| DescribeInstancePatchStatesCommandOutput
673678
| DescribeInstancePatchStatesForPatchGroupCommandOutput
674679
| DescribeInstancePatchesCommandOutput
680+
| DescribeInstancePropertiesCommandOutput
675681
| DescribeInventoryDeletionsCommandOutput
676682
| DescribeMaintenanceWindowExecutionTaskInvocationsCommandOutput
677683
| DescribeMaintenanceWindowExecutionTasksCommandOutput
Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
1+
// smithy-typescript generated code
2+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
3+
import { getSerdePlugin } from "@smithy/middleware-serde";
4+
import { Command as $Command } from "@smithy/smithy-client";
5+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
6+
7+
import { commonParams } from "../endpoint/EndpointParameters";
8+
import { DescribeInstancePropertiesRequest, DescribeInstancePropertiesResult } from "../models/models_0";
9+
import { de_DescribeInstancePropertiesCommand, se_DescribeInstancePropertiesCommand } from "../protocols/Aws_json1_1";
10+
import { ServiceInputTypes, ServiceOutputTypes, SSMClientResolvedConfig } from "../SSMClient";
11+
12+
/**
13+
* @public
14+
*/
15+
export { __MetadataBearer, $Command };
16+
/**
17+
* @public
18+
*
19+
* The input for {@link DescribeInstancePropertiesCommand}.
20+
*/
21+
export interface DescribeInstancePropertiesCommandInput extends DescribeInstancePropertiesRequest {}
22+
/**
23+
* @public
24+
*
25+
* The output of {@link DescribeInstancePropertiesCommand}.
26+
*/
27+
export interface DescribeInstancePropertiesCommandOutput extends DescribeInstancePropertiesResult, __MetadataBearer {}
28+
29+
/**
30+
* <p>An API operation used by the Systems Manager console to display information about Systems Manager managed nodes.</p>
31+
* @example
32+
* Use a bare-bones client and the command you need to make an API call.
33+
* ```javascript
34+
* import { SSMClient, DescribeInstancePropertiesCommand } from "@aws-sdk/client-ssm"; // ES Modules import
35+
* // const { SSMClient, DescribeInstancePropertiesCommand } = require("@aws-sdk/client-ssm"); // CommonJS import
36+
* const client = new SSMClient(config);
37+
* const input = { // DescribeInstancePropertiesRequest
38+
* InstancePropertyFilterList: [ // InstancePropertyFilterList
39+
* { // InstancePropertyFilter
40+
* key: "InstanceIds" || "AgentVersion" || "PingStatus" || "PlatformTypes" || "DocumentName" || "ActivationIds" || "IamRole" || "ResourceType" || "AssociationStatus", // required
41+
* valueSet: [ // InstancePropertyFilterValueSet // required
42+
* "STRING_VALUE",
43+
* ],
44+
* },
45+
* ],
46+
* FiltersWithOperator: [ // InstancePropertyStringFilterList
47+
* { // InstancePropertyStringFilter
48+
* Key: "STRING_VALUE", // required
49+
* Values: [ // required
50+
* "STRING_VALUE",
51+
* ],
52+
* Operator: "Equal" || "NotEqual" || "BeginWith" || "LessThan" || "GreaterThan",
53+
* },
54+
* ],
55+
* MaxResults: Number("int"),
56+
* NextToken: "STRING_VALUE",
57+
* };
58+
* const command = new DescribeInstancePropertiesCommand(input);
59+
* const response = await client.send(command);
60+
* // { // DescribeInstancePropertiesResult
61+
* // InstanceProperties: [ // InstanceProperties
62+
* // { // InstanceProperty
63+
* // Name: "STRING_VALUE",
64+
* // InstanceId: "STRING_VALUE",
65+
* // InstanceType: "STRING_VALUE",
66+
* // InstanceRole: "STRING_VALUE",
67+
* // KeyName: "STRING_VALUE",
68+
* // InstanceState: "STRING_VALUE",
69+
* // Architecture: "STRING_VALUE",
70+
* // IPAddress: "STRING_VALUE",
71+
* // LaunchTime: new Date("TIMESTAMP"),
72+
* // PingStatus: "Online" || "ConnectionLost" || "Inactive",
73+
* // LastPingDateTime: new Date("TIMESTAMP"),
74+
* // AgentVersion: "STRING_VALUE",
75+
* // PlatformType: "Windows" || "Linux" || "MacOS",
76+
* // PlatformName: "STRING_VALUE",
77+
* // PlatformVersion: "STRING_VALUE",
78+
* // ActivationId: "STRING_VALUE",
79+
* // IamRole: "STRING_VALUE",
80+
* // RegistrationDate: new Date("TIMESTAMP"),
81+
* // ResourceType: "STRING_VALUE",
82+
* // ComputerName: "STRING_VALUE",
83+
* // AssociationStatus: "STRING_VALUE",
84+
* // LastAssociationExecutionDate: new Date("TIMESTAMP"),
85+
* // LastSuccessfulAssociationExecutionDate: new Date("TIMESTAMP"),
86+
* // AssociationOverview: { // InstanceAggregatedAssociationOverview
87+
* // DetailedStatus: "STRING_VALUE",
88+
* // InstanceAssociationStatusAggregatedCount: { // InstanceAssociationStatusAggregatedCount
89+
* // "<keys>": Number("int"),
90+
* // },
91+
* // },
92+
* // SourceId: "STRING_VALUE",
93+
* // SourceType: "AWS::EC2::Instance" || "AWS::IoT::Thing" || "AWS::SSM::ManagedInstance",
94+
* // },
95+
* // ],
96+
* // NextToken: "STRING_VALUE",
97+
* // };
98+
*
99+
* ```
100+
*
101+
* @param DescribeInstancePropertiesCommandInput - {@link DescribeInstancePropertiesCommandInput}
102+
* @returns {@link DescribeInstancePropertiesCommandOutput}
103+
* @see {@link DescribeInstancePropertiesCommandInput} for command's `input` shape.
104+
* @see {@link DescribeInstancePropertiesCommandOutput} for command's `response` shape.
105+
* @see {@link SSMClientResolvedConfig | config} for SSMClient's `config` shape.
106+
*
107+
* @throws {@link InternalServerError} (server fault)
108+
* <p>An error occurred on the server side.</p>
109+
*
110+
* @throws {@link InvalidActivationId} (client fault)
111+
* <p>The activation ID isn't valid. Verify the you entered the correct ActivationId or
112+
* ActivationCode and try again.</p>
113+
*
114+
* @throws {@link InvalidDocument} (client fault)
115+
* <p>The specified SSM document doesn't exist.</p>
116+
*
117+
* @throws {@link InvalidFilterKey} (client fault)
118+
* <p>The specified key isn't valid.</p>
119+
*
120+
* @throws {@link InvalidInstanceId} (client fault)
121+
* <p>The following problems can cause this exception:</p>
122+
* <ul>
123+
* <li>
124+
* <p>You don't have permission to access the managed node.</p>
125+
* </li>
126+
* <li>
127+
* <p>Amazon Web Services Systems Manager Agent (SSM Agent) isn't running. Verify that SSM Agent is
128+
* running.</p>
129+
* </li>
130+
* <li>
131+
* <p>SSM Agent isn't registered with the SSM endpoint. Try reinstalling SSM Agent.</p>
132+
* </li>
133+
* <li>
134+
* <p>The managed node isn't in a valid state. Valid states are: <code>Running</code>,
135+
* <code>Pending</code>, <code>Stopped</code>, and <code>Stopping</code>. Invalid states are:
136+
* <code>Shutting-down</code> and <code>Terminated</code>.</p>
137+
* </li>
138+
* </ul>
139+
*
140+
* @throws {@link InvalidInstancePropertyFilterValue} (client fault)
141+
* <p>The specified filter value isn't valid.</p>
142+
*
143+
* @throws {@link InvalidNextToken} (client fault)
144+
* <p>The specified token isn't valid.</p>
145+
*
146+
* @throws {@link SSMServiceException}
147+
* <p>Base exception class for all service exceptions from SSM service.</p>
148+
*
149+
* @public
150+
*/
151+
export class DescribeInstancePropertiesCommand extends $Command
152+
.classBuilder<
153+
DescribeInstancePropertiesCommandInput,
154+
DescribeInstancePropertiesCommandOutput,
155+
SSMClientResolvedConfig,
156+
ServiceInputTypes,
157+
ServiceOutputTypes
158+
>()
159+
.ep({
160+
...commonParams,
161+
})
162+
.m(function (this: any, Command: any, cs: any, config: SSMClientResolvedConfig, o: any) {
163+
return [
164+
getSerdePlugin(config, this.serialize, this.deserialize),
165+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
166+
];
167+
})
168+
.s("AmazonSSM", "DescribeInstanceProperties", {})
169+
.n("SSMClient", "DescribeInstancePropertiesCommand")
170+
.f(void 0, void 0)
171+
.ser(se_DescribeInstancePropertiesCommand)
172+
.de(de_DescribeInstancePropertiesCommand)
173+
.build() {}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ import { Command as $Command } from "@smithy/smithy-client";
55
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
66

77
import { commonParams } from "../endpoint/EndpointParameters";
8-
import { DescribeMaintenanceWindowScheduleRequest, DescribeMaintenanceWindowScheduleResult } from "../models/models_0";
8+
import { DescribeMaintenanceWindowScheduleRequest } from "../models/models_0";
9+
import { DescribeMaintenanceWindowScheduleResult } from "../models/models_1";
910
import {
1011
de_DescribeMaintenanceWindowScheduleCommand,
1112
se_DescribeMaintenanceWindowScheduleCommand,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
DescribeMaintenanceWindowTargetsRequest,
1010
DescribeMaintenanceWindowTargetsResult,
1111
DescribeMaintenanceWindowTargetsResultFilterSensitiveLog,
12-
} from "../models/models_0";
12+
} from "../models/models_1";
1313
import {
1414
de_DescribeMaintenanceWindowTargetsCommand,
1515
se_DescribeMaintenanceWindowTargetsCommand,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import { Command as $Command } from "@smithy/smithy-client";
55
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
66

77
import { commonParams } from "../endpoint/EndpointParameters";
8-
import { DescribeMaintenanceWindowTasksRequest } from "../models/models_0";
98
import {
9+
DescribeMaintenanceWindowTasksRequest,
1010
DescribeMaintenanceWindowTasksResult,
1111
DescribeMaintenanceWindowTasksResultFilterSensitiveLog,
1212
} from "../models/models_1";

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { commonParams } from "../endpoint/EndpointParameters";
88
import {
99
DescribeMaintenanceWindowsForTargetRequest,
1010
DescribeMaintenanceWindowsForTargetResult,
11-
} from "../models/models_0";
11+
} from "../models/models_1";
1212
import {
1313
de_DescribeMaintenanceWindowsForTargetCommand,
1414
se_DescribeMaintenanceWindowsForTargetCommand,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { Command as $Command } from "@smithy/smithy-client";
55
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
66

77
import { commonParams } from "../endpoint/EndpointParameters";
8-
import { StartChangeRequestExecutionRequest, StartChangeRequestExecutionResult } from "../models/models_1";
8+
import { StartChangeRequestExecutionRequest, StartChangeRequestExecutionResult } from "../models/models_2";
99
import { de_StartChangeRequestExecutionCommand, se_StartChangeRequestExecutionCommand } from "../protocols/Aws_json1_1";
1010
import { ServiceInputTypes, ServiceOutputTypes, SSMClientResolvedConfig } from "../SSMClient";
1111

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { Command as $Command } from "@smithy/smithy-client";
55
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
66

77
import { commonParams } from "../endpoint/EndpointParameters";
8-
import { StartSessionRequest, StartSessionResponse } from "../models/models_1";
8+
import { StartSessionRequest, StartSessionResponse } from "../models/models_2";
99
import { de_StartSessionCommand, se_StartSessionCommand } from "../protocols/Aws_json1_1";
1010
import { ServiceInputTypes, ServiceOutputTypes, SSMClientResolvedConfig } from "../SSMClient";
1111

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ export * from "./DescribeInstanceInformationCommand";
4444
export * from "./DescribeInstancePatchStatesCommand";
4545
export * from "./DescribeInstancePatchStatesForPatchGroupCommand";
4646
export * from "./DescribeInstancePatchesCommand";
47+
export * from "./DescribeInstancePropertiesCommand";
4748
export * from "./DescribeInventoryDeletionsCommand";
4849
export * from "./DescribeMaintenanceWindowExecutionTaskInvocationsCommand";
4950
export * from "./DescribeMaintenanceWindowExecutionTasksCommand";

0 commit comments

Comments
 (0)