blueprint

package
v0.20240214.1100807 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: MPL-2.0 Imports: 13 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/blueprints/2018-11-01-preview/blueprint Documentation

The blueprint SDK allows for interaction with the Azure Resource Manager Service 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", "blueprintValue")

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", "blueprintValue")

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", "blueprintValue")

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForBlueprintTargetScope

func PossibleValuesForBlueprintTargetScope() []string

func PossibleValuesForTemplateParameterType

func PossibleValuesForTemplateParameterType() []string

func ValidateScopedBlueprintID

func ValidateScopedBlueprintID(input interface{}, key string) (warnings []string, errors []error)

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

Delete ...

func (BlueprintClient) Get

Get ...

func (BlueprintClient) List

List ...

func (BlueprintClient) ListComplete

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

type BlueprintOperationPredicate struct {
	Id   *string
	Name *string
	Type *string
}

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"`
	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 CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Blueprint
}

type DeleteOperationResponse

type DeleteOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Blueprint
}

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Blueprint
}

type ListCompleteResult

type ListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Blueprint
}

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Blueprint
}

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 ParameterDefinitionMetadata

type ParameterDefinitionMetadata struct {
	Description *string `json:"description,omitempty"`
	DisplayName *string `json:"displayName,omitempty"`
	StrongType  *string `json:"strongType,omitempty"`
}

type ResourceGroupDefinition

type ResourceGroupDefinition struct {
	DependsOn *[]string                    `json:"dependsOn,omitempty"`
	Location  *string                      `json:"location,omitempty"`
	Metadata  *ParameterDefinitionMetadata `json:"metadata,omitempty"`
	Name      *string                      `json:"name,omitempty"`
	Tags      *map[string]string           `json:"tags,omitempty"`
}

type ScopedBlueprintId

type ScopedBlueprintId struct {
	ResourceScope string
	BlueprintName string
}

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

Jump to

Keyboard shortcuts

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