resourceids

package
v0.16.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 8, 2021 License: MPL-2.0 Imports: 3 Imported by: 14,755

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Id

type Id interface {
	// ID returns the fully formatted ID for this Resource ID
	ID() string

	// String returns a friendly description of the components of this Resource ID
	// which is suitable for use in error messages (for example 'MyThing %q / Resource Group %q')
	String() string
}

Id defines a type for a ResourceId of some kind

type ResourceID

type ResourceID struct {
	SubscriptionID    string
	ResourceGroup     string
	Provider          string
	SecondaryProvider string
	Path              map[string]string
}

ResourceID represents a parsed long-form Azure Resource Manager ID with the Subscription ID, Resource Group and the Provider as top- level fields, and other key-value pairs available via a map in the Path field.

func ParseAzureResourceID

func ParseAzureResourceID(id string) (*ResourceID, error)

ParseAzureResourceID converts a long-form Azure Resource Manager ID into a ResourceID.

func (*ResourceID) PopSegment

func (id *ResourceID) PopSegment(name string) (string, error)

PopSegment retrieves a segment from the Path and returns it if found it removes it from the Path then return the value if not found, this returns nil

func (*ResourceID) ValidateNoEmptySegments

func (id *ResourceID) ValidateNoEmptySegments(sourceId string) error

ValidateNoEmptySegments validates ...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL