DescribeInstance
Source:
src/AWS/EC2/DescribeInstance.ts
Runtime binding for the DescribeInstances operation scoped to the bound
Instance (IAM action ec2:DescribeInstances; Describe* actions
do not support resource-level permissions, so the grant is on *).
Returns the bound instance’s live description — state, addresses, block
device mappings — e.g. a Lambda that reports whether a dev box is running.
Provide the implementation with
Effect.provide(AWS.EC2.DescribeInstanceHttp).
Observing Instances
Section titled “Observing Instances”// init — bind the operation to the instanceconst describeInstance = yield* AWS.EC2.DescribeInstance(instance);
// runtime — read the live descriptionconst live = yield* describeInstance();console.log(live?.State?.Name, live?.PrivateIpAddress);