# IncludedNestedStack

The type returned from `CfnInclude.getNestedStack`. Contains both the NestedStack object and CfnInclude representations of the child stack.

- Source: [`cloudformation-include/lib/cfn-include.ts`](https://github.com/aws/aws-cdk/blob/v2.277.0/packages/aws-cdk-lib/cloudformation-include/lib/cfn-include.ts#L87)

## Example

TypeScript:

```ts
declare const parentTemplate: cfn_inc.CfnInclude;

const includedChildStack = parentTemplate.getNestedStack('ChildStack');
const childStack: core.NestedStack = includedChildStack.stack;
const childTemplate: cfn_inc.CfnInclude = includedChildStack.includedTemplate;
```

Python:

```python
# parent_template: cfn_inc.CfnInclude

included_child_stack = parent_template.get_nested_stack("ChildStack")
child_stack = included_child_stack.stack
child_template = included_child_stack.included_template
```

Java:

```java
CfnInclude parentTemplate;

IncludedNestedStack includedChildStack = parentTemplate.getNestedStack("ChildStack");
NestedStack childStack = includedChildStack.getStack();
CfnInclude childTemplate = includedChildStack.getIncludedTemplate();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
CfnInclude parentTemplate;

var includedChildStack = parentTemplate.GetNestedStack("ChildStack");
var childStack = includedChildStack.Stack;
var childTemplate = includedChildStack.IncludedTemplate;
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
var parentTemplate CfnInclude

includedChildStack := parentTemplate.GetNestedStack(jsii.String("ChildStack"))
childStack := includedChildStack.Stack
childTemplate := includedChildStack.IncludedTemplate
```

## Properties

- `includedTemplate`: [CfnInclude](/cdk/api/v2/docs/aws-cdk-lib.cloudformation_include.CfnInclude.html) (required) — The CfnInclude that represents the template, which can be used to access Resources and other template elements.

- `stack`: [NestedStack](/cdk/api/v2/docs/aws-cdk-lib.NestedStack.html) (required) — The NestedStack object which represents the scope of the template.
