> ## 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.

# Java: ImportableResource

> CDKTN Core API Reference for ImportableResource in Java.

Class used to represent an importable resource.

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

```java theme={null}
import io.cdktn.cdktn.ImportableResource;

new ImportableResource(Construct scope, java.lang.String name, IImportableConfig config);
```

| **Name**                                                                                 | **Type**                                                              | **Description**   |
| ---------------------------------------------------------------------------------------- | --------------------------------------------------------------------- | ----------------- |
| <code><a href="#cdktn.ImportableResource.Initializer.parameter.scope">scope</a></code>   | <code>software.constructs.Construct</code>                            | *No description.* |
| <code><a href="#cdktn.ImportableResource.Initializer.parameter.name">name</a></code>     | <code>java.lang.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:* software.constructs.Construct

***

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

* *Type:* java.lang.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.with">with</a></code>                                     | Applies one or more mixins to 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" />

```java theme={null}
public java.lang.String toString()
```

Returns a string representation of this construct.

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

```java theme={null}
public IConstruct with(IMixin... mixins)
```

Applies one or more mixins to this construct.

Mixins are applied in order. The list of constructs is captured at the
start of the call, so constructs added by a mixin will not be visited.
Use multiple `with()` calls if subsequent mixins should apply to added
constructs.

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

* *Type:* software.constructs.IMixin...

The mixins to apply.

***

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

```java theme={null}
public void addOverride(java.lang.String path, java.lang.Object value)
```

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

* *Type:* java.lang.String

***

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

* *Type:* java.lang.Object

***

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

```java theme={null}
public void overrideLogicalId(java.lang.String newLogicalId)
```

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

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

* *Type:* java.lang.String

The new logical ID to use for this stack element.

***

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

```java theme={null}
public void resetOverrideLogicalId()
```

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

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

```java theme={null}
public java.lang.Object toHclTerraform()
```

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

```java theme={null}
public java.lang.Object toMetadata()
```

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

```java theme={null}
public java.lang.Object toTerraform()
```

## 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" />

```java theme={null}
import io.cdktn.cdktn.ImportableResource;

ImportableResource.isConstruct(java.lang.Object x)
```

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:* java.lang.Object

Any object.

***

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

```java theme={null}
import io.cdktn.cdktn.ImportableResource;

ImportableResource.isTerraformElement(java.lang.Object x)
```

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

* *Type:* java.lang.Object

***

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

| **Name**                                                                                        | **Type**                                                        | **Description**   |
| ----------------------------------------------------------------------------------------------- | --------------------------------------------------------------- | ----------------- |
| <code><a href="#cdktn.ImportableResource.property.node">node</a></code>                         | <code>software.constructs.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>java.lang.String</code>                                   | *No description.* |
| <code><a href="#cdktn.ImportableResource.property.friendlyUniqueId">friendlyUniqueId</a></code> | <code>java.lang.String</code>                                   | *No description.* |

***

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

```java theme={null}
public Node getNode();
```

* *Type:* software.constructs.Node

The tree node.

***

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

```java theme={null}
public TerraformStack getCdktfStack();
```

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

***

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

```java theme={null}
public java.lang.String getFqn();
```

* *Type:* java.lang.String

***

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

```java theme={null}
public java.lang.String getFriendlyUniqueId();
```

* *Type:* java.lang.String

***
