|
| 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() {} |
0 commit comments