Class Names
- java.lang.Object
-
- software.amazon.jsii.JsiiObject
-
- org.cdk8s.Names
-
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.55.1 (build 07d2d90)", date="2022-03-23T00:20:36.899Z") @Stability(Stable) public class Names extends software.amazon.jsii.JsiiObject
Utilities for generating unique and stable names.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
toDnsLabel(software.constructs.Construct scope)
Generates a unique and stable name compatible DNS_LABEL from RFC-1123 from a path.static String
toDnsLabel(software.constructs.Construct scope, NameOptions options)
Generates a unique and stable name compatible DNS_LABEL from RFC-1123 from a path.static String
toLabelValue(software.constructs.Construct scope)
Generates a unique and stable name compatible label key name segment and label value from a path.static String
toLabelValue(software.constructs.Construct scope, NameOptions options)
Generates a unique and stable name compatible label key name segment and label value from a path.-
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
-
-
-
-
Method Detail
-
toDnsLabel
@Stability(Stable) @NotNull public static String toDnsLabel(@NotNull software.constructs.Construct scope, @Nullable NameOptions options)
Generates a unique and stable name compatible DNS_LABEL from RFC-1123 from a path.The generated name will:
- contain at most 63 characters
- contain only lowercase alphanumeric characters or ‘-’
- start with an alphanumeric character
- end with an alphanumeric character
The generated name will have the form:
- -..- - Where
are the path components (assuming they are is separated by "/"). Note that if the total length is longer than 63 characters, we will trim the first components since the last components usually encode more meaning.
- Parameters:
scope
- The construct for which to render the DNS label. This parameter is required.options
- Name options.
-
toDnsLabel
@Stability(Stable) @NotNull public static String toDnsLabel(@NotNull software.constructs.Construct scope)
Generates a unique and stable name compatible DNS_LABEL from RFC-1123 from a path.The generated name will:
- contain at most 63 characters
- contain only lowercase alphanumeric characters or ‘-’
- start with an alphanumeric character
- end with an alphanumeric character
The generated name will have the form:
- -..- - Where
are the path components (assuming they are is separated by "/"). Note that if the total length is longer than 63 characters, we will trim the first components since the last components usually encode more meaning.
- Parameters:
scope
- The construct for which to render the DNS label. This parameter is required.
-
toLabelValue
@Stability(Stable) @NotNull public static String toLabelValue(@NotNull software.constructs.Construct scope, @Nullable NameOptions options)
Generates a unique and stable name compatible label key name segment and label value from a path.The name segment is required and must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between.
Valid label values must be 63 characters or less and must be empty or begin and end with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between.
The generated name will have the form:
.. Where
are the path components (assuming they are is separated by "/"). Note that if the total length is longer than 63 characters, we will trim the first components since the last components usually encode more meaning.
- Parameters:
scope
- The construct for which to render the DNS label. This parameter is required.options
- Name options.
-
toLabelValue
@Stability(Stable) @NotNull public static String toLabelValue(@NotNull software.constructs.Construct scope)
Generates a unique and stable name compatible label key name segment and label value from a path.The name segment is required and must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between.
Valid label values must be 63 characters or less and must be empty or begin and end with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between.
The generated name will have the form:
.. Where
are the path components (assuming they are is separated by "/"). Note that if the total length is longer than 63 characters, we will trim the first components since the last components usually encode more meaning.
- Parameters:
scope
- The construct for which to render the DNS label. This parameter is required.
-
-