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

# CSharp: CosBackendAssumeRole

> CDKTN Core API Reference for CosBackendAssumeRole in CSharp.

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

```csharp theme={null}
using Io.Cdktn;

new CosBackendAssumeRole {
    string RoleArn,
    double SessionDuration,
    string SessionName,
    object Policy = null
};
```

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

| **Name**                                                                                        | **Type**            | **Description**                                                         |
| ----------------------------------------------------------------------------------------------- | ------------------- | ----------------------------------------------------------------------- |
| <code><a href="#cdktn.CosBackendAssumeRole.property.roleArn">RoleArn</a></code>                 | <code>string</code> | (Required) The ARN of the role to assume.                               |
| <code><a href="#cdktn.CosBackendAssumeRole.property.sessionDuration">SessionDuration</a></code> | <code>double</code> | (Required) The duration of the session when making the AssumeRole call. |
| <code><a href="#cdktn.CosBackendAssumeRole.property.sessionName">SessionName</a></code>         | <code>string</code> | (Required) The session name to use when making the AssumeRole call.     |
| <code><a href="#cdktn.CosBackendAssumeRole.property.policy">Policy</a></code>                   | <code>object</code> | (Optional) A more restrictive policy when making the AssumeRole call.   |

***

### `RoleArn`<sup>Required</sup> <a name="RoleArn" id="cdktn.CosBackendAssumeRole.property.roleArn" />

```csharp theme={null}
public string RoleArn { get; set; }
```

* *Type:* string

(Required) The ARN of the role to assume.

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

***

### `SessionDuration`<sup>Required</sup> <a name="SessionDuration" id="cdktn.CosBackendAssumeRole.property.sessionDuration" />

```csharp theme={null}
public double SessionDuration { get; set; }
```

* *Type:* double

(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> <a name="SessionName" id="cdktn.CosBackendAssumeRole.property.sessionName" />

```csharp theme={null}
public string SessionName { get; set; }
```

* *Type:* 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> <a name="Policy" id="cdktn.CosBackendAssumeRole.property.policy" />

```csharp theme={null}
public object Policy { get; set; }
```

* *Type:* 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).

***
