Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ResourceID ¶
type ResourceID struct { SubscriptionID string ResourceGroup string Provider 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. We make assumptions about the structure of URLs, which is obviously not good, but the best thing available given the SDK.
func ParseAzureResourceIDWithoutSubscription ¶
func ParseAzureResourceIDWithoutSubscription(id string) (*ResourceID, error)
ParseAzureResourceIDWithoutSubscription parses Azure Resource ID's that are not prefixed with a Subscription ID. Typically these are for administrative resources that are not bound to a particular subscription. Note that these IDs are also unlikely to have a resourceGroup element, so this is not populated automatically into the returned ResourceID, but can be popped in cases it does exist in the path. These IDs are expected to begin with '/providers/[provider name]/'
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 ...