invoicesections

package
v0.20240125.1172517 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/billing/2019-10-01-preview/invoicesections Documentation

The invoicesections SDK allows for interaction with the Azure Resource Manager Service billing (API Version 2019-10-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-sdk/resource-manager/billing/2019-10-01-preview/invoicesections"

Client Initialization

client := invoicesections.NewInvoiceSectionsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: InvoiceSectionsClient.Create

ctx := context.TODO()
id := invoicesections.NewInvoiceSectionID("billingAccountValue", "billingProfileValue", "invoiceSectionValue")

payload := invoicesections.InvoiceSectionCreationRequest{
	// ...
}


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

Example Usage: InvoiceSectionsClient.ElevateToBillingProfile

ctx := context.TODO()
id := invoicesections.NewInvoiceSectionID("billingAccountValue", "billingProfileValue", "invoiceSectionValue")

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

Example Usage: InvoiceSectionsClient.Get

ctx := context.TODO()
id := invoicesections.NewInvoiceSectionID("billingAccountValue", "billingProfileValue", "invoiceSectionValue")

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

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

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

Example Usage: InvoiceSectionsClient.Update

ctx := context.TODO()
id := invoicesections.NewInvoiceSectionID("billingAccountValue", "billingProfileValue", "invoiceSectionValue")

payload := invoicesections.InvoiceSection{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForInvoiceSectionState

func PossibleValuesForInvoiceSectionState() []string

func PossibleValuesForTargetCloud

func PossibleValuesForTargetCloud() []string

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 ValidateInvoiceSectionID

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

ValidateInvoiceSectionID checks that 'input' can be parsed as a Invoice Section 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 CreateOperationResponse

type CreateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *InvoiceSection
}

type ElevateToBillingProfileOperationResponse

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

type GetOperationResponse

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

type InvoiceSection

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

type InvoiceSectionCreationRequest

type InvoiceSectionCreationRequest struct {
	DisplayName *string `json:"displayName,omitempty"`
}

type InvoiceSectionId

type InvoiceSectionId struct {
	BillingAccountName string
	BillingProfileName string
	InvoiceSectionName string
}

InvoiceSectionId is a struct representing the Resource ID for a Invoice Section

func NewInvoiceSectionID

func NewInvoiceSectionID(billingAccountName string, billingProfileName string, invoiceSectionName string) InvoiceSectionId

NewInvoiceSectionID returns a new InvoiceSectionId struct

func ParseInvoiceSectionID

func ParseInvoiceSectionID(input string) (*InvoiceSectionId, error)

ParseInvoiceSectionID parses 'input' into a InvoiceSectionId

func ParseInvoiceSectionIDInsensitively

func ParseInvoiceSectionIDInsensitively(input string) (*InvoiceSectionId, error)

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

func (*InvoiceSectionId) FromParseResult

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

func (InvoiceSectionId) ID

func (id InvoiceSectionId) ID() string

ID returns the formatted Invoice Section ID

func (InvoiceSectionId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Invoice Section ID

func (InvoiceSectionId) String

func (id InvoiceSectionId) String() string

String returns a human-readable description of this Invoice Section ID

type InvoiceSectionListResult

type InvoiceSectionListResult struct {
	NextLink *string           `json:"nextLink,omitempty"`
	Value    *[]InvoiceSection `json:"value,omitempty"`
}

type InvoiceSectionProperties

type InvoiceSectionProperties struct {
	DisplayName *string              `json:"displayName,omitempty"`
	State       *InvoiceSectionState `json:"state,omitempty"`
	TargetCloud *TargetCloud         `json:"targetCloud,omitempty"`
}

type InvoiceSectionState

type InvoiceSectionState string
const (
	InvoiceSectionStateActive     InvoiceSectionState = "Active"
	InvoiceSectionStateRestricted InvoiceSectionState = "Restricted"
)

func (*InvoiceSectionState) UnmarshalJSON

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

type InvoiceSectionsClient

type InvoiceSectionsClient struct {
	Client *resourcemanager.Client
}

func NewInvoiceSectionsClientWithBaseURI

func NewInvoiceSectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*InvoiceSectionsClient, error)

func (InvoiceSectionsClient) Create

Create ...

func (InvoiceSectionsClient) CreateThenPoll

CreateThenPoll performs Create then polls until it's completed

func (InvoiceSectionsClient) ElevateToBillingProfile

ElevateToBillingProfile ...

func (InvoiceSectionsClient) Get

Get ...

func (InvoiceSectionsClient) ListByBillingProfile

ListByBillingProfile ...

func (InvoiceSectionsClient) Update

Update ...

func (InvoiceSectionsClient) UpdateThenPoll

func (c InvoiceSectionsClient) UpdateThenPoll(ctx context.Context, id InvoiceSectionId, input InvoiceSection) error

UpdateThenPoll performs Update then polls until it's completed

type ListByBillingProfileOperationResponse

type ListByBillingProfileOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *InvoiceSectionListResult
}

type TargetCloud

type TargetCloud string
const (
	TargetCloudUSGov TargetCloud = "USGov"
	TargetCloudUSNat TargetCloud = "USNat"
	TargetCloudUSSec TargetCloud = "USSec"
)

func (*TargetCloud) UnmarshalJSON

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

type UpdateOperationResponse

type UpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *InvoiceSection
}

Jump to

Keyboard shortcuts

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