Skip to content
v2.277.0

UniqueResourceNameOptions Struct ​

Options for creating a unique resource name.

Example ​

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
# 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
// 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();
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"
};
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 ​

allowedSpecialCharactersoptionalstringallowed_special_charactersoptionalstrallowedSpecialCharactersoptionalStringAllowedSpecialCharactersoptionalstringAllowedSpecialCharactersoptional*string = none #
Non-alphanumeric characters allowed in the unique resource name.
maxLengthoptionalnumbermax_lengthoptionalint | floatmaxLengthoptionalNumberMaxLengthoptionaldoubleMaxLengthoptional*float64 = 256 #
The maximum length of the unique resource name.
separatoroptionalstringseparatoroptionalstrseparatoroptionalStringSeparatoroptionalstringSeparatoroptional*string = none #
The separator used between the path components.