Documentation ¶
Index ¶
- Constants
- type URN
- func (urn URN) IsValid() bool
- func (urn URN) Name() string
- func (urn URN) Project() tokens.PackageName
- func (urn URN) QualifiedType() tokens.Type
- func (urn URN) Quote() string
- func (urn URN) Rename(newName string) URN
- func (urn URN) Stack() tokens.QName
- func (urn URN) Type() tokens.Type
- func (urn URN) URNName() string
Constants ¶
const ( Prefix = "urn:" + NamespaceID + ":" // the standard URN prefix NamespaceID = "pulumi" // the URN namespace NameDelimiter = "::" // the delimiter between URN name elements TypeDelimiter = "$" // the delimiter between URN type elements )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type URN ¶
type URN string
URN is a friendly, but unique, URN for a resource, most often auto-assigned by Pulumi. These are used as unique IDs for objects, and help us to perform graph diffing and resolution of resource objects.
In theory, we could support manually assigned URIs in the future. For the time being, however, we have opted to simplify developers' lives by mostly automating the generation of them algorithmically. The one caveat where it isn't truly automatic is that a developer -- or resource provider -- must provide a semi-unique name part.
Each resource URN is of the form:
urn:pulumi:<Stack>::<Project>::<Qualified$Type$Name>::<Name>
wherein each element is the following:
<Stack> The stack being deployed into <Project> The project being evaluated <Qualified$Type$Name> The object type's qualified type token (including the parent type) <Name> The human-friendly name identifier assigned by the developer or provider
In the future, we may add elements to the URN; it is more important that it is unique than it is human-typable.
func New ¶
func New(stack tokens.QName, proj tokens.PackageName, parentType, baseType tokens.Type, name string) URN
New creates a unique resource URN for the given resource object.
func ParseOptional ¶
ParseOptional is the same as Parse except it will allow the empty string.
func (URN) Project ¶
func (urn URN) Project() tokens.PackageName
Project returns the project name part of a URN.
func (URN) QualifiedType ¶
QualifiedType returns the resource type part of a URN including the parent type
func (URN) Quote ¶
Quote returns the quoted form of the URN appropriate for use as a command line argument for the current OS.