azure

package
v1.44.1-0...-aa8b3ee Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

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

func QuotedStringSlice(strs []string) string

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

func SchemaResourceGroupNameDiffSuppress() *pluginsdk.Schema

SchemaResourceGroupNameDiffSuppress will be deprecated in the near future use `commonschema.ResourceGroupName()` instead

func TitleCase

func TitleCase(input string) string

func ValidateResourceID

func ValidateResourceID(i interface{}, k string) (warnings []string, errors []error)

func ValidateResourceIDOrEmpty deprecated

func ValidateResourceIDOrEmpty(i interface{}, k string) (_ []string, errors []error)

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 ...

Jump to

Keyboard shortcuts

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