formulas

package
v0.20240715.1103416 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/formulas Documentation

The formulas SDK allows for interaction with the Azure Resource Manager Service devtestlab (API Version 2018-09-15).

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/devtestlab/2018-09-15/formulas"

Client Initialization

client := formulas.NewFormulasClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: FormulasClient.CreateOrUpdate

ctx := context.TODO()
id := formulas.NewFormulaID("12345678-1234-9876-4563-123456789012", "example-resource-group", "labValue", "formulaValue")

payload := formulas.Formula{
	// ...
}


if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Example Usage: FormulasClient.Delete

ctx := context.TODO()
id := formulas.NewFormulaID("12345678-1234-9876-4563-123456789012", "example-resource-group", "labValue", "formulaValue")

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

ctx := context.TODO()
id := formulas.NewFormulaID("12345678-1234-9876-4563-123456789012", "example-resource-group", "labValue", "formulaValue")

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

Example Usage: FormulasClient.List

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

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

Example Usage: FormulasClient.Update

ctx := context.TODO()
id := formulas.NewFormulaID("12345678-1234-9876-4563-123456789012", "example-resource-group", "labValue", "formulaValue")

payload := formulas.UpdateResource{
	// ...
}


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 PossibleValuesForEnableStatus

func PossibleValuesForEnableStatus() []string

func PossibleValuesForHostCachingOptions

func PossibleValuesForHostCachingOptions() []string

func PossibleValuesForStorageType

func PossibleValuesForStorageType() []string

func PossibleValuesForTransportProtocol

func PossibleValuesForTransportProtocol() []string

func ValidateFormulaID

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

ValidateFormulaID checks that 'input' can be parsed as a Formula ID

func ValidateLabID

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

ValidateLabID checks that 'input' can be parsed as a Lab ID

Types

type ArtifactInstallProperties

type ArtifactInstallProperties struct {
	ArtifactId               *string                        `json:"artifactId,omitempty"`
	ArtifactTitle            *string                        `json:"artifactTitle,omitempty"`
	DeploymentStatusMessage  *string                        `json:"deploymentStatusMessage,omitempty"`
	InstallTime              *string                        `json:"installTime,omitempty"`
	Parameters               *[]ArtifactParameterProperties `json:"parameters,omitempty"`
	Status                   *string                        `json:"status,omitempty"`
	VMExtensionStatusMessage *string                        `json:"vmExtensionStatusMessage,omitempty"`
}

func (*ArtifactInstallProperties) GetInstallTimeAsTime

func (o *ArtifactInstallProperties) GetInstallTimeAsTime() (*time.Time, error)

func (*ArtifactInstallProperties) SetInstallTimeAsTime

func (o *ArtifactInstallProperties) SetInstallTimeAsTime(input time.Time)

type ArtifactParameterProperties

type ArtifactParameterProperties struct {
	Name  *string `json:"name,omitempty"`
	Value *string `json:"value,omitempty"`
}

type AttachNewDataDiskOptions

type AttachNewDataDiskOptions struct {
	DiskName    *string      `json:"diskName,omitempty"`
	DiskSizeGiB *int64       `json:"diskSizeGiB,omitempty"`
	DiskType    *StorageType `json:"diskType,omitempty"`
}

type BulkCreationParameters

type BulkCreationParameters struct {
	InstanceCount *int64 `json:"instanceCount,omitempty"`
}

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Formula
}

type DataDiskProperties

type DataDiskProperties struct {
	AttachNewDataDiskOptions *AttachNewDataDiskOptions `json:"attachNewDataDiskOptions,omitempty"`
	ExistingLabDiskId        *string                   `json:"existingLabDiskId,omitempty"`
	HostCaching              *HostCachingOptions       `json:"hostCaching,omitempty"`
}

type DayDetails

type DayDetails struct {
	Time *string `json:"time,omitempty"`
}

type DeleteOperationResponse

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

type EnableStatus

type EnableStatus string
const (
	EnableStatusDisabled EnableStatus = "Disabled"
	EnableStatusEnabled  EnableStatus = "Enabled"
)

func (*EnableStatus) UnmarshalJSON

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

type Formula

type Formula struct {
	Id         *string            `json:"id,omitempty"`
	Location   *string            `json:"location,omitempty"`
	Name       *string            `json:"name,omitempty"`
	Properties FormulaProperties  `json:"properties"`
	Tags       *map[string]string `json:"tags,omitempty"`
	Type       *string            `json:"type,omitempty"`
}

type FormulaId

type FormulaId struct {
	SubscriptionId    string
	ResourceGroupName string
	LabName           string
	FormulaName       string
}

FormulaId is a struct representing the Resource ID for a Formula

func NewFormulaID

func NewFormulaID(subscriptionId string, resourceGroupName string, labName string, formulaName string) FormulaId

NewFormulaID returns a new FormulaId struct

func ParseFormulaID

func ParseFormulaID(input string) (*FormulaId, error)

ParseFormulaID parses 'input' into a FormulaId

func ParseFormulaIDInsensitively

func ParseFormulaIDInsensitively(input string) (*FormulaId, error)

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

func (*FormulaId) FromParseResult

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

func (FormulaId) ID

func (id FormulaId) ID() string

ID returns the formatted Formula ID

func (FormulaId) Segments

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

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

func (FormulaId) String

func (id FormulaId) String() string

String returns a human-readable description of this Formula ID

type FormulaOperationPredicate

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

func (FormulaOperationPredicate) Matches

func (p FormulaOperationPredicate) Matches(input Formula) bool

type FormulaProperties

type FormulaProperties struct {
	Author            *string                             `json:"author,omitempty"`
	CreationDate      *string                             `json:"creationDate,omitempty"`
	Description       *string                             `json:"description,omitempty"`
	FormulaContent    *LabVirtualMachineCreationParameter `json:"formulaContent,omitempty"`
	OsType            *string                             `json:"osType,omitempty"`
	ProvisioningState *string                             `json:"provisioningState,omitempty"`
	UniqueIdentifier  *string                             `json:"uniqueIdentifier,omitempty"`
	VM                *FormulaPropertiesFromVM            `json:"vm,omitempty"`
}

func (*FormulaProperties) GetCreationDateAsTime

func (o *FormulaProperties) GetCreationDateAsTime() (*time.Time, error)

func (*FormulaProperties) SetCreationDateAsTime

func (o *FormulaProperties) SetCreationDateAsTime(input time.Time)

type FormulaPropertiesFromVM

type FormulaPropertiesFromVM struct {
	LabVMId *string `json:"labVmId,omitempty"`
}

type FormulasClient

type FormulasClient struct {
	Client *resourcemanager.Client
}

func NewFormulasClientWithBaseURI

func NewFormulasClientWithBaseURI(sdkApi sdkEnv.Api) (*FormulasClient, error)

func (FormulasClient) CreateOrUpdate

func (c FormulasClient) CreateOrUpdate(ctx context.Context, id FormulaId, input Formula) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (FormulasClient) CreateOrUpdateThenPoll

func (c FormulasClient) CreateOrUpdateThenPoll(ctx context.Context, id FormulaId, input Formula) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (FormulasClient) Delete

func (c FormulasClient) Delete(ctx context.Context, id FormulaId) (result DeleteOperationResponse, err error)

Delete ...

func (FormulasClient) Get

Get ...

func (FormulasClient) List

func (c FormulasClient) List(ctx context.Context, id LabId, options ListOperationOptions) (result ListOperationResponse, err error)

List ...

func (FormulasClient) ListComplete

func (c FormulasClient) ListComplete(ctx context.Context, id LabId, options ListOperationOptions) (ListCompleteResult, error)

ListComplete retrieves all the results into a single object

func (FormulasClient) ListCompleteMatchingPredicate

func (c FormulasClient) ListCompleteMatchingPredicate(ctx context.Context, id LabId, options ListOperationOptions, predicate FormulaOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (FormulasClient) Update

func (c FormulasClient) Update(ctx context.Context, id FormulaId, input UpdateResource) (result UpdateOperationResponse, err error)

Update ...

type GalleryImageReference

type GalleryImageReference struct {
	Offer     *string `json:"offer,omitempty"`
	OsType    *string `json:"osType,omitempty"`
	Publisher *string `json:"publisher,omitempty"`
	Sku       *string `json:"sku,omitempty"`
	Version   *string `json:"version,omitempty"`
}

type GetOperationOptions

type GetOperationOptions struct {
	Expand *string
}

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        *Formula
}

type HostCachingOptions

type HostCachingOptions string
const (
	HostCachingOptionsNone      HostCachingOptions = "None"
	HostCachingOptionsReadOnly  HostCachingOptions = "ReadOnly"
	HostCachingOptionsReadWrite HostCachingOptions = "ReadWrite"
)

func (*HostCachingOptions) UnmarshalJSON

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

type HourDetails

type HourDetails struct {
	Minute *int64 `json:"minute,omitempty"`
}

type InboundNatRule

type InboundNatRule struct {
	BackendPort       *int64             `json:"backendPort,omitempty"`
	FrontendPort      *int64             `json:"frontendPort,omitempty"`
	TransportProtocol *TransportProtocol `json:"transportProtocol,omitempty"`
}

type LabId

type LabId struct {
	SubscriptionId    string
	ResourceGroupName string
	LabName           string
}

LabId is a struct representing the Resource ID for a Lab

func NewLabID

func NewLabID(subscriptionId string, resourceGroupName string, labName string) LabId

NewLabID returns a new LabId struct

func ParseLabID

func ParseLabID(input string) (*LabId, error)

ParseLabID parses 'input' into a LabId

func ParseLabIDInsensitively

func ParseLabIDInsensitively(input string) (*LabId, error)

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

func (*LabId) FromParseResult

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

func (LabId) ID

func (id LabId) ID() string

ID returns the formatted Lab ID

func (LabId) Segments

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

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

func (LabId) String

func (id LabId) String() string

String returns a human-readable description of this Lab ID

type LabVirtualMachineCreationParameter

type LabVirtualMachineCreationParameter struct {
	Location   *string                                       `json:"location,omitempty"`
	Name       *string                                       `json:"name,omitempty"`
	Properties *LabVirtualMachineCreationParameterProperties `json:"properties,omitempty"`
	Tags       *map[string]string                            `json:"tags,omitempty"`
}

type LabVirtualMachineCreationParameterProperties

type LabVirtualMachineCreationParameterProperties struct {
	AllowClaim                 *bool                        `json:"allowClaim,omitempty"`
	Artifacts                  *[]ArtifactInstallProperties `json:"artifacts,omitempty"`
	BulkCreationParameters     *BulkCreationParameters      `json:"bulkCreationParameters,omitempty"`
	CreatedDate                *string                      `json:"createdDate,omitempty"`
	CustomImageId              *string                      `json:"customImageId,omitempty"`
	DataDiskParameters         *[]DataDiskProperties        `json:"dataDiskParameters,omitempty"`
	DisallowPublicIPAddress    *bool                        `json:"disallowPublicIpAddress,omitempty"`
	EnvironmentId              *string                      `json:"environmentId,omitempty"`
	ExpirationDate             *string                      `json:"expirationDate,omitempty"`
	GalleryImageReference      *GalleryImageReference       `json:"galleryImageReference,omitempty"`
	IsAuthenticationWithSshKey *bool                        `json:"isAuthenticationWithSshKey,omitempty"`
	LabSubnetName              *string                      `json:"labSubnetName,omitempty"`
	LabVirtualNetworkId        *string                      `json:"labVirtualNetworkId,omitempty"`
	NetworkInterface           *NetworkInterfaceProperties  `json:"networkInterface,omitempty"`
	Notes                      *string                      `json:"notes,omitempty"`
	OwnerObjectId              *string                      `json:"ownerObjectId,omitempty"`
	OwnerUserPrincipalName     *string                      `json:"ownerUserPrincipalName,omitempty"`
	Password                   *string                      `json:"password,omitempty"`
	PlanId                     *string                      `json:"planId,omitempty"`
	ScheduleParameters         *[]ScheduleCreationParameter `json:"scheduleParameters,omitempty"`
	Size                       *string                      `json:"size,omitempty"`
	SshKey                     *string                      `json:"sshKey,omitempty"`
	StorageType                *string                      `json:"storageType,omitempty"`
	UserName                   *string                      `json:"userName,omitempty"`
}

func (*LabVirtualMachineCreationParameterProperties) GetCreatedDateAsTime

func (o *LabVirtualMachineCreationParameterProperties) GetCreatedDateAsTime() (*time.Time, error)

func (*LabVirtualMachineCreationParameterProperties) GetExpirationDateAsTime

func (o *LabVirtualMachineCreationParameterProperties) GetExpirationDateAsTime() (*time.Time, error)

func (*LabVirtualMachineCreationParameterProperties) SetCreatedDateAsTime

func (o *LabVirtualMachineCreationParameterProperties) SetCreatedDateAsTime(input time.Time)

func (*LabVirtualMachineCreationParameterProperties) SetExpirationDateAsTime

func (o *LabVirtualMachineCreationParameterProperties) SetExpirationDateAsTime(input time.Time)

type ListCompleteResult

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

type ListCustomPager added in v0.20240628.1153531

type ListCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ListCustomPager) NextPageLink() *odata.Link

type ListOperationOptions

type ListOperationOptions struct {
	Expand  *string
	Filter  *string
	Orderby *string
	Top     *int64
}

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

func (ListOperationOptions) ToHeaders

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

func (ListOperationOptions) ToOData

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

func (ListOperationOptions) ToQuery

type ListOperationResponse

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

type NetworkInterfaceProperties

type NetworkInterfaceProperties struct {
	DnsName                            *string                             `json:"dnsName,omitempty"`
	PrivateIPAddress                   *string                             `json:"privateIpAddress,omitempty"`
	PublicIPAddress                    *string                             `json:"publicIpAddress,omitempty"`
	PublicIPAddressId                  *string                             `json:"publicIpAddressId,omitempty"`
	RdpAuthority                       *string                             `json:"rdpAuthority,omitempty"`
	SharedPublicIPAddressConfiguration *SharedPublicIPAddressConfiguration `json:"sharedPublicIpAddressConfiguration,omitempty"`
	SshAuthority                       *string                             `json:"sshAuthority,omitempty"`
	SubnetId                           *string                             `json:"subnetId,omitempty"`
	VirtualNetworkId                   *string                             `json:"virtualNetworkId,omitempty"`
}

type NotificationSettings

type NotificationSettings struct {
	EmailRecipient     *string       `json:"emailRecipient,omitempty"`
	NotificationLocale *string       `json:"notificationLocale,omitempty"`
	Status             *EnableStatus `json:"status,omitempty"`
	TimeInMinutes      *int64        `json:"timeInMinutes,omitempty"`
	WebhookUrl         *string       `json:"webhookUrl,omitempty"`
}

type ScheduleCreationParameter

type ScheduleCreationParameter struct {
	Location   *string                              `json:"location,omitempty"`
	Name       *string                              `json:"name,omitempty"`
	Properties *ScheduleCreationParameterProperties `json:"properties,omitempty"`
	Tags       *map[string]string                   `json:"tags,omitempty"`
}

type ScheduleCreationParameterProperties

type ScheduleCreationParameterProperties struct {
	DailyRecurrence      *DayDetails           `json:"dailyRecurrence,omitempty"`
	HourlyRecurrence     *HourDetails          `json:"hourlyRecurrence,omitempty"`
	NotificationSettings *NotificationSettings `json:"notificationSettings,omitempty"`
	Status               *EnableStatus         `json:"status,omitempty"`
	TargetResourceId     *string               `json:"targetResourceId,omitempty"`
	TaskType             *string               `json:"taskType,omitempty"`
	TimeZoneId           *string               `json:"timeZoneId,omitempty"`
	WeeklyRecurrence     *WeekDetails          `json:"weeklyRecurrence,omitempty"`
}

type SharedPublicIPAddressConfiguration

type SharedPublicIPAddressConfiguration struct {
	InboundNatRules *[]InboundNatRule `json:"inboundNatRules,omitempty"`
}

type StorageType

type StorageType string
const (
	StorageTypePremium     StorageType = "Premium"
	StorageTypeStandard    StorageType = "Standard"
	StorageTypeStandardSSD StorageType = "StandardSSD"
)

func (*StorageType) UnmarshalJSON

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

type TransportProtocol

type TransportProtocol string
const (
	TransportProtocolTcp TransportProtocol = "Tcp"
	TransportProtocolUdp TransportProtocol = "Udp"
)

func (*TransportProtocol) UnmarshalJSON

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

type UpdateOperationResponse

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

type UpdateResource

type UpdateResource struct {
	Tags *map[string]string `json:"tags,omitempty"`
}

type WeekDetails

type WeekDetails struct {
	Time     *string   `json:"time,omitempty"`
	Weekdays *[]string `json:"weekdays,omitempty"`
}

Jump to

Keyboard shortcuts

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