# CfnRoleAliasProps

Properties for defining a `CfnRoleAlias`.

Used as props by: [CfnRoleAlias](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iot.CfnRoleAlias.html)

- Source: Generated at build time
- Type last changed: v2.227.0 · 21 Nov 2025

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_iot as iot } from 'aws-cdk-lib';
const cfnRoleAliasProps: iot.CfnRoleAliasProps = {
  roleArn: 'roleArn',

  // the properties below are optional
  credentialDurationSeconds: 123,
  roleAlias: 'roleAlias',
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
```

Python:

```python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_iot as iot

cfn_role_alias_props = iot.CfnRoleAliasProps(
    role_arn="roleArn",

    # the properties below are optional
    credential_duration_seconds=123,
    role_alias="roleAlias",
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.iot.*;

CfnRoleAliasProps cfnRoleAliasProps = CfnRoleAliasProps.builder()
        .roleArn("roleArn")

        // the properties below are optional
        .credentialDurationSeconds(123)
        .roleAlias("roleAlias")
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.IoT;

var cfnRoleAliasProps = new CfnRoleAliasProps {
    RoleArn = "roleArn",

    // the properties below are optional
    CredentialDurationSeconds = 123,
    RoleAlias = "roleAlias",
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } }
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnRoleAliasProps := &CfnRoleAliasProps{
	RoleArn: jsii.String("roleArn"),

	// the properties below are optional
	CredentialDurationSeconds: jsii.Number(123),
	RoleAlias: jsii.String("roleAlias"),
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}
```

## Properties

- `credentialDurationSeconds`: number = 3600 — The number of seconds for which the credential is valid.

- `roleAlias`: string — The role alias.

- `roleArn`: string | [IRoleRef](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_iam.IRoleRef.html) (required) — The role ARN.

- `tags`: [CfnTag](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — An array of key-value pairs to apply to this resource.

  For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html) .
