> ## Documentation Index
> Fetch the complete documentation index at: https://cdkterrain-generate-function-bindings.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Go: ImportableResource

> CDKTN Core API Reference for ImportableResource in Go.

Class used to represent an importable resource.

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

```go theme={null}
import "github.com/open-constructs/cdk-terrain-go/cdktn"

cdktn.NewImportableResource(scope Construct, name *string, config IImportableConfig) ImportableResource
```

| **Name**                                                                                 | **Type**                                                              | **Description**   |
| ---------------------------------------------------------------------------------------- | --------------------------------------------------------------------- | ----------------- |
| <code><a href="#cdktn.ImportableResource.Initializer.parameter.scope">scope</a></code>   | <code>github.com/aws/constructs-go/constructs/v10.Construct</code>    | *No description.* |
| <code><a href="#cdktn.ImportableResource.Initializer.parameter.name">name</a></code>     | <code>\*string</code>                                                 | *No description.* |
| <code><a href="#cdktn.ImportableResource.Initializer.parameter.config">config</a></code> | <code><a href="#cdktn.IImportableConfig">IImportableConfig</a></code> | *No description.* |

***

### `scope`<sup>Required</sup> <a name="scope" id="cdktn.ImportableResource.Initializer.parameter.scope" />

* *Type:* github.com/aws/constructs-go/constructs/v10.Construct

***

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

* *Type:* \*string

***

### `config`<sup>Required</sup> <a name="config" id="cdktn.ImportableResource.Initializer.parameter.config" />

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

***

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

| **Name**                                                                                           | **Description**                                                                   |
| -------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| <code><a href="#cdktn.ImportableResource.toString">ToString</a></code>                             | Returns a string representation of this construct.                                |
| <code><a href="#cdktn.ImportableResource.addOverride">AddOverride</a></code>                       | *No description.*                                                                 |
| <code><a href="#cdktn.ImportableResource.overrideLogicalId">OverrideLogicalId</a></code>           | Overrides the auto-generated logical ID with a specific ID.                       |
| <code><a href="#cdktn.ImportableResource.resetOverrideLogicalId">ResetOverrideLogicalId</a></code> | Resets a previously passed logical Id to use the auto-generated logical id again. |
| <code><a href="#cdktn.ImportableResource.toHclTerraform">ToHclTerraform</a></code>                 | *No description.*                                                                 |
| <code><a href="#cdktn.ImportableResource.toMetadata">ToMetadata</a></code>                         | *No description.*                                                                 |
| <code><a href="#cdktn.ImportableResource.toTerraform">ToTerraform</a></code>                       | *No description.*                                                                 |

***

### `ToString` <a name="ToString" id="cdktn.ImportableResource.toString" />

```go theme={null}
func ToString() *string
```

Returns a string representation of this construct.

### `AddOverride` <a name="AddOverride" id="cdktn.ImportableResource.addOverride" />

```go theme={null}
func AddOverride(path *string, value interface{})
```

#### `path`<sup>Required</sup> <a name="path" id="cdktn.ImportableResource.addOverride.parameter.path" />

* *Type:* \*string

***

#### `value`<sup>Required</sup> <a name="value" id="cdktn.ImportableResource.addOverride.parameter.value" />

* *Type:* interface\{}

***

### `OverrideLogicalId` <a name="OverrideLogicalId" id="cdktn.ImportableResource.overrideLogicalId" />

```go theme={null}
func OverrideLogicalId(newLogicalId *string)
```

Overrides the auto-generated logical ID with a specific ID.

#### `newLogicalId`<sup>Required</sup> <a name="newLogicalId" id="cdktn.ImportableResource.overrideLogicalId.parameter.newLogicalId" />

* *Type:* \*string

The new logical ID to use for this stack element.

***

### `ResetOverrideLogicalId` <a name="ResetOverrideLogicalId" id="cdktn.ImportableResource.resetOverrideLogicalId" />

```go theme={null}
func ResetOverrideLogicalId()
```

Resets a previously passed logical Id to use the auto-generated logical id again.

### `ToHclTerraform` <a name="ToHclTerraform" id="cdktn.ImportableResource.toHclTerraform" />

```go theme={null}
func ToHclTerraform() interface{}
```

### `ToMetadata` <a name="ToMetadata" id="cdktn.ImportableResource.toMetadata" />

```go theme={null}
func ToMetadata() interface{}
```

### `ToTerraform` <a name="ToTerraform" id="cdktn.ImportableResource.toTerraform" />

```go theme={null}
func ToTerraform() interface{}
```

## Static Functions <a name="Static Functions" id="Static Functions" />

| **Name**                                                                                   | **Description**               |
| ------------------------------------------------------------------------------------------ | ----------------------------- |
| <code><a href="#cdktn.ImportableResource.isConstruct">IsConstruct</a></code>               | Checks if `x` is a construct. |
| <code><a href="#cdktn.ImportableResource.isTerraformElement">IsTerraformElement</a></code> | *No description.*             |

***

### `IsConstruct` <a name="IsConstruct" id="cdktn.ImportableResource.isConstruct" />

```go theme={null}
import "github.com/open-constructs/cdk-terrain-go/cdktn"

cdktn.ImportableResource_IsConstruct(x interface{}) *bool
```

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct`
instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on
disk are seen as independent, completely different libraries. As a
consequence, the class `Construct` in each copy of the `constructs` library
is seen as a different class, and an instance of one class will not test as
`instanceof` the other class. `npm install` will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the `constructs`
library can be accidentally installed, and `instanceof` will behave
unpredictably. It is safest to avoid using `instanceof`, and using
this type-testing method instead.

#### `x`<sup>Required</sup> <a name="x" id="cdktn.ImportableResource.isConstruct.parameter.x" />

* *Type:* interface\{}

Any object.

***

### `IsTerraformElement` <a name="IsTerraformElement" id="cdktn.ImportableResource.isTerraformElement" />

```go theme={null}
import "github.com/open-constructs/cdk-terrain-go/cdktn"

cdktn.ImportableResource_IsTerraformElement(x interface{}) *bool
```

#### `x`<sup>Required</sup> <a name="x" id="cdktn.ImportableResource.isTerraformElement.parameter.x" />

* *Type:* interface\{}

***

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

| **Name**                                                                                        | **Type**                                                        | **Description**   |
| ----------------------------------------------------------------------------------------------- | --------------------------------------------------------------- | ----------------- |
| <code><a href="#cdktn.ImportableResource.property.node">Node</a></code>                         | <code>github.com/aws/constructs-go/constructs/v10.Node</code>   | The tree node.    |
| <code><a href="#cdktn.ImportableResource.property.cdktfStack">CdktfStack</a></code>             | <code><a href="#cdktn.TerraformStack">TerraformStack</a></code> | *No description.* |
| <code><a href="#cdktn.ImportableResource.property.fqn">Fqn</a></code>                           | <code>\*string</code>                                           | *No description.* |
| <code><a href="#cdktn.ImportableResource.property.friendlyUniqueId">FriendlyUniqueId</a></code> | <code>\*string</code>                                           | *No description.* |

***

### `Node`<sup>Required</sup> <a name="Node" id="cdktn.ImportableResource.property.node" />

```go theme={null}
func Node() Node
```

* *Type:* github.com/aws/constructs-go/constructs/v10.Node

The tree node.

***

### `CdktfStack`<sup>Required</sup> <a name="CdktfStack" id="cdktn.ImportableResource.property.cdktfStack" />

```go theme={null}
func CdktfStack() TerraformStack
```

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

***

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

```go theme={null}
func Fqn() *string
```

* *Type:* \*string

***

### `FriendlyUniqueId`<sup>Required</sup> <a name="FriendlyUniqueId" id="cdktn.ImportableResource.property.friendlyUniqueId" />

```go theme={null}
func FriendlyUniqueId() *string
```

* *Type:* \*string

***
