- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
DescribeStackInstanceCommand
Returns the stack instance that's associated with the specified StackSet, Amazon Web Services account, and Amazon Web Services Region.
For a list of stack instances that are associated with a specific StackSet, use ListStackInstances.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { CloudFormationClient, DescribeStackInstanceCommand } from "@aws-sdk/client-cloudformation"; // ES Modules import
// const { CloudFormationClient, DescribeStackInstanceCommand } = require("@aws-sdk/client-cloudformation"); // CommonJS import
const client = new CloudFormationClient(config);
const input = { // DescribeStackInstanceInput
StackSetName: "STRING_VALUE", // required
StackInstanceAccount: "STRING_VALUE", // required
StackInstanceRegion: "STRING_VALUE", // required
CallAs: "SELF" || "DELEGATED_ADMIN",
};
const command = new DescribeStackInstanceCommand(input);
const response = await client.send(command);
// { // DescribeStackInstanceOutput
// StackInstance: { // StackInstance
// StackSetId: "STRING_VALUE",
// Region: "STRING_VALUE",
// Account: "STRING_VALUE",
// StackId: "STRING_VALUE",
// ParameterOverrides: [ // Parameters
// { // Parameter
// ParameterKey: "STRING_VALUE",
// ParameterValue: "STRING_VALUE",
// UsePreviousValue: true || false,
// ResolvedValue: "STRING_VALUE",
// },
// ],
// Status: "CURRENT" || "OUTDATED" || "INOPERABLE",
// StackInstanceStatus: { // StackInstanceComprehensiveStatus
// DetailedStatus: "PENDING" || "RUNNING" || "SUCCEEDED" || "FAILED" || "CANCELLED" || "INOPERABLE" || "SKIPPED_SUSPENDED_ACCOUNT" || "FAILED_IMPORT",
// },
// StatusReason: "STRING_VALUE",
// OrganizationalUnitId: "STRING_VALUE",
// DriftStatus: "DRIFTED" || "IN_SYNC" || "UNKNOWN" || "NOT_CHECKED",
// LastDriftCheckTimestamp: new Date("TIMESTAMP"),
// LastOperationId: "STRING_VALUE",
// },
// };
DescribeStackInstanceCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
StackInstanceAccount Required | string | undefined | The ID of an Amazon Web Services account that's associated with this stack instance. |
StackInstanceRegion Required | string | undefined | The name of a Region that's associated with this stack instance. |
StackSetName Required | string | undefined | The name or the unique stack ID of the stack set that you want to get stack instance information for. |
CallAs | CallAs | undefined | [Service-managed permissions] Specifies whether you are acting as an account administrator in the organization's management account or as a delegated administrator in a member account. By default,
|
DescribeStackInstanceCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
StackInstance | StackInstance | undefined | The stack instance that matches the specified request parameters. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
StackInstanceNotFoundException | client | The specified stack instance doesn't exist. |
StackSetNotFoundException | client | The specified stack set doesn't exist. |
CloudFormationServiceException | Base exception class for all service exceptions from CloudFormation service. |