Package com.pulumi.core
Class Alias
java.lang.Object
com.pulumi.core.Alias
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.
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: noParent()
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic Alias.Builderbuilder()getName()The previous name of the resource.The previous parent of the resource.The previous parent of the resource.The previous project of the resource.getStack()The previous stack of the resource.getType()The previous type of the resource.getUrn()The previous urn to alias to.booleanUsed to indicate the resource previously had no parent.static AliasnoParent()Create anAliaswith no parent.static AliasCreate anAliasfor a given URN.
-
Method Details
-
noParent
Create anAliaswith no parent. No parent can indicate a root resource.- Returns:
- an
Aliasinstance with no parent - See Also:
-
withUrn
Create anAliasfor a given URN.- Parameters:
urn- the URN to use.- Returns:
- an
Aliasinstance with the givenurn - See Also:
-
builder
- Returns:
- an
AliasAlias.Builder - See Also:
-
getUrn
The previous urn to alias to. If this is provided, no other properties in this type should be provided. -
getName
The previous name of the resource. If empty, the current name of the resource is used. -
getType
The previous type of the resource. If empty, the current type of the resource is used. -
getStack
The previous stack of the resource. If empty, defaults to the value of @seeDeployment.getStackName() -
getProject
The previous project of the resource. If empty, defaults to the value of @seeDeployment.getProjectName() -
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
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".
-