Documentation ¶
Index ¶
- type ManagementGroup
- func (id *ManagementGroup) Clone() ResourceId
- func (id *ManagementGroup) Equal(oid ResourceId) bool
- func (id *ManagementGroup) Names() []string
- func (id *ManagementGroup) Normalize(scopeStr string) error
- func (id *ManagementGroup) Parent() ResourceId
- func (*ManagementGroup) ParentScope() ResourceId
- func (id *ManagementGroup) Provider() string
- func (id *ManagementGroup) RootScope() RootScope
- func (id *ManagementGroup) RouteScopeString() string
- func (id *ManagementGroup) ScopeEqual(oid ResourceId) bool
- func (id *ManagementGroup) ScopeString() string
- func (id *ManagementGroup) String() string
- func (id *ManagementGroup) TypeString() string
- func (id *ManagementGroup) Types() []string
- type ResourceGroup
- func (id *ResourceGroup) Clone() ResourceId
- func (id *ResourceGroup) Equal(oid ResourceId) bool
- func (id *ResourceGroup) Names() []string
- func (id *ResourceGroup) Normalize(scopeStr string) error
- func (id *ResourceGroup) Parent() ResourceId
- func (*ResourceGroup) ParentScope() ResourceId
- func (*ResourceGroup) Provider() string
- func (id *ResourceGroup) RootScope() RootScope
- func (id *ResourceGroup) RouteScopeString() string
- func (id *ResourceGroup) ScopeEqual(oid ResourceId) bool
- func (id *ResourceGroup) ScopeString() string
- func (id *ResourceGroup) String() string
- func (id *ResourceGroup) TypeString() string
- func (id *ResourceGroup) Types() []string
- type ResourceId
- type RootScope
- type ScopedResourceId
- func (id *ScopedResourceId) Clone() ResourceId
- func (id *ScopedResourceId) Equal(oid ResourceId) bool
- func (id *ScopedResourceId) Names() []string
- func (id *ScopedResourceId) Normalize(scopeStr string) error
- func (id *ScopedResourceId) NormalizeRouteScope(scopeStr string) error
- func (id *ScopedResourceId) Parent() ResourceId
- func (id *ScopedResourceId) ParentScope() ResourceId
- func (id *ScopedResourceId) Provider() string
- func (id *ScopedResourceId) RootScope() RootScope
- func (id *ScopedResourceId) RouteScopeString() string
- func (id *ScopedResourceId) ScopeEqual(oid ResourceId) bool
- func (id *ScopedResourceId) ScopeString() string
- func (id *ScopedResourceId) String() string
- func (id *ScopedResourceId) TypeString() string
- func (id *ScopedResourceId) Types() []string
- type SubscriptionId
- func (id *SubscriptionId) Clone() ResourceId
- func (id *SubscriptionId) Equal(oid ResourceId) bool
- func (id *SubscriptionId) Names() []string
- func (id *SubscriptionId) Normalize(scopeStr string) error
- func (id *SubscriptionId) Parent() ResourceId
- func (*SubscriptionId) ParentScope() ResourceId
- func (*SubscriptionId) Provider() string
- func (id *SubscriptionId) RootScope() RootScope
- func (id *SubscriptionId) RouteScopeString() string
- func (id *SubscriptionId) ScopeEqual(oid ResourceId) bool
- func (id *SubscriptionId) ScopeString() string
- func (id *SubscriptionId) String() string
- func (id *SubscriptionId) TypeString() string
- func (id *SubscriptionId) Types() []string
- type TenantId
- func (id *TenantId) Clone() ResourceId
- func (*TenantId) Equal(oid ResourceId) bool
- func (*TenantId) Names() []string
- func (id *TenantId) Normalize(string) error
- func (*TenantId) Parent() ResourceId
- func (*TenantId) ParentScope() ResourceId
- func (*TenantId) Provider() string
- func (id *TenantId) RootScope() RootScope
- func (id *TenantId) RouteScopeString() string
- func (*TenantId) ScopeEqual(oid ResourceId) bool
- func (id *TenantId) ScopeString() string
- func (*TenantId) String() string
- func (*TenantId) TypeString() string
- func (*TenantId) Types() []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ManagementGroup ¶
type ManagementGroup struct { // Name is the name of this management group Name string AttrTypes []string AttrNames []string // contains filtered or unexported fields }
ManagementGroup represents the management group scope
func (*ManagementGroup) Clone ¶
func (id *ManagementGroup) Clone() ResourceId
func (*ManagementGroup) Equal ¶
func (id *ManagementGroup) Equal(oid ResourceId) bool
func (*ManagementGroup) Names ¶
func (id *ManagementGroup) Names() []string
func (*ManagementGroup) Normalize ¶
func (id *ManagementGroup) Normalize(scopeStr string) error
func (*ManagementGroup) Parent ¶
func (id *ManagementGroup) Parent() ResourceId
func (*ManagementGroup) ParentScope ¶
func (*ManagementGroup) ParentScope() ResourceId
func (*ManagementGroup) Provider ¶
func (id *ManagementGroup) Provider() string
func (*ManagementGroup) RootScope ¶
func (id *ManagementGroup) RootScope() RootScope
func (*ManagementGroup) RouteScopeString ¶
func (id *ManagementGroup) RouteScopeString() string
func (*ManagementGroup) ScopeEqual ¶
func (id *ManagementGroup) ScopeEqual(oid ResourceId) bool
func (*ManagementGroup) ScopeString ¶
func (id *ManagementGroup) ScopeString() string
func (*ManagementGroup) String ¶
func (id *ManagementGroup) String() string
func (*ManagementGroup) TypeString ¶
func (id *ManagementGroup) TypeString() string
func (*ManagementGroup) Types ¶
func (id *ManagementGroup) Types() []string
type ResourceGroup ¶
type ResourceGroup struct { // SubscriptionId is the UUID of the containing subscription SubscriptionId string // Name is the name of this resource group Name string AttrTypes []string AttrNames []string // contains filtered or unexported fields }
ResourceGroup represents the resource group scope
func (*ResourceGroup) Clone ¶
func (id *ResourceGroup) Clone() ResourceId
func (*ResourceGroup) Equal ¶
func (id *ResourceGroup) Equal(oid ResourceId) bool
func (*ResourceGroup) Names ¶
func (id *ResourceGroup) Names() []string
func (*ResourceGroup) Normalize ¶
func (id *ResourceGroup) Normalize(scopeStr string) error
func (*ResourceGroup) Parent ¶
func (id *ResourceGroup) Parent() ResourceId
func (*ResourceGroup) ParentScope ¶
func (*ResourceGroup) ParentScope() ResourceId
func (*ResourceGroup) Provider ¶
func (*ResourceGroup) Provider() string
func (*ResourceGroup) RootScope ¶
func (id *ResourceGroup) RootScope() RootScope
func (*ResourceGroup) RouteScopeString ¶
func (id *ResourceGroup) RouteScopeString() string
func (*ResourceGroup) ScopeEqual ¶
func (id *ResourceGroup) ScopeEqual(oid ResourceId) bool
func (*ResourceGroup) ScopeString ¶
func (id *ResourceGroup) ScopeString() string
func (*ResourceGroup) String ¶
func (id *ResourceGroup) String() string
func (*ResourceGroup) TypeString ¶
func (id *ResourceGroup) TypeString() string
func (*ResourceGroup) Types ¶
func (id *ResourceGroup) Types() []string
type ResourceId ¶
type ResourceId interface { // RootScope returns the root scope of this resource. // For scoped resource, it is the including root scope resource id. // For root scopes, it returns itself. RootScope() RootScope // ParentScope returns the parent scope of this resource. Normally, scopes are seperated by "/providers/". // This is nil if the resource itself is a root scope. // E.g. // - /subscriptions/0000/resourceGroups/rg1/providers/Microsoft.Foo/foos/foo1 -(parent scope)-> /subscriptions/0000/resourceGroups/rg1 // - /subscriptions/0000/resourceGroups/rg1 -(parent scope)-> nil ParentScope() ResourceId // Parent returns the parent resource. The parent resource belongs to the same provider as the current resource. // Nil is returned if the current resource is a root scoped resource, or this is a root scope. Parent() ResourceId // Provider returns the provider namespace of this resource id. // For scoped resource, it is the provider namespace of its routing scope, i.e. the scope of the resource itself. // For root scopes, it is a builtin provider namespace, e.g. "Microsoft.Resources". Provider() string // Types returns the resource type array of this resource. // For scoped resource, it is the sub-types of its routing scope, i.e. the scope of the resource itself. // e.g. ["virtualNetworks", "subnets"] for "Microsoft.Network/virtualNetworks/subnets" // For root scopes, it is a builtin type. Types() []string // Names returns the resource name array of this resource. // For scoped resource, it is the names of each sub-type of the Types(), which indicates it always has the same length as the return value of Types(). // For root scopes, it is nil. Names() []string // TypeString returns the resource type string literal. // For scoped resource, this is the same as their RouteScopeString, with the leading "/" trimmed. // For root scope resource, this is the same as "Microsoft.Resources" + id.ScopeString() TypeString() string // String returns the resource id literal. String() string // Equal checkes the equality of two resource id. They are regarded as equal only when all the components are equal (case insensitively). Equal(ResourceId) bool // ScopeEqual checkes the equality of two resource id without taking the Names() into consideration. ScopeEqual(ResourceId) bool // ScopeString returns the string literal of the resource id without taking the Names() into consideration, for the whole resource id. ScopeString() string // RouteScopeString is similar as ScopeString, but only for the router scope (i.e. the last scope). // For root scope resource, this is the same as ScopeString. RouteScopeString() string // Normalize normalizes the invariant parts (e.g. Provider, Types) of the id based on the input scope string. // The input scope string must be the same as calling the `ScopeString` of this id, except the casing. Normalize(string) error // Clone deep clones a ResourceId Clone() ResourceId }
func ParseResourceId ¶
func ParseResourceId(id string) (ResourceId, error)
type RootScope ¶
type RootScope interface { ResourceId // contains filtered or unexported methods }
RootScope is a special resource id, that represents a root scope as defined by ARM. This is a sealed interface, that has a limited set of implementors.
type ScopedResourceId ¶
type ScopedResourceId struct { AttrParentScope ResourceId AttrProvider string AttrTypes []string AttrNames []string }
func (*ScopedResourceId) Clone ¶
func (id *ScopedResourceId) Clone() ResourceId
func (*ScopedResourceId) Equal ¶
func (id *ScopedResourceId) Equal(oid ResourceId) bool
func (*ScopedResourceId) Names ¶
func (id *ScopedResourceId) Names() []string
func (*ScopedResourceId) Normalize ¶
func (id *ScopedResourceId) Normalize(scopeStr string) error
Normalize normalizes the invariant parts (e.g. Provider, Types) of the id based on the input scope string. The input scope string must be the same as calling the `ScopeString` of this id, except the casing.
func (*ScopedResourceId) NormalizeRouteScope ¶
func (id *ScopedResourceId) NormalizeRouteScope(scopeStr string) error
NormalizeRouteScope is similar to Normalize, while only for the current route scope, and didn't affect the parent scopes. The input scope string must be the same as the ScopeString of this of this id with its parent scope's ScopeString prefix trimmed, except the casing.
func (*ScopedResourceId) Parent ¶
func (id *ScopedResourceId) Parent() ResourceId
func (*ScopedResourceId) ParentScope ¶
func (id *ScopedResourceId) ParentScope() ResourceId
func (*ScopedResourceId) Provider ¶
func (id *ScopedResourceId) Provider() string
func (*ScopedResourceId) RootScope ¶
func (id *ScopedResourceId) RootScope() RootScope
func (*ScopedResourceId) RouteScopeString ¶
func (id *ScopedResourceId) RouteScopeString() string
func (*ScopedResourceId) ScopeEqual ¶
func (id *ScopedResourceId) ScopeEqual(oid ResourceId) bool
func (*ScopedResourceId) ScopeString ¶
func (id *ScopedResourceId) ScopeString() string
func (*ScopedResourceId) String ¶
func (id *ScopedResourceId) String() string
func (*ScopedResourceId) TypeString ¶
func (id *ScopedResourceId) TypeString() string
func (*ScopedResourceId) Types ¶
func (id *ScopedResourceId) Types() []string
type SubscriptionId ¶
type SubscriptionId struct { // Id is the UUID of this subscription Id string AttrTypes []string AttrNames []string // contains filtered or unexported fields }
SubscriptionId represents the subscription scope
func (*SubscriptionId) Clone ¶
func (id *SubscriptionId) Clone() ResourceId
func (*SubscriptionId) Equal ¶
func (id *SubscriptionId) Equal(oid ResourceId) bool
func (*SubscriptionId) Names ¶
func (id *SubscriptionId) Names() []string
func (*SubscriptionId) Normalize ¶
func (id *SubscriptionId) Normalize(scopeStr string) error
func (*SubscriptionId) Parent ¶
func (id *SubscriptionId) Parent() ResourceId
func (*SubscriptionId) ParentScope ¶
func (*SubscriptionId) ParentScope() ResourceId
func (*SubscriptionId) Provider ¶
func (*SubscriptionId) Provider() string
func (*SubscriptionId) RootScope ¶
func (id *SubscriptionId) RootScope() RootScope
func (*SubscriptionId) RouteScopeString ¶
func (id *SubscriptionId) RouteScopeString() string
func (*SubscriptionId) ScopeEqual ¶
func (id *SubscriptionId) ScopeEqual(oid ResourceId) bool
func (*SubscriptionId) ScopeString ¶
func (id *SubscriptionId) ScopeString() string
func (*SubscriptionId) String ¶
func (id *SubscriptionId) String() string
func (*SubscriptionId) TypeString ¶
func (id *SubscriptionId) TypeString() string
func (*SubscriptionId) Types ¶
func (id *SubscriptionId) Types() []string
type TenantId ¶
type TenantId struct{}
TenantId represents the tenant scope, which is a pesudo resource id.
func (*TenantId) Clone ¶
func (id *TenantId) Clone() ResourceId
func (*TenantId) Equal ¶
func (*TenantId) Equal(oid ResourceId) bool
func (*TenantId) Parent ¶
func (*TenantId) Parent() ResourceId
func (*TenantId) ParentScope ¶
func (*TenantId) ParentScope() ResourceId
func (*TenantId) RouteScopeString ¶
func (*TenantId) ScopeEqual ¶
func (*TenantId) ScopeEqual(oid ResourceId) bool