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

> CDKTN Core API Reference for CosBackendAssumeRole in Java.

## Initializer&#x20;

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

CosBackendAssumeRole.builder()
    .roleArn(java.lang.String)
    .sessionDuration(java.lang.Number)
    .sessionName(java.lang.String)
//  .policy(java.lang.Object)
    .build();
```

## Properties&#x20;

| **Name** | **Type** | **Description** |
| - | - | - |
| `roleArn` | `java.lang.String` | (Required) The ARN of the role to assume. |
| `sessionDuration` | `java.lang.Number` | (Required) The duration of the session when making the AssumeRole call. |
| `sessionName` | `java.lang.String` | (Required) The session name to use when making the AssumeRole call. |
| `policy` | `java.lang.Object` | (Optional) A more restrictive policy when making the AssumeRole call. |

***

### `roleArn`<sup>Required</sup>&#x20;

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

* *Type:* java.lang.String

(Required) The ARN of the role to assume.

It can be sourced from the TENCENTCLOUD\_ASSUME\_ROLE\_ARN.

***

### `sessionDuration`<sup>Required</sup>&#x20;

```java theme={null}
public java.lang.Number getSessionDuration();
```

* *Type:* java.lang.Number

(Required) The duration of the session when making the AssumeRole call.

Its value ranges from 0 to 43200(seconds), and default is 7200 seconds.
It can be sourced from the TENCENTCLOUD\_ASSUME\_ROLE\_SESSION\_DURATION.

***

### `sessionName`<sup>Required</sup>&#x20;

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

* *Type:* java.lang.String

(Required) The session name to use when making the AssumeRole call.

It can be sourced from the TENCENTCLOUD\_ASSUME\_ROLE\_SESSION\_NAME.

***

### `policy`<sup>Optional</sup>&#x20;

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

* *Type:* java.lang.Object

(Optional) A more restrictive policy when making the AssumeRole call.

Its content must not contains principal elements.
Please refer to [policies syntax logic](https://www.tencentcloud.com/document/product/598/10603).

***


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.