instructions

package
v0.20240611.1085123 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2024 License: MPL-2.0 Imports: 12 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/billing/2020-05-01/instructions Documentation

The instructions SDK allows for interaction with the Azure Resource Manager Service billing (API Version 2020-05-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/billing/2020-05-01/instructions"

Client Initialization

client := instructions.NewInstructionsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: InstructionsClient.Get

ctx := context.TODO()
id := instructions.NewInstructionID("billingAccountValue", "billingProfileValue", "instructionValue")

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: InstructionsClient.ListByBillingProfile

ctx := context.TODO()
id := instructions.NewBillingProfileID("billingAccountValue", "billingProfileValue")

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

Example Usage: InstructionsClient.Put

ctx := context.TODO()
id := instructions.NewInstructionID("billingAccountValue", "billingProfileValue", "instructionValue")

payload := instructions.Instruction{
	// ...
}


read, err := client.Put(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 ValidateBillingProfileID

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

ValidateBillingProfileID checks that 'input' can be parsed as a Billing Profile ID

func ValidateInstructionID

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

ValidateInstructionID checks that 'input' can be parsed as a Instruction ID

Types

type BillingProfileId

type BillingProfileId struct {
	BillingAccountName string
	BillingProfileName string
}

BillingProfileId is a struct representing the Resource ID for a Billing Profile

func NewBillingProfileID

func NewBillingProfileID(billingAccountName string, billingProfileName string) BillingProfileId

NewBillingProfileID returns a new BillingProfileId struct

func ParseBillingProfileID

func ParseBillingProfileID(input string) (*BillingProfileId, error)

ParseBillingProfileID parses 'input' into a BillingProfileId

func ParseBillingProfileIDInsensitively

func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error)

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

func (*BillingProfileId) FromParseResult

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

func (BillingProfileId) ID

func (id BillingProfileId) ID() string

ID returns the formatted Billing Profile ID

func (BillingProfileId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Billing Profile ID

func (BillingProfileId) String

func (id BillingProfileId) String() string

String returns a human-readable description of this Billing Profile ID

type GetOperationResponse

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

type Instruction

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

type InstructionId

type InstructionId struct {
	BillingAccountName string
	BillingProfileName string
	InstructionName    string
}

InstructionId is a struct representing the Resource ID for a Instruction

func NewInstructionID

func NewInstructionID(billingAccountName string, billingProfileName string, instructionName string) InstructionId

NewInstructionID returns a new InstructionId struct

func ParseInstructionID

func ParseInstructionID(input string) (*InstructionId, error)

ParseInstructionID parses 'input' into a InstructionId

func ParseInstructionIDInsensitively

func ParseInstructionIDInsensitively(input string) (*InstructionId, error)

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

func (*InstructionId) FromParseResult

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

func (InstructionId) ID

func (id InstructionId) ID() string

ID returns the formatted Instruction ID

func (InstructionId) Segments

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

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

func (InstructionId) String

func (id InstructionId) String() string

String returns a human-readable description of this Instruction ID

type InstructionOperationPredicate

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

func (InstructionOperationPredicate) Matches

type InstructionProperties

type InstructionProperties struct {
	Amount       float64 `json:"amount"`
	CreationDate *string `json:"creationDate,omitempty"`
	EndDate      string  `json:"endDate"`
	StartDate    string  `json:"startDate"`
}

func (*InstructionProperties) GetCreationDateAsTime

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

func (*InstructionProperties) GetEndDateAsTime

func (o *InstructionProperties) GetEndDateAsTime() (*time.Time, error)

func (*InstructionProperties) GetStartDateAsTime

func (o *InstructionProperties) GetStartDateAsTime() (*time.Time, error)

func (*InstructionProperties) SetCreationDateAsTime

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

func (*InstructionProperties) SetEndDateAsTime

func (o *InstructionProperties) SetEndDateAsTime(input time.Time)

func (*InstructionProperties) SetStartDateAsTime

func (o *InstructionProperties) SetStartDateAsTime(input time.Time)

type InstructionsClient

type InstructionsClient struct {
	Client *resourcemanager.Client
}

func NewInstructionsClientWithBaseURI

func NewInstructionsClientWithBaseURI(sdkApi sdkEnv.Api) (*InstructionsClient, error)

func (InstructionsClient) Get

Get ...

func (InstructionsClient) ListByBillingProfile

func (c InstructionsClient) ListByBillingProfile(ctx context.Context, id BillingProfileId) (result ListByBillingProfileOperationResponse, err error)

ListByBillingProfile ...

func (InstructionsClient) ListByBillingProfileComplete

ListByBillingProfileComplete retrieves all the results into a single object

func (InstructionsClient) ListByBillingProfileCompleteMatchingPredicate

func (c InstructionsClient) ListByBillingProfileCompleteMatchingPredicate(ctx context.Context, id BillingProfileId, predicate InstructionOperationPredicate) (result ListByBillingProfileCompleteResult, err error)

ListByBillingProfileCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (InstructionsClient) Put

Put ...

type ListByBillingProfileCompleteResult

type ListByBillingProfileCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Instruction
}

type ListByBillingProfileOperationResponse

type ListByBillingProfileOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Instruction
}

type PutOperationResponse

type PutOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Instruction
}

Jump to

Keyboard shortcuts

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