# UniqueResourceNameOptions

Options for creating a unique resource name.

- Source: [`core/lib/names.ts`](https://github.com/aws/aws-cdk/blob/v2.277.0/packages/aws-cdk-lib/core/lib/names.ts#L12)
- Type last changed: v2.29.0 · 23 Jun 2022

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
const uniqueResourceNameOptions: cdk.UniqueResourceNameOptions = {
  allowedSpecialCharacters: 'allowedSpecialCharacters',
  maxLength: 123,
  separator: 'separator',
};
```

Python:

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

unique_resource_name_options = cdk.UniqueResourceNameOptions(
    allowed_special_characters="allowedSpecialCharacters",
    max_length=123,
    separator="separator"
)
```

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.*;

UniqueResourceNameOptions uniqueResourceNameOptions = UniqueResourceNameOptions.builder()
        .allowedSpecialCharacters("allowedSpecialCharacters")
        .maxLength(123)
        .separator("separator")
        .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;

var uniqueResourceNameOptions = new UniqueResourceNameOptions {
    AllowedSpecialCharacters = "allowedSpecialCharacters",
    MaxLength = 123,
    Separator = "separator"
};
```

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 cdk "github.com/aws/aws-cdk-go/awscdk"

uniqueResourceNameOptions := &UniqueResourceNameOptions{
	AllowedSpecialCharacters: jsii.String("allowedSpecialCharacters"),
	MaxLength: jsii.Number(123),
	Separator: jsii.String("separator"),
}
```

## Properties

- `allowedSpecialCharacters`: string = none — Non-alphanumeric characters allowed in the unique resource name.

- `maxLength`: number = 256 — The maximum length of the unique resource name.

- `separator`: string = none — The separator used between the path components.
