variable

package
v0.20231020.1151504 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2023 License: MPL-2.0 Imports: 10 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/automation/2019-06-01/variable Documentation

The variable SDK allows for interaction with the Azure Resource Manager Service automation (API Version 2019-06-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/automation/2019-06-01/variable"

Client Initialization

client := variable.NewVariableClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: VariableClient.CreateOrUpdate

ctx := context.TODO()
id := variable.NewVariableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "automationAccountValue", "variableValue")

payload := variable.VariableCreateOrUpdateParameters{
	// ...
}


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

ctx := context.TODO()
id := variable.NewVariableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "automationAccountValue", "variableValue")

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

ctx := context.TODO()
id := variable.NewVariableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "automationAccountValue", "variableValue")

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: VariableClient.ListByAutomationAccount

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

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

Example Usage: VariableClient.Update

ctx := context.TODO()
id := variable.NewVariableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "automationAccountValue", "variableValue")

payload := variable.VariableUpdateParameters{
	// ...
}


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 ValidateAutomationAccountID

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

ValidateAutomationAccountID checks that 'input' can be parsed as a Automation Account ID

func ValidateVariableID

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

ValidateVariableID checks that 'input' can be parsed as a Variable ID

Types

type AutomationAccountId

type AutomationAccountId struct {
	SubscriptionId        string
	ResourceGroupName     string
	AutomationAccountName string
}

AutomationAccountId is a struct representing the Resource ID for a Automation Account

func NewAutomationAccountID

func NewAutomationAccountID(subscriptionId string, resourceGroupName string, automationAccountName string) AutomationAccountId

NewAutomationAccountID returns a new AutomationAccountId struct

func ParseAutomationAccountID

func ParseAutomationAccountID(input string) (*AutomationAccountId, error)

ParseAutomationAccountID parses 'input' into a AutomationAccountId

func ParseAutomationAccountIDInsensitively

func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, error)

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

func (AutomationAccountId) ID

func (id AutomationAccountId) ID() string

ID returns the formatted Automation Account ID

func (AutomationAccountId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Automation Account ID

func (AutomationAccountId) String

func (id AutomationAccountId) String() string

String returns a human-readable description of this Automation Account ID

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	Model        *Variable
}

type DeleteOperationResponse

type DeleteOperationResponse struct {
	HttpResponse *http.Response
}

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	Model        *Variable
}

type ListByAutomationAccountCompleteResult

type ListByAutomationAccountCompleteResult struct {
	Items []Variable
}

type ListByAutomationAccountOperationResponse

type ListByAutomationAccountOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]Variable
	// contains filtered or unexported fields
}

func (ListByAutomationAccountOperationResponse) HasMore

func (ListByAutomationAccountOperationResponse) LoadMore

type UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	Model        *Variable
}

type Variable

type Variable struct {
	Id         *string             `json:"id,omitempty"`
	Name       *string             `json:"name,omitempty"`
	Properties *VariableProperties `json:"properties,omitempty"`
	Type       *string             `json:"type,omitempty"`
}

type VariableClient

type VariableClient struct {
	Client autorest.Client
	// contains filtered or unexported fields
}

func NewVariableClientWithBaseURI

func NewVariableClientWithBaseURI(endpoint string) VariableClient

func (VariableClient) CreateOrUpdate

CreateOrUpdate ...

func (VariableClient) Delete

func (c VariableClient) Delete(ctx context.Context, id VariableId) (result DeleteOperationResponse, err error)

Delete ...

func (VariableClient) Get

func (c VariableClient) Get(ctx context.Context, id VariableId) (result GetOperationResponse, err error)

Get ...

func (VariableClient) ListByAutomationAccount

ListByAutomationAccount ...

func (VariableClient) ListByAutomationAccountComplete

func (c VariableClient) ListByAutomationAccountComplete(ctx context.Context, id AutomationAccountId) (ListByAutomationAccountCompleteResult, error)

ListByAutomationAccountComplete retrieves all of the results into a single object

func (VariableClient) ListByAutomationAccountCompleteMatchingPredicate

func (c VariableClient) ListByAutomationAccountCompleteMatchingPredicate(ctx context.Context, id AutomationAccountId, predicate VariableOperationPredicate) (resp ListByAutomationAccountCompleteResult, err error)

ListByAutomationAccountCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (VariableClient) Update

Update ...

type VariableCreateOrUpdateParameters

type VariableCreateOrUpdateParameters struct {
	Name       string                           `json:"name"`
	Properties VariableCreateOrUpdateProperties `json:"properties"`
}

type VariableCreateOrUpdateProperties

type VariableCreateOrUpdateProperties struct {
	Description *string `json:"description,omitempty"`
	IsEncrypted *bool   `json:"isEncrypted,omitempty"`
	Value       *string `json:"value,omitempty"`
}

type VariableId

type VariableId struct {
	SubscriptionId        string
	ResourceGroupName     string
	AutomationAccountName string
	VariableName          string
}

VariableId is a struct representing the Resource ID for a Variable

func NewVariableID

func NewVariableID(subscriptionId string, resourceGroupName string, automationAccountName string, variableName string) VariableId

NewVariableID returns a new VariableId struct

func ParseVariableID

func ParseVariableID(input string) (*VariableId, error)

ParseVariableID parses 'input' into a VariableId

func ParseVariableIDInsensitively

func ParseVariableIDInsensitively(input string) (*VariableId, error)

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

func (VariableId) ID

func (id VariableId) ID() string

ID returns the formatted Variable ID

func (VariableId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Variable ID

func (VariableId) String

func (id VariableId) String() string

String returns a human-readable description of this Variable ID

type VariableOperationPredicate

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

func (VariableOperationPredicate) Matches

func (p VariableOperationPredicate) Matches(input Variable) bool

type VariableProperties

type VariableProperties struct {
	CreationTime     *string `json:"creationTime,omitempty"`
	Description      *string `json:"description,omitempty"`
	IsEncrypted      *bool   `json:"isEncrypted,omitempty"`
	LastModifiedTime *string `json:"lastModifiedTime,omitempty"`
	Value            *string `json:"value,omitempty"`
}

func (*VariableProperties) GetCreationTimeAsTime

func (o *VariableProperties) GetCreationTimeAsTime() (*time.Time, error)

func (*VariableProperties) GetLastModifiedTimeAsTime

func (o *VariableProperties) GetLastModifiedTimeAsTime() (*time.Time, error)

func (*VariableProperties) SetCreationTimeAsTime

func (o *VariableProperties) SetCreationTimeAsTime(input time.Time)

func (*VariableProperties) SetLastModifiedTimeAsTime

func (o *VariableProperties) SetLastModifiedTimeAsTime(input time.Time)

type VariableUpdateParameters

type VariableUpdateParameters struct {
	Name       *string                   `json:"name,omitempty"`
	Properties *VariableUpdateProperties `json:"properties,omitempty"`
}

type VariableUpdateProperties

type VariableUpdateProperties struct {
	Description *string `json:"description,omitempty"`
	Value       *string `json:"value,omitempty"`
}

Jump to

Keyboard shortcuts

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