> ## 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: OssBackendConfig

> CDKTN Core API Reference for OssBackendConfig in Typescript.

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

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

const ossBackendConfig: OssBackendConfig = { ... }
```

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

| **Name**                                                                                                            | **Type**                                                      | **Description**                                                                                                                                                                                                                                                                                                  |
| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <code><a href="#cdktn.OssBackendConfig.property.bucket">bucket</a></code>                                           | <code>string</code>                                           | (Required) The name of the OSS bucket.                                                                                                                                                                                                                                                                           |
| <code><a href="#cdktn.OssBackendConfig.property.accessKey">accessKey</a></code>                                     | <code>string</code>                                           | (Optional) Alibaba Cloud access key.                                                                                                                                                                                                                                                                             |
| <code><a href="#cdktn.OssBackendConfig.property.acl">acl</a></code>                                                 | <code>string</code>                                           | (Optional) Object ACL to be applied to the state file.                                                                                                                                                                                                                                                           |
| <code><a href="#cdktn.OssBackendConfig.property.assumeRole">assumeRole</a></code>                                   | <code><a href="#cdktn.OssAssumeRole">OssAssumeRole</a></code> | *No description.*                                                                                                                                                                                                                                                                                                |
| <code><a href="#cdktn.OssBackendConfig.property.assumeRolePolicy">assumeRolePolicy</a></code>                       | <code>string</code>                                           | (Optional, Available in 1.1.0+) A more restrictive policy to apply to the temporary credentials. This gives you a way to further restrict the permissions for the resulting temporary security credentials. You cannot use this policy to grant permissions that exceed those of the role that is being assumed. |
| <code><a href="#cdktn.OssBackendConfig.property.assumeRoleRoleArn">assumeRoleRoleArn</a></code>                     | <code>string</code>                                           | (Optional, Available in 1.1.0+) The ARN of the role to assume. If ARN is set to an empty string, it does not perform role switching. It supports the environment variable ALICLOUD\_ASSUME\_ROLE\_ARN. Terraform executes configuration on account with provided credentials.                                    |
| <code><a href="#cdktn.OssBackendConfig.property.assumeRoleSessionExpiration">assumeRoleSessionExpiration</a></code> | <code>number</code>                                           | (Optional, Available in 1.1.0+) The time after which the established session for assuming role expires. Valid value range: \[900-3600] seconds. Default to 3600 (in this case Alibaba Cloud uses its own default value). It supports environment variable ALICLOUD\_ASSUME\_ROLE\_SESSION\_EXPIRATION.           |
| <code><a href="#cdktn.OssBackendConfig.property.assumeRoleSessionName">assumeRoleSessionName</a></code>             | <code>string</code>                                           | (Optional, Available in 1.1.0+) The session name to use when assuming the role. If omitted, 'terraform' is passed to the AssumeRole call as session name. It supports environment variable ALICLOUD\_ASSUME\_ROLE\_SESSION\_NAME.                                                                                |
| <code><a href="#cdktn.OssBackendConfig.property.ecsRoleName">ecsRoleName</a></code>                                 | <code>string</code>                                           | (Optional, Available in 0.12.14+) The RAM Role Name attached on a ECS instance for API operations. You can retrieve this from the 'Access Control' section of the Alibaba Cloud console.                                                                                                                         |
| <code><a href="#cdktn.OssBackendConfig.property.encrypt">encrypt</a></code>                                         | <code>boolean</code>                                          | (Optional) Whether to enable server side encryption of the state file.                                                                                                                                                                                                                                           |
| <code><a href="#cdktn.OssBackendConfig.property.endpoint">endpoint</a></code>                                       | <code>string</code>                                           | (Optional) A custom endpoint for the OSS API.                                                                                                                                                                                                                                                                    |
| <code><a href="#cdktn.OssBackendConfig.property.key">key</a></code>                                                 | <code>string</code>                                           | (Optional) The name of the state file.                                                                                                                                                                                                                                                                           |
| <code><a href="#cdktn.OssBackendConfig.property.prefix">prefix</a></code>                                           | <code>string</code>                                           | (Optional) The path directory of the state file will be stored.                                                                                                                                                                                                                                                  |
| <code><a href="#cdktn.OssBackendConfig.property.profile">profile</a></code>                                         | <code>string</code>                                           | (Optional, Available in 0.12.8+) This is the Alibaba Cloud profile name as set in the shared credentials file. It can also be sourced from the ALICLOUD\_PROFILE environment variable.                                                                                                                           |
| <code><a href="#cdktn.OssBackendConfig.property.region">region</a></code>                                           | <code>string</code>                                           | (Optional) The region of the OSS bucket.                                                                                                                                                                                                                                                                         |
| <code><a href="#cdktn.OssBackendConfig.property.secretKey">secretKey</a></code>                                     | <code>string</code>                                           | (Optional) Alibaba Cloud secret access key.                                                                                                                                                                                                                                                                      |
| <code><a href="#cdktn.OssBackendConfig.property.securityToken">securityToken</a></code>                             | <code>string</code>                                           | (Optional) STS access token.                                                                                                                                                                                                                                                                                     |
| <code><a href="#cdktn.OssBackendConfig.property.sharedCredentialsFile">sharedCredentialsFile</a></code>             | <code>string</code>                                           | (Optional, Available in 0.12.8+) This is the path to the shared credentials file. It can also be sourced from the ALICLOUD\_SHARED\_CREDENTIALS\_FILE environment variable. If this is not set and a profile is specified, \~/.aliyun/config.json will be used.                                                  |
| <code><a href="#cdktn.OssBackendConfig.property.stsEndpoint">stsEndpoint</a></code>                                 | <code>string</code>                                           | (Optional, Available in 1.0.11+) Custom endpoint for the AliCloud Security Token Service (STS) API. It supports environment variable ALICLOUD\_STS\_ENDPOINT.                                                                                                                                                    |
| <code><a href="#cdktn.OssBackendConfig.property.tablestoreEndpoint">tablestoreEndpoint</a></code>                   | <code>string</code>                                           | (Optional) A custom endpoint for the TableStore API.                                                                                                                                                                                                                                                             |
| <code><a href="#cdktn.OssBackendConfig.property.tablestoreTable">tablestoreTable</a></code>                         | <code>string</code>                                           | (Optional) A TableStore table for state locking and consistency.                                                                                                                                                                                                                                                 |

***

### `bucket`<sup>Required</sup> <a name="bucket" id="cdktn.OssBackendConfig.property.bucket" />

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

* *Type:* string

(Required) The name of the OSS bucket.

***

### `accessKey`<sup>Optional</sup> <a name="accessKey" id="cdktn.OssBackendConfig.property.accessKey" />

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

* *Type:* string

(Optional) Alibaba Cloud access key.

It supports environment variables ALICLOUD\_ACCESS\_KEY and ALICLOUD\_ACCESS\_KEY\_ID.

***

### `acl`<sup>Optional</sup> <a name="acl" id="cdktn.OssBackendConfig.property.acl" />

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

* *Type:* string

(Optional) Object ACL to be applied to the state file.

***

### ~~`assumeRole`~~<sup>Optional</sup> <a name="assumeRole" id="cdktn.OssBackendConfig.property.assumeRole" />

* *Deprecated:* Use flattened assume role options

```typescript theme={null}
public readonly assumeRole: OssAssumeRole;
```

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

***

### `assumeRolePolicy`<sup>Optional</sup> <a name="assumeRolePolicy" id="cdktn.OssBackendConfig.property.assumeRolePolicy" />

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

* *Type:* string

(Optional, Available in 1.1.0+) A more restrictive policy to apply to the temporary credentials. This gives you a way to further restrict the permissions for the resulting temporary security credentials. You cannot use this policy to grant permissions that exceed those of the role that is being assumed.

***

### `assumeRoleRoleArn`<sup>Optional</sup> <a name="assumeRoleRoleArn" id="cdktn.OssBackendConfig.property.assumeRoleRoleArn" />

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

* *Type:* string

(Optional, Available in 1.1.0+) The ARN of the role to assume. If ARN is set to an empty string, it does not perform role switching. It supports the environment variable ALICLOUD\_ASSUME\_ROLE\_ARN. Terraform executes configuration on account with provided credentials.

***

### `assumeRoleSessionExpiration`<sup>Optional</sup> <a name="assumeRoleSessionExpiration" id="cdktn.OssBackendConfig.property.assumeRoleSessionExpiration" />

```typescript theme={null}
public readonly assumeRoleSessionExpiration: number;
```

* *Type:* number

(Optional, Available in 1.1.0+) The time after which the established session for assuming role expires. Valid value range: \[900-3600] seconds. Default to 3600 (in this case Alibaba Cloud uses its own default value). It supports environment variable ALICLOUD\_ASSUME\_ROLE\_SESSION\_EXPIRATION.

***

### `assumeRoleSessionName`<sup>Optional</sup> <a name="assumeRoleSessionName" id="cdktn.OssBackendConfig.property.assumeRoleSessionName" />

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

* *Type:* string

(Optional, Available in 1.1.0+) The session name to use when assuming the role. If omitted, 'terraform' is passed to the AssumeRole call as session name. It supports environment variable ALICLOUD\_ASSUME\_ROLE\_SESSION\_NAME.

***

### `ecsRoleName`<sup>Optional</sup> <a name="ecsRoleName" id="cdktn.OssBackendConfig.property.ecsRoleName" />

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

* *Type:* string

(Optional, Available in 0.12.14+) The RAM Role Name attached on a ECS instance for API operations. You can retrieve this from the 'Access Control' section of the Alibaba Cloud console.

***

### `encrypt`<sup>Optional</sup> <a name="encrypt" id="cdktn.OssBackendConfig.property.encrypt" />

```typescript theme={null}
public readonly encrypt: boolean;
```

* *Type:* boolean

(Optional) Whether to enable server side encryption of the state file.

If it is true, OSS will use 'AES256' encryption algorithm to encrypt state file.

***

### `endpoint`<sup>Optional</sup> <a name="endpoint" id="cdktn.OssBackendConfig.property.endpoint" />

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

* *Type:* string

(Optional) A custom endpoint for the OSS API.

It supports environment variables ALICLOUD\_OSS\_ENDPOINT and OSS\_ENDPOINT.

***

### `key`<sup>Optional</sup> <a name="key" id="cdktn.OssBackendConfig.property.key" />

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

* *Type:* string

(Optional) The name of the state file.

Defaults to terraform.tfstate.

***

### `prefix`<sup>Optional</sup> <a name="prefix" id="cdktn.OssBackendConfig.property.prefix" />

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

* *Type:* string

(Optional) The path directory of the state file will be stored.

Default to "env:".

***

### `profile`<sup>Optional</sup> <a name="profile" id="cdktn.OssBackendConfig.property.profile" />

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

* *Type:* string

(Optional, Available in 0.12.8+) This is the Alibaba Cloud profile name as set in the shared credentials file. It can also be sourced from the ALICLOUD\_PROFILE environment variable.

***

### `region`<sup>Optional</sup> <a name="region" id="cdktn.OssBackendConfig.property.region" />

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

* *Type:* string

(Optional) The region of the OSS bucket.

It supports environment variables ALICLOUD\_REGION and ALICLOUD\_DEFAULT\_REGION.

***

### `secretKey`<sup>Optional</sup> <a name="secretKey" id="cdktn.OssBackendConfig.property.secretKey" />

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

* *Type:* string

(Optional) Alibaba Cloud secret access key.

It supports environment variables ALICLOUD\_SECRET\_KEY and ALICLOUD\_ACCESS\_KEY\_SECRET.

***

### `securityToken`<sup>Optional</sup> <a name="securityToken" id="cdktn.OssBackendConfig.property.securityToken" />

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

* *Type:* string

(Optional) STS access token.

It supports environment variable ALICLOUD\_SECURITY\_TOKEN.

***

### `sharedCredentialsFile`<sup>Optional</sup> <a name="sharedCredentialsFile" id="cdktn.OssBackendConfig.property.sharedCredentialsFile" />

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

* *Type:* string

(Optional, Available in 0.12.8+) This is the path to the shared credentials file. It can also be sourced from the ALICLOUD\_SHARED\_CREDENTIALS\_FILE environment variable. If this is not set and a profile is specified, \~/.aliyun/config.json will be used.

***

### `stsEndpoint`<sup>Optional</sup> <a name="stsEndpoint" id="cdktn.OssBackendConfig.property.stsEndpoint" />

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

* *Type:* string

(Optional, Available in 1.0.11+) Custom endpoint for the AliCloud Security Token Service (STS) API. It supports environment variable ALICLOUD\_STS\_ENDPOINT.

***

### `tablestoreEndpoint`<sup>Optional</sup> <a name="tablestoreEndpoint" id="cdktn.OssBackendConfig.property.tablestoreEndpoint" />

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

* *Type:* string

(Optional) A custom endpoint for the TableStore API.

***

### `tablestoreTable`<sup>Optional</sup> <a name="tablestoreTable" id="cdktn.OssBackendConfig.property.tablestoreTable" />

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

* *Type:* string

(Optional) A TableStore table for state locking and consistency.

The table must have a primary key named LockID of type String.

***
