templatespecs

package
v0.20240123.1101251 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: MPL-2.0 Imports: 14 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/resources/2022-02-01/templatespecs Documentation

The templatespecs SDK allows for interaction with the Azure Resource Manager Service resources (API Version 2022-02-01).

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-sdk/resource-manager/resources/2022-02-01/templatespecs"

Client Initialization

client := templatespecs.NewTemplateSpecsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: TemplateSpecsClient.CreateOrUpdate

ctx := context.TODO()
id := templatespecs.NewTemplateSpecID("12345678-1234-9876-4563-123456789012", "example-resource-group", "templateSpecValue")

payload := templatespecs.TemplateSpec{
	// ...
}


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: TemplateSpecsClient.Delete

ctx := context.TODO()
id := templatespecs.NewTemplateSpecID("12345678-1234-9876-4563-123456789012", "example-resource-group", "templateSpecValue")

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: TemplateSpecsClient.Get

ctx := context.TODO()
id := templatespecs.NewTemplateSpecID("12345678-1234-9876-4563-123456789012", "example-resource-group", "templateSpecValue")

read, err := client.Get(ctx, id, templatespecs.DefaultGetOperationOptions())
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: TemplateSpecsClient.GetBuiltIn

ctx := context.TODO()
id := templatespecs.NewBuiltInTemplateSpecID("builtInTemplateSpecValue")

read, err := client.GetBuiltIn(ctx, id, templatespecs.DefaultGetBuiltInOperationOptions())
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: TemplateSpecsClient.ListBuiltIns

ctx := context.TODO()


// alternatively `client.ListBuiltIns(ctx, templatespecs.DefaultListBuiltInsOperationOptions())` can be used to do batched pagination
items, err := client.ListBuiltInsComplete(ctx, templatespecs.DefaultListBuiltInsOperationOptions())
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: TemplateSpecsClient.ListByResourceGroup

ctx := context.TODO()
id := templatespecs.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group")

// alternatively `client.ListByResourceGroup(ctx, id, templatespecs.DefaultListByResourceGroupOperationOptions())` can be used to do batched pagination
items, err := client.ListByResourceGroupComplete(ctx, id, templatespecs.DefaultListByResourceGroupOperationOptions())
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: TemplateSpecsClient.ListBySubscription

ctx := context.TODO()
id := templatespecs.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

// alternatively `client.ListBySubscription(ctx, id, templatespecs.DefaultListBySubscriptionOperationOptions())` can be used to do batched pagination
items, err := client.ListBySubscriptionComplete(ctx, id, templatespecs.DefaultListBySubscriptionOperationOptions())
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: TemplateSpecsClient.Update

ctx := context.TODO()
id := templatespecs.NewTemplateSpecID("12345678-1234-9876-4563-123456789012", "example-resource-group", "templateSpecValue")

payload := templatespecs.TemplateSpecUpdateModel{
	// ...
}


read, err := client.Update(ctx, id, payload)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForTemplateSpecExpandKind

func PossibleValuesForTemplateSpecExpandKind() []string

func ValidateBuiltInTemplateSpecID

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

ValidateBuiltInTemplateSpecID checks that 'input' can be parsed as a Built In Template Spec ID

func ValidateTemplateSpecID

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

ValidateTemplateSpecID checks that 'input' can be parsed as a Template Spec ID

Types

type BuiltInTemplateSpecId

type BuiltInTemplateSpecId struct {
	BuiltInTemplateSpecName string
}

BuiltInTemplateSpecId is a struct representing the Resource ID for a Built In Template Spec

func NewBuiltInTemplateSpecID

func NewBuiltInTemplateSpecID(builtInTemplateSpecName string) BuiltInTemplateSpecId

NewBuiltInTemplateSpecID returns a new BuiltInTemplateSpecId struct

func ParseBuiltInTemplateSpecID

func ParseBuiltInTemplateSpecID(input string) (*BuiltInTemplateSpecId, error)

ParseBuiltInTemplateSpecID parses 'input' into a BuiltInTemplateSpecId

func ParseBuiltInTemplateSpecIDInsensitively

func ParseBuiltInTemplateSpecIDInsensitively(input string) (*BuiltInTemplateSpecId, error)

ParseBuiltInTemplateSpecIDInsensitively parses 'input' case-insensitively into a BuiltInTemplateSpecId note: this method should only be used for API response data and not user input

func (*BuiltInTemplateSpecId) FromParseResult added in v0.20231127.1171502

func (id *BuiltInTemplateSpecId) FromParseResult(input resourceids.ParseResult) error

func (BuiltInTemplateSpecId) ID

func (id BuiltInTemplateSpecId) ID() string

ID returns the formatted Built In Template Spec ID

func (BuiltInTemplateSpecId) Segments

func (id BuiltInTemplateSpecId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Built In Template Spec ID

func (BuiltInTemplateSpecId) String

func (id BuiltInTemplateSpecId) String() string

String returns a human-readable description of this Built In Template Spec ID

type CreateOrUpdateOperationResponse

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

type DeleteOperationResponse

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

type GetBuiltInOperationOptions

type GetBuiltInOperationOptions struct {
	Expand *TemplateSpecExpandKind
}

func DefaultGetBuiltInOperationOptions

func DefaultGetBuiltInOperationOptions() GetBuiltInOperationOptions

func (GetBuiltInOperationOptions) ToHeaders

func (o GetBuiltInOperationOptions) ToHeaders() *client.Headers

func (GetBuiltInOperationOptions) ToOData

func (o GetBuiltInOperationOptions) ToOData() *odata.Query

func (GetBuiltInOperationOptions) ToQuery

type GetBuiltInOperationResponse

type GetBuiltInOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *TemplateSpec
}

type GetOperationOptions

type GetOperationOptions struct {
	Expand *TemplateSpecExpandKind
}

func DefaultGetOperationOptions

func DefaultGetOperationOptions() GetOperationOptions

func (GetOperationOptions) ToHeaders

func (o GetOperationOptions) ToHeaders() *client.Headers

func (GetOperationOptions) ToOData

func (o GetOperationOptions) ToOData() *odata.Query

func (GetOperationOptions) ToQuery

func (o GetOperationOptions) ToQuery() *client.QueryParams

type GetOperationResponse

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

type ListBuiltInsCompleteResult

type ListBuiltInsCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []TemplateSpec
}

type ListBuiltInsOperationOptions

type ListBuiltInsOperationOptions struct {
	Expand *TemplateSpecExpandKind
}

func DefaultListBuiltInsOperationOptions

func DefaultListBuiltInsOperationOptions() ListBuiltInsOperationOptions

func (ListBuiltInsOperationOptions) ToHeaders

func (ListBuiltInsOperationOptions) ToOData

func (ListBuiltInsOperationOptions) ToQuery

type ListBuiltInsOperationResponse

type ListBuiltInsOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]TemplateSpec
}

type ListByResourceGroupCompleteResult

type ListByResourceGroupCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []TemplateSpec
}

type ListByResourceGroupOperationOptions

type ListByResourceGroupOperationOptions struct {
	Expand *TemplateSpecExpandKind
}

func DefaultListByResourceGroupOperationOptions

func DefaultListByResourceGroupOperationOptions() ListByResourceGroupOperationOptions

func (ListByResourceGroupOperationOptions) ToHeaders

func (ListByResourceGroupOperationOptions) ToOData

func (ListByResourceGroupOperationOptions) ToQuery

type ListByResourceGroupOperationResponse

type ListByResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]TemplateSpec
}

type ListBySubscriptionCompleteResult

type ListBySubscriptionCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []TemplateSpec
}

type ListBySubscriptionOperationOptions

type ListBySubscriptionOperationOptions struct {
	Expand *TemplateSpecExpandKind
}

func DefaultListBySubscriptionOperationOptions

func DefaultListBySubscriptionOperationOptions() ListBySubscriptionOperationOptions

func (ListBySubscriptionOperationOptions) ToHeaders

func (ListBySubscriptionOperationOptions) ToOData

func (ListBySubscriptionOperationOptions) ToQuery

type ListBySubscriptionOperationResponse

type ListBySubscriptionOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]TemplateSpec
}

type TemplateSpec

type TemplateSpec struct {
	Id         *string                 `json:"id,omitempty"`
	Location   string                  `json:"location"`
	Name       *string                 `json:"name,omitempty"`
	Properties *TemplateSpecProperties `json:"properties,omitempty"`
	SystemData *systemdata.SystemData  `json:"systemData,omitempty"`
	Tags       *map[string]string      `json:"tags,omitempty"`
	Type       *string                 `json:"type,omitempty"`
}

type TemplateSpecExpandKind

type TemplateSpecExpandKind string
const (
	TemplateSpecExpandKindVersions TemplateSpecExpandKind = "versions"
)

func (*TemplateSpecExpandKind) UnmarshalJSON

func (s *TemplateSpecExpandKind) UnmarshalJSON(bytes []byte) error

type TemplateSpecId

type TemplateSpecId struct {
	SubscriptionId    string
	ResourceGroupName string
	TemplateSpecName  string
}

TemplateSpecId is a struct representing the Resource ID for a Template Spec

func NewTemplateSpecID

func NewTemplateSpecID(subscriptionId string, resourceGroupName string, templateSpecName string) TemplateSpecId

NewTemplateSpecID returns a new TemplateSpecId struct

func ParseTemplateSpecID

func ParseTemplateSpecID(input string) (*TemplateSpecId, error)

ParseTemplateSpecID parses 'input' into a TemplateSpecId

func ParseTemplateSpecIDInsensitively

func ParseTemplateSpecIDInsensitively(input string) (*TemplateSpecId, error)

ParseTemplateSpecIDInsensitively parses 'input' case-insensitively into a TemplateSpecId note: this method should only be used for API response data and not user input

func (*TemplateSpecId) FromParseResult added in v0.20231127.1171502

func (id *TemplateSpecId) FromParseResult(input resourceids.ParseResult) error

func (TemplateSpecId) ID

func (id TemplateSpecId) ID() string

ID returns the formatted Template Spec ID

func (TemplateSpecId) Segments

func (id TemplateSpecId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Template Spec ID

func (TemplateSpecId) String

func (id TemplateSpecId) String() string

String returns a human-readable description of this Template Spec ID

type TemplateSpecOperationPredicate

type TemplateSpecOperationPredicate struct {
	Id       *string
	Location *string
	Name     *string
	Type     *string
}

func (TemplateSpecOperationPredicate) Matches

type TemplateSpecProperties

type TemplateSpecProperties struct {
	Description *string                             `json:"description,omitempty"`
	DisplayName *string                             `json:"displayName,omitempty"`
	Metadata    *interface{}                        `json:"metadata,omitempty"`
	Versions    *map[string]TemplateSpecVersionInfo `json:"versions,omitempty"`
}

type TemplateSpecUpdateModel

type TemplateSpecUpdateModel struct {
	Id         *string                `json:"id,omitempty"`
	Name       *string                `json:"name,omitempty"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Tags       *map[string]string     `json:"tags,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type TemplateSpecVersionInfo

type TemplateSpecVersionInfo struct {
	Description  *string `json:"description,omitempty"`
	TimeCreated  *string `json:"timeCreated,omitempty"`
	TimeModified *string `json:"timeModified,omitempty"`
}

func (*TemplateSpecVersionInfo) GetTimeCreatedAsTime

func (o *TemplateSpecVersionInfo) GetTimeCreatedAsTime() (*time.Time, error)

func (*TemplateSpecVersionInfo) GetTimeModifiedAsTime

func (o *TemplateSpecVersionInfo) GetTimeModifiedAsTime() (*time.Time, error)

func (*TemplateSpecVersionInfo) SetTimeCreatedAsTime

func (o *TemplateSpecVersionInfo) SetTimeCreatedAsTime(input time.Time)

func (*TemplateSpecVersionInfo) SetTimeModifiedAsTime

func (o *TemplateSpecVersionInfo) SetTimeModifiedAsTime(input time.Time)

type TemplateSpecsClient

type TemplateSpecsClient struct {
	Client *resourcemanager.Client
}

func NewTemplateSpecsClientWithBaseURI

func NewTemplateSpecsClientWithBaseURI(sdkApi sdkEnv.Api) (*TemplateSpecsClient, error)

func (TemplateSpecsClient) CreateOrUpdate

CreateOrUpdate ...

func (TemplateSpecsClient) Delete

Delete ...

func (TemplateSpecsClient) Get

Get ...

func (TemplateSpecsClient) GetBuiltIn

GetBuiltIn ...

func (TemplateSpecsClient) ListBuiltIns

ListBuiltIns ...

func (TemplateSpecsClient) ListBuiltInsComplete

ListBuiltInsComplete retrieves all the results into a single object

func (TemplateSpecsClient) ListBuiltInsCompleteMatchingPredicate

func (c TemplateSpecsClient) ListBuiltInsCompleteMatchingPredicate(ctx context.Context, options ListBuiltInsOperationOptions, predicate TemplateSpecOperationPredicate) (result ListBuiltInsCompleteResult, err error)

ListBuiltInsCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (TemplateSpecsClient) ListByResourceGroup

ListByResourceGroup ...

func (TemplateSpecsClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all the results into a single object

func (TemplateSpecsClient) ListByResourceGroupCompleteMatchingPredicate

func (c TemplateSpecsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, options ListByResourceGroupOperationOptions, predicate TemplateSpecOperationPredicate) (result ListByResourceGroupCompleteResult, err error)

ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (TemplateSpecsClient) ListBySubscription

ListBySubscription ...

func (TemplateSpecsClient) ListBySubscriptionComplete

ListBySubscriptionComplete retrieves all the results into a single object

func (TemplateSpecsClient) ListBySubscriptionCompleteMatchingPredicate

func (c TemplateSpecsClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, options ListBySubscriptionOperationOptions, predicate TemplateSpecOperationPredicate) (result ListBySubscriptionCompleteResult, err error)

ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (TemplateSpecsClient) Update

Update ...

type UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *TemplateSpec
}

Jump to

Keyboard shortcuts

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