> ## Documentation Index
> Fetch the complete documentation index at: https://cdktn.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Python: ComplexObject

> CDKTN Core API Reference for ComplexObject in Python.

* *Implements:* <a href="#cdktn.IInterpolatingParent">IInterpolatingParent</a>, <a href="#cdktn.IResolvable">IResolvable</a>, <a href="#cdktn.ITerraformAddressable">ITerraformAddressable</a>

## Initializers <a name="Initializers" id="cdktn.ComplexObject.Initializer" />

```python theme={null}
import cdktn

cdktn.ComplexObject(
  terraform_resource: IInterpolatingParent,
  terraform_attribute: str,
  complex_object_is_from_set: bool,
  complex_object_index: str | typing.Union[int, float] = None
)
```

| **Name**                                                                                                                    | **Type**                                                                    | **Description**                                                                                                     |
| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| <code><a href="#cdktn.ComplexObject.Initializer.parameter.terraformResource">terraform\_resource</a></code>                 | <code><a href="#cdktn.IInterpolatingParent">IInterpolatingParent</a></code> | *No description.*                                                                                                   |
| <code><a href="#cdktn.ComplexObject.Initializer.parameter.terraformAttribute">terraform\_attribute</a></code>               | <code>str</code>                                                            | *No description.*                                                                                                   |
| <code><a href="#cdktn.ComplexObject.Initializer.parameter.complexObjectIsFromSet">complex\_object\_is\_from\_set</a></code> | <code>bool</code>                                                           | set to true if this item is from inside a set and needs tolist() for accessing it set to "0" for single list items. |
| <code><a href="#cdktn.ComplexObject.Initializer.parameter.complexObjectIndex">complex\_object\_index</a></code>             | <code>str \| typing.Union\[int, float]</code>                               | the index of the complex object in a list.                                                                          |

***

### `terraform_resource`<sup>Required</sup> <a name="terraform_resource" id="cdktn.ComplexObject.Initializer.parameter.terraformResource" />

* *Type:* <a href="#cdktn.IInterpolatingParent">IInterpolatingParent</a>

***

### `terraform_attribute`<sup>Required</sup> <a name="terraform_attribute" id="cdktn.ComplexObject.Initializer.parameter.terraformAttribute" />

* *Type:* str

***

### `complex_object_is_from_set`<sup>Required</sup> <a name="complex_object_is_from_set" id="cdktn.ComplexObject.Initializer.parameter.complexObjectIsFromSet" />

* *Type:* bool

set to true if this item is from inside a set and needs tolist() for accessing it set to "0" for single list items.

***

### `complex_object_index`<sup>Optional</sup> <a name="complex_object_index" id="cdktn.ComplexObject.Initializer.parameter.complexObjectIndex" />

* *Type:* str | typing.Union\[int, float]

the index of the complex object in a list.

***

## Methods <a name="Methods" id="Methods" />

| **Name**                                                                                                | **Description**                                           |
| ------------------------------------------------------------------------------------------------------- | --------------------------------------------------------- |
| <code><a href="#cdktn.ComplexObject.computeFqn">compute\_fqn</a></code>                                 | *No description.*                                         |
| <code><a href="#cdktn.ComplexObject.getAnyMapAttribute">get\_any\_map\_attribute</a></code>             | *No description.*                                         |
| <code><a href="#cdktn.ComplexObject.getBooleanAttribute">get\_boolean\_attribute</a></code>             | *No description.*                                         |
| <code><a href="#cdktn.ComplexObject.getBooleanMapAttribute">get\_boolean\_map\_attribute</a></code>     | *No description.*                                         |
| <code><a href="#cdktn.ComplexObject.getListAttribute">get\_list\_attribute</a></code>                   | *No description.*                                         |
| <code><a href="#cdktn.ComplexObject.getNumberAttribute">get\_number\_attribute</a></code>               | *No description.*                                         |
| <code><a href="#cdktn.ComplexObject.getNumberListAttribute">get\_number\_list\_attribute</a></code>     | *No description.*                                         |
| <code><a href="#cdktn.ComplexObject.getNumberMapAttribute">get\_number\_map\_attribute</a></code>       | *No description.*                                         |
| <code><a href="#cdktn.ComplexObject.getStringAttribute">get\_string\_attribute</a></code>               | *No description.*                                         |
| <code><a href="#cdktn.ComplexObject.getStringMapAttribute">get\_string\_map\_attribute</a></code>       | *No description.*                                         |
| <code><a href="#cdktn.ComplexObject.interpolationForAttribute">interpolation\_for\_attribute</a></code> | *No description.*                                         |
| <code><a href="#cdktn.ComplexObject.resolve">resolve</a></code>                                         | Produce the Token's value at resolution time.             |
| <code><a href="#cdktn.ComplexObject.toString">to\_string</a></code>                                     | Return a string representation of this resolvable object. |

***

### `compute_fqn` <a name="compute_fqn" id="cdktn.ComplexObject.computeFqn" />

```python theme={null}
def compute_fqn() -> str
```

### `get_any_map_attribute` <a name="get_any_map_attribute" id="cdktn.ComplexObject.getAnyMapAttribute" />

```python theme={null}
def get_any_map_attribute(
  terraform_attribute: str
) -> typing.Mapping[typing.Any]
```

#### `terraform_attribute`<sup>Required</sup> <a name="terraform_attribute" id="cdktn.ComplexObject.getAnyMapAttribute.parameter.terraformAttribute" />

* *Type:* str

***

### `get_boolean_attribute` <a name="get_boolean_attribute" id="cdktn.ComplexObject.getBooleanAttribute" />

```python theme={null}
def get_boolean_attribute(
  terraform_attribute: str
) -> IResolvable
```

#### `terraform_attribute`<sup>Required</sup> <a name="terraform_attribute" id="cdktn.ComplexObject.getBooleanAttribute.parameter.terraformAttribute" />

* *Type:* str

***

### `get_boolean_map_attribute` <a name="get_boolean_map_attribute" id="cdktn.ComplexObject.getBooleanMapAttribute" />

```python theme={null}
def get_boolean_map_attribute(
  terraform_attribute: str
) -> typing.Mapping[bool]
```

#### `terraform_attribute`<sup>Required</sup> <a name="terraform_attribute" id="cdktn.ComplexObject.getBooleanMapAttribute.parameter.terraformAttribute" />

* *Type:* str

***

### `get_list_attribute` <a name="get_list_attribute" id="cdktn.ComplexObject.getListAttribute" />

```python theme={null}
def get_list_attribute(
  terraform_attribute: str
) -> typing.List[str]
```

#### `terraform_attribute`<sup>Required</sup> <a name="terraform_attribute" id="cdktn.ComplexObject.getListAttribute.parameter.terraformAttribute" />

* *Type:* str

***

### `get_number_attribute` <a name="get_number_attribute" id="cdktn.ComplexObject.getNumberAttribute" />

```python theme={null}
def get_number_attribute(
  terraform_attribute: str
) -> typing.Union[int, float]
```

#### `terraform_attribute`<sup>Required</sup> <a name="terraform_attribute" id="cdktn.ComplexObject.getNumberAttribute.parameter.terraformAttribute" />

* *Type:* str

***

### `get_number_list_attribute` <a name="get_number_list_attribute" id="cdktn.ComplexObject.getNumberListAttribute" />

```python theme={null}
def get_number_list_attribute(
  terraform_attribute: str
) -> typing.List[typing.Union[int, float]]
```

#### `terraform_attribute`<sup>Required</sup> <a name="terraform_attribute" id="cdktn.ComplexObject.getNumberListAttribute.parameter.terraformAttribute" />

* *Type:* str

***

### `get_number_map_attribute` <a name="get_number_map_attribute" id="cdktn.ComplexObject.getNumberMapAttribute" />

```python theme={null}
def get_number_map_attribute(
  terraform_attribute: str
) -> typing.Mapping[typing.Union[int, float]]
```

#### `terraform_attribute`<sup>Required</sup> <a name="terraform_attribute" id="cdktn.ComplexObject.getNumberMapAttribute.parameter.terraformAttribute" />

* *Type:* str

***

### `get_string_attribute` <a name="get_string_attribute" id="cdktn.ComplexObject.getStringAttribute" />

```python theme={null}
def get_string_attribute(
  terraform_attribute: str
) -> str
```

#### `terraform_attribute`<sup>Required</sup> <a name="terraform_attribute" id="cdktn.ComplexObject.getStringAttribute.parameter.terraformAttribute" />

* *Type:* str

***

### `get_string_map_attribute` <a name="get_string_map_attribute" id="cdktn.ComplexObject.getStringMapAttribute" />

```python theme={null}
def get_string_map_attribute(
  terraform_attribute: str
) -> typing.Mapping[str]
```

#### `terraform_attribute`<sup>Required</sup> <a name="terraform_attribute" id="cdktn.ComplexObject.getStringMapAttribute.parameter.terraformAttribute" />

* *Type:* str

***

### `interpolation_for_attribute` <a name="interpolation_for_attribute" id="cdktn.ComplexObject.interpolationForAttribute" />

```python theme={null}
def interpolation_for_attribute(
  property: str
) -> IResolvable
```

#### `property`<sup>Required</sup> <a name="property" id="cdktn.ComplexObject.interpolationForAttribute.parameter.property" />

* *Type:* str

***

### `resolve` <a name="resolve" id="cdktn.ComplexObject.resolve" />

```python theme={null}
def resolve(
  _context: IResolveContext
) -> typing.Any
```

Produce the Token's value at resolution time.

#### `_context`<sup>Required</sup> <a name="_context" id="cdktn.ComplexObject.resolve.parameter._context" />

* *Type:* <a href="#cdktn.IResolveContext">IResolveContext</a>

***

### `to_string` <a name="to_string" id="cdktn.ComplexObject.toString" />

```python theme={null}
def to_string() -> str
```

Return a string representation of this resolvable object.

Returns a reversible string representation.

## Properties <a name="Properties" id="Properties" />

| **Name**                                                                               | **Type**                       | **Description**                                                                                  |
| -------------------------------------------------------------------------------------- | ------------------------------ | ------------------------------------------------------------------------------------------------ |
| <code><a href="#cdktn.ComplexObject.property.creationStack">creation\_stack</a></code> | <code>typing.List\[str]</code> | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
| <code><a href="#cdktn.ComplexObject.property.fqn">fqn</a></code>                       | <code>str</code>               | *No description.*                                                                                |

***

### `creation_stack`<sup>Required</sup> <a name="creation_stack" id="cdktn.ComplexObject.property.creationStack" />

```python theme={null}
creation_stack: typing.List[str]
```

* *Type:* typing.List\[str]

The creation stack of this resolvable which will be appended to errors thrown during resolution.

If this returns an empty array the stack will not be attached.

***

### `fqn`<sup>Required</sup> <a name="fqn" id="cdktn.ComplexObject.property.fqn" />

```python theme={null}
fqn: str
```

* *Type:* str

***
