All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.cdk8s.Names Maven / Gradle / Ivy

package org.cdk8s;

/**
 * Utilities for generating unique and stable names.
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.90.0 (build d6bdb4d)", date = "2023-10-18T16:08:55.833Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Jsii(module = org.cdk8s.$Module.class, fqn = "cdk8s.Names")
public class Names extends software.amazon.jsii.JsiiObject {

    protected Names(final software.amazon.jsii.JsiiObjectRef objRef) {
        super(objRef);
    }

    protected Names(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
        super(initializationMode);
    }

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

* @param scope The construct for which to render the DNS label. This parameter is required. * @param options Name options. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.NotNull java.lang.String toDnsLabel(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.Nullable org.cdk8s.NameOptions options) { return software.amazon.jsii.JsiiObject.jsiiStaticCall(org.cdk8s.Names.class, "toDnsLabel", software.amazon.jsii.NativeType.forClass(java.lang.String.class), new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), 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. *

* @param scope The construct for which to render the DNS label. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.NotNull java.lang.String toDnsLabel(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope) { return software.amazon.jsii.JsiiObject.jsiiStaticCall(org.cdk8s.Names.class, "toDnsLabel", software.amazon.jsii.NativeType.forClass(java.lang.String.class), new Object[] { java.util.Objects.requireNonNull(scope, "scope is required") }); } /** * 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. *

* @param scope The construct for which to render the DNS label. This parameter is required. * @param options Name options. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.NotNull java.lang.String toLabelValue(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.Nullable org.cdk8s.NameOptions options) { return software.amazon.jsii.JsiiObject.jsiiStaticCall(org.cdk8s.Names.class, "toLabelValue", software.amazon.jsii.NativeType.forClass(java.lang.String.class), new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), 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. *

* @param scope The construct for which to render the DNS label. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.NotNull java.lang.String toLabelValue(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope) { return software.amazon.jsii.JsiiObject.jsiiStaticCall(org.cdk8s.Names.class, "toLabelValue", software.amazon.jsii.NativeType.forClass(java.lang.String.class), new Object[] { java.util.Objects.requireNonNull(scope, "scope is required") }); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy