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

# Typescript: CosBackend

> CDKTN Core API Reference for CosBackend in Typescript.

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

```typescript theme={null}
import { CosBackend } from 'cdktn'

new CosBackend(scope: Construct, props: CosBackendConfig)
```

| **Name**                                                                       | **Type**                                                            | **Description**   |
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------- | ----------------- |
| <code><a href="#cdktn.CosBackend.Initializer.parameter.scope">scope</a></code> | <code>constructs.Construct</code>                                   | *No description.* |
| <code><a href="#cdktn.CosBackend.Initializer.parameter.props">props</a></code> | <code><a href="#cdktn.CosBackendConfig">CosBackendConfig</a></code> | *No description.* |

***

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

* *Type:* constructs.Construct

***

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

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

***

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

| **Name**                                                                                       | **Description**                                                                   |
| ---------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| <code><a href="#cdktn.CosBackend.toString">toString</a></code>                                 | Returns a string representation of this construct.                                |
| <code><a href="#cdktn.CosBackend.with">with</a></code>                                         | Applies one or more mixins to this construct.                                     |
| <code><a href="#cdktn.CosBackend.addOverride">addOverride</a></code>                           | *No description.*                                                                 |
| <code><a href="#cdktn.CosBackend.overrideLogicalId">overrideLogicalId</a></code>               | Overrides the auto-generated logical ID with a specific ID.                       |
| <code><a href="#cdktn.CosBackend.resetOverrideLogicalId">resetOverrideLogicalId</a></code>     | Resets a previously passed logical Id to use the auto-generated logical id again. |
| <code><a href="#cdktn.CosBackend.toHclTerraform">toHclTerraform</a></code>                     | *No description.*                                                                 |
| <code><a href="#cdktn.CosBackend.toMetadata">toMetadata</a></code>                             | *No description.*                                                                 |
| <code><a href="#cdktn.CosBackend.toTerraform">toTerraform</a></code>                           | Adds this resource to the terraform JSON output.                                  |
| <code><a href="#cdktn.CosBackend.getRemoteStateDataSource">getRemoteStateDataSource</a></code> | Creates a TerraformRemoteState resource that accesses this backend.               |

***

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

```typescript theme={null}
public toString(): string
```

Returns a string representation of this construct.

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

```typescript theme={null}
public with(mixins: ...IMixin[]): IConstruct
```

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.CosBackend.with.parameter.mixins" />

* *Type:* ...constructs.IMixin\[]

The mixins to apply.

***

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

```typescript theme={null}
public addOverride(path: string, value: any): void
```

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

* *Type:* string

***

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

* *Type:* any

***

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

```typescript theme={null}
public overrideLogicalId(newLogicalId: string): void
```

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

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

* *Type:* string

The new logical ID to use for this stack element.

***

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

```typescript theme={null}
public resetOverrideLogicalId(): void
```

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

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

```typescript theme={null}
public toHclTerraform(): any
```

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

```typescript theme={null}
public toMetadata(): any
```

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

```typescript theme={null}
public toTerraform(): any
```

Adds this resource to the terraform JSON output.

### `getRemoteStateDataSource` <a name="getRemoteStateDataSource" id="cdktn.CosBackend.getRemoteStateDataSource" />

```typescript theme={null}
public getRemoteStateDataSource(scope: Construct, name: string, _fromStack: string): TerraformRemoteState
```

Creates a TerraformRemoteState resource that accesses this backend.

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

* *Type:* constructs.Construct

***

#### `name`<sup>Required</sup> <a name="name" id="cdktn.CosBackend.getRemoteStateDataSource.parameter.name" />

* *Type:* string

***

#### `_fromStack`<sup>Required</sup> <a name="_fromStack" id="cdktn.CosBackend.getRemoteStateDataSource.parameter._fromStack" />

* *Type:* string

***

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

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

***

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

```typescript theme={null}
import { CosBackend } from 'cdktn'

CosBackend.isConstruct(x: any)
```

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.CosBackend.isConstruct.parameter.x" />

* *Type:* any

Any object.

***

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

```typescript theme={null}
import { CosBackend } from 'cdktn'

CosBackend.isTerraformElement(x: any)
```

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

* *Type:* any

***

### `isBackend` <a name="isBackend" id="cdktn.CosBackend.isBackend" />

```typescript theme={null}
import { CosBackend } from 'cdktn'

CosBackend.isBackend(x: any)
```

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

* *Type:* any

***

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

| **Name**                                                                                | **Type**                                                        | **Description**   |
| --------------------------------------------------------------------------------------- | --------------------------------------------------------------- | ----------------- |
| <code><a href="#cdktn.CosBackend.property.node">node</a></code>                         | <code>constructs.Node</code>                                    | The tree node.    |
| <code><a href="#cdktn.CosBackend.property.cdktfStack">cdktfStack</a></code>             | <code><a href="#cdktn.TerraformStack">TerraformStack</a></code> | *No description.* |
| <code><a href="#cdktn.CosBackend.property.fqn">fqn</a></code>                           | <code>string</code>                                             | *No description.* |
| <code><a href="#cdktn.CosBackend.property.friendlyUniqueId">friendlyUniqueId</a></code> | <code>string</code>                                             | *No description.* |

***

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

```typescript theme={null}
public readonly node: Node;
```

* *Type:* constructs.Node

The tree node.

***

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

```typescript theme={null}
public readonly cdktfStack: TerraformStack;
```

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

***

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

```typescript theme={null}
public readonly fqn: string;
```

* *Type:* string

***

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

```typescript theme={null}
public readonly friendlyUniqueId: string;
```

* *Type:* string

***
