Jump to Content

This API Documentation is now deprecated

We are excited to announce our new API Documentation.

Class DescribeDeviceEc2InstancesCommandProtected

Checks the current state of the Amazon EC2 instances. The output is similar to describeDevice, but the results are sourced from the device cache in the Amazon Web Services Cloud and include a subset of the available fields.

Example

Use a bare-bones client and the command you need to make an API call.

import { SnowDeviceManagementClient, DescribeDeviceEc2InstancesCommand } from "@aws-sdk/client-snow-device-management"; // ES Modules import
// const { SnowDeviceManagementClient, DescribeDeviceEc2InstancesCommand } = require("@aws-sdk/client-snow-device-management"); // CommonJS import
const client = new SnowDeviceManagementClient(config);
const input = { // DescribeDeviceEc2Input
managedDeviceId: "STRING_VALUE", // required
instanceIds: [ // InstanceIdsList // required
"STRING_VALUE",
],
};
const command = new DescribeDeviceEc2InstancesCommand(input);
const response = await client.send(command);
// { // DescribeDeviceEc2Output
// instances: [ // InstanceSummaryList
// { // InstanceSummary
// instance: { // Instance
// imageId: "STRING_VALUE",
// amiLaunchIndex: Number("int"),
// instanceId: "STRING_VALUE",
// state: { // InstanceState
// code: Number("int"),
// name: "STRING_VALUE",
// },
// instanceType: "STRING_VALUE",
// privateIpAddress: "STRING_VALUE",
// publicIpAddress: "STRING_VALUE",
// createdAt: new Date("TIMESTAMP"),
// updatedAt: new Date("TIMESTAMP"),
// blockDeviceMappings: [ // InstanceBlockDeviceMappingList
// { // InstanceBlockDeviceMapping
// deviceName: "STRING_VALUE",
// ebs: { // EbsInstanceBlockDevice
// attachTime: new Date("TIMESTAMP"),
// deleteOnTermination: true || false,
// status: "STRING_VALUE",
// volumeId: "STRING_VALUE",
// },
// },
// ],
// securityGroups: [ // SecurityGroupIdentifierList
// { // SecurityGroupIdentifier
// groupId: "STRING_VALUE",
// groupName: "STRING_VALUE",
// },
// ],
// cpuOptions: { // CpuOptions
// coreCount: Number("int"),
// threadsPerCore: Number("int"),
// },
// rootDeviceName: "STRING_VALUE",
// },
// lastUpdatedAt: new Date("TIMESTAMP"),
// },
// ],
// };

Param

DescribeDeviceEc2InstancesCommandInput

Returns

DescribeDeviceEc2InstancesCommandOutput

See

Throws

AccessDeniedException (client fault)

You don't have sufficient access to perform this action.

Throws

InternalServerException (server fault)

An unexpected error occurred while processing the request.

Throws

ResourceNotFoundException (client fault)

The request references a resource that doesn't exist.

Throws

ThrottlingException (client fault)

The request was denied due to request throttling.

Throws

ValidationException (client fault)

The input fails to satisfy the constraints specified by an Amazon Web Services service.

Throws

SnowDeviceManagementServiceException

Base exception class for all service exceptions from SnowDeviceManagement service.

Hierarchy

Constructors

Properties

Methods

Constructors

Properties

Methods