Documentation ¶
Index ¶
- func NormalizeLocation(input interface{}) string
- func QuotedStringSlice(strs []string) string
- func SchemaResourceGroupNameDiffSuppress() *pluginsdk.Schema
- func TitleCase(input string) string
- func ValidateResourceID(i interface{}, k string) (warnings []string, errors []error)
- func ValidateResourceIDOrEmpty(i interface{}, k string) (_ []string, errors []error)deprecated
- type ResourceID
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NormalizeLocation ¶
func NormalizeLocation(input interface{}) string
NormalizeLocation will be deprecated in the near future, use `location.Normalize()` instead.
func QuotedStringSlice ¶
QuotedStringSlice formats a string slice into a quoted string containing all segments passed in a slice (e.g. string[]{"one", "two", "three"} will return {"one", "two" or "three"}). Useful for error messages with multiple possible values.
func SchemaResourceGroupNameDiffSuppress ¶
SchemaResourceGroupNameDiffSuppress will be deprecated in the near future use `commonschema.ResourceGroupName()` instead
func ValidateResourceID ¶
func ValidateResourceIDOrEmpty
deprecated
Deprecated: use a more specific Resource ID validator instead, however note that empty strings should not be allowed as a validation value. Rather than specifying an empty string, users can omit the field to use an unset value.
Types ¶
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. 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 ...