Class Alias


  • public class Alias
    extends java.lang.Object
    Alias is a description of prior named used for a resource. It can be processed in the context of a resource creation to determine what the full aliased URN would be.

    Use @see Urn in the case where a prior URN is known and can just be specified in full. Otherwise, provide some subset of the other properties in this type to generate an appropriate urn from the pre-existing values of the @see Resource with certain parts overridden.

    The presence of a property indicates if its value should be used. If absent (i.e. "null"), then the value is not used.

    Note: because of the above, there needs to be special handling to indicate that the previous "parent" of a @see Resource was "null". Specifically, pass in: Alias.noParent()

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Alias.Builder  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static Alias.Builder builder()  
      java.util.Optional<Output<java.lang.String>> getName()
      The previous name of the resource.
      java.util.Optional<Resource> getParent()
      The previous parent of the resource.
      java.util.Optional<Output<java.lang.String>> getParentUrn()
      The previous parent of the resource.
      java.util.Optional<Output<java.lang.String>> getProject()
      The previous project of the resource.
      java.util.Optional<Output<java.lang.String>> getStack()
      The previous stack of the resource.
      java.util.Optional<Output<java.lang.String>> getType()
      The previous type of the resource.
      java.util.Optional<java.lang.String> getUrn()
      The previous urn to alias to.
      boolean hasNoParent()
      Used to indicate the resource previously had no parent.
      static Alias noParent()  
      static Alias withUrn​(java.lang.String urn)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • noParent

        public static Alias noParent()
      • withUrn

        public static Alias withUrn​(java.lang.String urn)
      • getUrn

        public java.util.Optional<java.lang.String> getUrn()
        The previous urn to alias to. If this is provided, no other properties in this type should be provided.
      • getName

        public java.util.Optional<Output<java.lang.String>> getName()
        The previous name of the resource. If empty, the current name of the resource is used.
      • getType

        public java.util.Optional<Output<java.lang.String>> getType()
        The previous type of the resource. If empty, the current type of the resource is used.
      • getStack

        public java.util.Optional<Output<java.lang.String>> getStack()
        The previous stack of the resource. If empty, defaults to the value of @see Deployment.getStackName()
      • getProject

        public java.util.Optional<Output<java.lang.String>> getProject()
        The previous project of the resource. If empty, defaults to the value of @see Deployment.getProjectName()
      • getParent

        public java.util.Optional<Resource> getParent()
        The previous parent of the resource. If empty, the current parent of the resource is used.

        To specify no original parent, use "noParent".

        Only specify one of "parent" or "parentUrn" or "noParent".

      • getParentUrn

        public java.util.Optional<Output<java.lang.String>> getParentUrn()
        The previous parent of the resource. if empty, the current parent of the resource is used.

        To specify no original parent, use "noParent".

        Only specify one of "parent" or "parentUrn" or "noParent".

      • hasNoParent

        public boolean hasNoParent()
        Used to indicate the resource previously had no parent. If "false" this property is ignored.

        Only specify one of "parent" or "parentUrn" or "noParent".