README ¶
github.com/hashicorp/go-azure-sdk/resource-manager/blueprints/2018-11-01-preview/blueprint
Documentation
The blueprint
SDK allows for interaction with Azure Resource Manager blueprints
(API Version 2018-11-01-preview
).
This readme covers example usages, but further information on using this SDK can be found in the project root.
Import Path
import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/blueprints/2018-11-01-preview/blueprint"
Client Initialization
client := blueprint.NewBlueprintClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
Example Usage: BlueprintClient.CreateOrUpdate
ctx := context.TODO()
id := blueprint.NewScopedBlueprintID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "blueprintName")
payload := blueprint.Blueprint{
// ...
}
read, err := client.CreateOrUpdate(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: BlueprintClient.Delete
ctx := context.TODO()
id := blueprint.NewScopedBlueprintID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "blueprintName")
read, err := client.Delete(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: BlueprintClient.Get
ctx := context.TODO()
id := blueprint.NewScopedBlueprintID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "blueprintName")
read, err := client.Get(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: BlueprintClient.List
ctx := context.TODO()
id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")
// alternatively `client.List(ctx, id)` can be used to do batched pagination
items, err := client.ListComplete(ctx, id)
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Documentation ¶
Index ¶
- func PossibleValuesForBlueprintTargetScope() []string
- func PossibleValuesForTemplateParameterType() []string
- func ValidateScopedBlueprintID(input interface{}, key string) (warnings []string, errors []error)
- type Blueprint
- type BlueprintClient
- func (c BlueprintClient) CreateOrUpdate(ctx context.Context, id ScopedBlueprintId, input Blueprint) (result CreateOrUpdateOperationResponse, err error)
- func (c BlueprintClient) Delete(ctx context.Context, id ScopedBlueprintId) (result DeleteOperationResponse, err error)
- func (c BlueprintClient) Get(ctx context.Context, id ScopedBlueprintId) (result GetOperationResponse, err error)
- func (c BlueprintClient) List(ctx context.Context, id commonids.ScopeId) (result ListOperationResponse, err error)
- func (c BlueprintClient) ListComplete(ctx context.Context, id commonids.ScopeId) (ListCompleteResult, error)
- func (c BlueprintClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ScopeId, ...) (result ListCompleteResult, err error)
- type BlueprintOperationPredicate
- type BlueprintProperties
- type BlueprintResourceStatusBase
- func (o *BlueprintResourceStatusBase) GetLastModifiedAsTime() (*time.Time, error)
- func (o *BlueprintResourceStatusBase) GetTimeCreatedAsTime() (*time.Time, error)
- func (o *BlueprintResourceStatusBase) SetLastModifiedAsTime(input time.Time)
- func (o *BlueprintResourceStatusBase) SetTimeCreatedAsTime(input time.Time)
- type BlueprintTargetScope
- type CreateOrUpdateOperationResponse
- type DeleteOperationResponse
- type GetOperationResponse
- type ListCompleteResult
- type ListCustomPager
- type ListOperationResponse
- type ParameterDefinition
- type ParameterDefinitionMetadata
- type ResourceGroupDefinition
- type ScopedBlueprintId
- type TemplateParameterType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PossibleValuesForBlueprintTargetScope ¶
func PossibleValuesForBlueprintTargetScope() []string
func PossibleValuesForTemplateParameterType ¶
func PossibleValuesForTemplateParameterType() []string
func ValidateScopedBlueprintID ¶
ValidateScopedBlueprintID checks that 'input' can be parsed as a Scoped Blueprint ID
Types ¶
type Blueprint ¶
type Blueprint struct { Id *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` Properties BlueprintProperties `json:"properties"` Type *string `json:"type,omitempty"` }
type BlueprintClient ¶
type BlueprintClient struct {
Client *resourcemanager.Client
}
func NewBlueprintClientWithBaseURI ¶
func NewBlueprintClientWithBaseURI(sdkApi sdkEnv.Api) (*BlueprintClient, error)
func (BlueprintClient) CreateOrUpdate ¶
func (c BlueprintClient) CreateOrUpdate(ctx context.Context, id ScopedBlueprintId, input Blueprint) (result CreateOrUpdateOperationResponse, err error)
CreateOrUpdate ...
func (BlueprintClient) Delete ¶
func (c BlueprintClient) Delete(ctx context.Context, id ScopedBlueprintId) (result DeleteOperationResponse, err error)
Delete ...
func (BlueprintClient) Get ¶
func (c BlueprintClient) Get(ctx context.Context, id ScopedBlueprintId) (result GetOperationResponse, err error)
Get ...
func (BlueprintClient) List ¶
func (c BlueprintClient) List(ctx context.Context, id commonids.ScopeId) (result ListOperationResponse, err error)
List ...
func (BlueprintClient) ListComplete ¶
func (c BlueprintClient) ListComplete(ctx context.Context, id commonids.ScopeId) (ListCompleteResult, error)
ListComplete retrieves all the results into a single object
func (BlueprintClient) ListCompleteMatchingPredicate ¶
func (c BlueprintClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ScopeId, predicate BlueprintOperationPredicate) (result ListCompleteResult, err error)
ListCompleteMatchingPredicate retrieves all the results and then applies the predicate
type BlueprintOperationPredicate ¶
func (BlueprintOperationPredicate) Matches ¶
func (p BlueprintOperationPredicate) Matches(input Blueprint) bool
type BlueprintProperties ¶
type BlueprintProperties struct { Description *string `json:"description,omitempty"` DisplayName *string `json:"displayName,omitempty"` Layout *interface{} `json:"layout,omitempty"` Parameters *map[string]ParameterDefinition `json:"parameters,omitempty"` ResourceGroups *map[string]ResourceGroupDefinition `json:"resourceGroups,omitempty"` Status *BlueprintResourceStatusBase `json:"status,omitempty"` TargetScope *BlueprintTargetScope `json:"targetScope,omitempty"` Versions *interface{} `json:"versions,omitempty"` }
type BlueprintResourceStatusBase ¶
type BlueprintResourceStatusBase struct { LastModified *string `json:"lastModified,omitempty"` TimeCreated *string `json:"timeCreated,omitempty"` }
func (*BlueprintResourceStatusBase) GetLastModifiedAsTime ¶
func (o *BlueprintResourceStatusBase) GetLastModifiedAsTime() (*time.Time, error)
func (*BlueprintResourceStatusBase) GetTimeCreatedAsTime ¶
func (o *BlueprintResourceStatusBase) GetTimeCreatedAsTime() (*time.Time, error)
func (*BlueprintResourceStatusBase) SetLastModifiedAsTime ¶
func (o *BlueprintResourceStatusBase) SetLastModifiedAsTime(input time.Time)
func (*BlueprintResourceStatusBase) SetTimeCreatedAsTime ¶
func (o *BlueprintResourceStatusBase) SetTimeCreatedAsTime(input time.Time)
type BlueprintTargetScope ¶
type BlueprintTargetScope string
const ( BlueprintTargetScopeManagementGroup BlueprintTargetScope = "managementGroup" BlueprintTargetScopeSubscription BlueprintTargetScope = "subscription" )
func (*BlueprintTargetScope) UnmarshalJSON ¶
func (s *BlueprintTargetScope) UnmarshalJSON(bytes []byte) error
type DeleteOperationResponse ¶
type GetOperationResponse ¶
type ListCompleteResult ¶
type ListCustomPager ¶
func (*ListCustomPager) NextPageLink ¶
func (p *ListCustomPager) NextPageLink() *odata.Link
type ListOperationResponse ¶
type ParameterDefinition ¶
type ParameterDefinition struct { AllowedValues *[]interface{} `json:"allowedValues,omitempty"` DefaultValue *interface{} `json:"defaultValue,omitempty"` Metadata *ParameterDefinitionMetadata `json:"metadata,omitempty"` Type TemplateParameterType `json:"type"` }
type ResourceGroupDefinition ¶
type ScopedBlueprintId ¶
ScopedBlueprintId is a struct representing the Resource ID for a Scoped Blueprint
func NewScopedBlueprintID ¶
func NewScopedBlueprintID(resourceScope string, blueprintName string) ScopedBlueprintId
NewScopedBlueprintID returns a new ScopedBlueprintId struct
func ParseScopedBlueprintID ¶
func ParseScopedBlueprintID(input string) (*ScopedBlueprintId, error)
ParseScopedBlueprintID parses 'input' into a ScopedBlueprintId
func ParseScopedBlueprintIDInsensitively ¶
func ParseScopedBlueprintIDInsensitively(input string) (*ScopedBlueprintId, error)
ParseScopedBlueprintIDInsensitively parses 'input' case-insensitively into a ScopedBlueprintId note: this method should only be used for API response data and not user input
func (*ScopedBlueprintId) FromParseResult ¶
func (id *ScopedBlueprintId) FromParseResult(input resourceids.ParseResult) error
func (ScopedBlueprintId) ID ¶
func (id ScopedBlueprintId) ID() string
ID returns the formatted Scoped Blueprint ID
func (ScopedBlueprintId) Segments ¶
func (id ScopedBlueprintId) Segments() []resourceids.Segment
Segments returns a slice of Resource ID Segments which comprise this Scoped Blueprint ID
func (ScopedBlueprintId) String ¶
func (id ScopedBlueprintId) String() string
String returns a human-readable description of this Scoped Blueprint ID
type TemplateParameterType ¶
type TemplateParameterType string
const ( TemplateParameterTypeArray TemplateParameterType = "array" TemplateParameterTypeBool TemplateParameterType = "bool" TemplateParameterTypeInt TemplateParameterType = "int" TemplateParameterTypeObject TemplateParameterType = "object" TemplateParameterTypeSecureObject TemplateParameterType = "secureObject" TemplateParameterTypeSecureString TemplateParameterType = "secureString" TemplateParameterTypeString TemplateParameterType = "string" )
func (*TemplateParameterType) UnmarshalJSON ¶
func (s *TemplateParameterType) UnmarshalJSON(bytes []byte) error
Source Files ¶
- client.go
- constants.go
- id_scopedblueprint.go
- method_createorupdate.go
- method_delete.go
- method_get.go
- method_list.go
- model_blueprint.go
- model_blueprintproperties.go
- model_blueprintresourcestatusbase.go
- model_parameterdefinition.go
- model_parameterdefinitionmetadata.go
- model_resourcegroupdefinition.go
- predicates.go
- version.go