invoicesections

package
v0.20241009.1142232 Latest Latest
Warning

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

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

README

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

The invoicesections SDK allows for interaction with Azure Resource Manager 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("billingAccountName", "billingProfileName", "invoiceSectionName")

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("billingAccountName", "billingProfileName", "invoiceSectionName")

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("billingAccountName", "billingProfileName", "invoiceSectionName")

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("billingAccountName", "billingProfileName")

// 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: InvoiceSectionsClient.Update

ctx := context.TODO()
id := invoicesections.NewInvoiceSectionID("billingAccountName", "billingProfileName", "invoiceSectionName")

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 InvoiceSectionOperationPredicate added in v0.20240226.1173038

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

func (InvoiceSectionOperationPredicate) Matches added in v0.20240226.1173038

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) ListByBillingProfileComplete added in v0.20240226.1173038

ListByBillingProfileComplete retrieves all the results into a single object

func (InvoiceSectionsClient) ListByBillingProfileCompleteMatchingPredicate added in v0.20240226.1173038

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

ListByBillingProfileCompleteMatchingPredicate retrieves all the results and then applies the predicate

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 ListByBillingProfileCompleteResult added in v0.20240226.1173038

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

type ListByBillingProfileCustomPager added in v0.20240628.1153531

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

type ListByBillingProfileOperationResponse

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

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