Package clusterless.commons.naming
Class Ref
- java.lang.Object
-
- clusterless.commons.naming.Ref
-
public final class Ref extends java.lang.Object
Creates an identifier to use as an export/import key for provider output/export values.aws:qualifier:[stage:]scopeName:scopeVersion:resourceNS:resourceType:resourceName
Where the qualifier represents the type of value being exported/imported: - id - name - arn Where stage is the stage of the deployment, such as dev, test, prod, etc. It is optional. scopeName and scopeVersion are analogous to project names and versions. Resources are identified by a namespace, type, and name.ref:aws:id:project-a:20230101:core:compute:spot ref:aws:id:dev:project-a:20230101:core:compute:spot
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Ref.Qualifier
-
Constructor Summary
Constructors Constructor Description Ref()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Ref
arnRef()
boolean
equals(java.lang.Object o)
java.lang.String
exportName()
int
hashCode()
static Ref
idRef()
static boolean
isRef(java.lang.String value)
Label
label()
static Ref
nameRef()
Label
provider()
static java.util.Optional<java.lang.String>
provider(java.lang.String value)
Ref.Qualifier
qualifier()
static java.util.Optional<Ref.Qualifier>
qualifier(java.lang.String value)
static Ref
ref()
Label
resourceLabel()
Fixed
resourceName()
Fixed
resourceNs()
Fixed
resourceType()
Fixed
scope()
Fixed
scopeVersion()
Stage
stage()
java.lang.String
toString()
Ref
withProvider(Fixed provider)
Ref
withProvider(Label provider)
Ref
withProvider(java.lang.String provider)
Ref
withQualifier(Ref.Qualifier qualifier)
Ref
withResourceName(Fixed resourceName)
Ref
withResourceName(Label resourceName)
Ref
withResourceName(java.lang.String resourceName)
Ref
withResourceNs(Fixed resourceNs)
Ref
withResourceNs(Label resourceNs)
Ref
withResourceNs(java.lang.String resourceNs)
Ref
withResourceType(Fixed resourceType)
Ref
withResourceType(Label resourceType)
Ref
withResourceType(java.lang.String resourceType)
Ref
withScope(Fixed scope)
Ref
withScope(Label scope)
Ref
withScope(java.lang.String scope)
Ref
withScopeVersion(Fixed scopeVersion)
Ref
withScopeVersion(Version scopeVersion)
Ref
withScopeVersion(java.lang.String scopeVersion)
Ref
withStage(Stage stage)
-
-
-
Constructor Detail
-
Ref
public Ref()
-
-
Method Detail
-
isRef
public static boolean isRef(java.lang.String value)
-
qualifier
public static java.util.Optional<Ref.Qualifier> qualifier(java.lang.String value)
-
provider
public static java.util.Optional<java.lang.String> provider(java.lang.String value)
-
withProvider
public Ref withProvider(java.lang.String provider)
-
withProvider
public Ref withProvider(Label provider)
-
withProvider
public Ref withProvider(Fixed provider)
-
withScopeVersion
public Ref withScopeVersion(java.lang.String scopeVersion)
-
withScopeVersion
public Ref withScopeVersion(Fixed scopeVersion)
-
withScopeVersion
public Ref withScopeVersion(Version scopeVersion)
-
withResourceNs
public Ref withResourceNs(java.lang.String resourceNs)
-
withResourceNs
public Ref withResourceNs(Label resourceNs)
-
withResourceNs
public Ref withResourceNs(Fixed resourceNs)
-
withResourceType
public Ref withResourceType(java.lang.String resourceType)
-
withResourceType
public Ref withResourceType(Label resourceType)
-
withResourceType
public Ref withResourceType(Fixed resourceType)
-
withResourceName
public Ref withResourceName(java.lang.String resourceName)
-
withResourceName
public Ref withResourceName(Label resourceName)
-
withResourceName
public Ref withResourceName(Fixed resourceName)
-
withQualifier
public Ref withQualifier(Ref.Qualifier qualifier)
-
scopeVersion
public Fixed scopeVersion()
-
resourceNs
public Fixed resourceNs()
-
resourceType
public Fixed resourceType()
-
resourceName
public Fixed resourceName()
-
qualifier
public Ref.Qualifier qualifier()
-
resourceLabel
public Label resourceLabel()
-
exportName
public java.lang.String exportName()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-