invoicesection

package
v0.20240712.1145105 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2024 License: MPL-2.0 Imports: 13 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/billing/2024-04-01/invoicesection Documentation

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

Client Initialization

client := invoicesection.NewInvoiceSectionClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: InvoiceSectionClient.CreateOrUpdate

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

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


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

Example Usage: InvoiceSectionClient.Delete

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

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

Example Usage: InvoiceSectionClient.Get

ctx := context.TODO()
id := invoicesection.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: InvoiceSectionClient.ListByBillingProfile

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

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

Example Usage: InvoiceSectionClient.ValidateDeleteEligibility

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

read, err := client.ValidateDeleteEligibility(ctx, id)
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 PossibleValuesForDeleteInvoiceSectionEligibilityCode

func PossibleValuesForDeleteInvoiceSectionEligibilityCode() []string

func PossibleValuesForDeleteInvoiceSectionEligibilityStatus

func PossibleValuesForDeleteInvoiceSectionEligibilityStatus() []string

func PossibleValuesForInvoiceSectionState

func PossibleValuesForInvoiceSectionState() []string

func PossibleValuesForInvoiceSectionStateReasonCode

func PossibleValuesForInvoiceSectionStateReasonCode() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []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 CreateOrUpdateOperationResponse

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

type DeleteInvoiceSectionEligibilityCode

type DeleteInvoiceSectionEligibilityCode string
const (
	DeleteInvoiceSectionEligibilityCodeActiveAzurePlans           DeleteInvoiceSectionEligibilityCode = "ActiveAzurePlans"
	DeleteInvoiceSectionEligibilityCodeActiveBillingSubscriptions DeleteInvoiceSectionEligibilityCode = "ActiveBillingSubscriptions"
	DeleteInvoiceSectionEligibilityCodeLastInvoiceSection         DeleteInvoiceSectionEligibilityCode = "LastInvoiceSection"
	DeleteInvoiceSectionEligibilityCodeOther                      DeleteInvoiceSectionEligibilityCode = "Other"
	DeleteInvoiceSectionEligibilityCodeReservedInstances          DeleteInvoiceSectionEligibilityCode = "ReservedInstances"
)

func (*DeleteInvoiceSectionEligibilityCode) UnmarshalJSON

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

type DeleteInvoiceSectionEligibilityDetail

type DeleteInvoiceSectionEligibilityDetail struct {
	Code    *DeleteInvoiceSectionEligibilityCode `json:"code,omitempty"`
	Message *string                              `json:"message,omitempty"`
}

type DeleteInvoiceSectionEligibilityResult

type DeleteInvoiceSectionEligibilityResult struct {
	EligibilityDetails *[]DeleteInvoiceSectionEligibilityDetail `json:"eligibilityDetails,omitempty"`
	EligibilityStatus  *DeleteInvoiceSectionEligibilityStatus   `json:"eligibilityStatus,omitempty"`
}

type DeleteInvoiceSectionEligibilityStatus

type DeleteInvoiceSectionEligibilityStatus string
const (
	DeleteInvoiceSectionEligibilityStatusAllowed    DeleteInvoiceSectionEligibilityStatus = "Allowed"
	DeleteInvoiceSectionEligibilityStatusNotAllowed DeleteInvoiceSectionEligibilityStatus = "NotAllowed"
)

func (*DeleteInvoiceSectionEligibilityStatus) UnmarshalJSON

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

type DeleteOperationResponse

type DeleteOperationResponse struct {
	Poller       pollers.Poller
	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"`
	SystemData *systemdata.SystemData    `json:"systemData,omitempty"`
	Tags       *map[string]string        `json:"tags,omitempty"`
	Type       *string                   `json:"type,omitempty"`
}

type InvoiceSectionClient

type InvoiceSectionClient struct {
	Client *resourcemanager.Client
}

func NewInvoiceSectionClientWithBaseURI

func NewInvoiceSectionClientWithBaseURI(sdkApi sdkEnv.Api) (*InvoiceSectionClient, error)

func (InvoiceSectionClient) CreateOrUpdate

CreateOrUpdate ...

func (InvoiceSectionClient) CreateOrUpdateThenPoll

func (c InvoiceSectionClient) CreateOrUpdateThenPoll(ctx context.Context, id InvoiceSectionId, input InvoiceSection) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (InvoiceSectionClient) Delete

Delete ...

func (InvoiceSectionClient) DeleteThenPoll

func (c InvoiceSectionClient) DeleteThenPoll(ctx context.Context, id InvoiceSectionId) error

DeleteThenPoll performs Delete then polls until it's completed

func (InvoiceSectionClient) Get

Get ...

func (InvoiceSectionClient) ListByBillingProfile

ListByBillingProfile ...

func (InvoiceSectionClient) ListByBillingProfileComplete

ListByBillingProfileComplete retrieves all the results into a single object

func (InvoiceSectionClient) ListByBillingProfileCompleteMatchingPredicate

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

ListByBillingProfileCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (InvoiceSectionClient) ValidateDeleteEligibility

func (c InvoiceSectionClient) ValidateDeleteEligibility(ctx context.Context, id InvoiceSectionId) (result ValidateDeleteEligibilityOperationResponse, err error)

ValidateDeleteEligibility ...

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

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

func (InvoiceSectionOperationPredicate) Matches

type InvoiceSectionProperties

type InvoiceSectionProperties struct {
	DisplayName       *string                        `json:"displayName,omitempty"`
	ProvisioningState *ProvisioningState             `json:"provisioningState,omitempty"`
	ReasonCode        *InvoiceSectionStateReasonCode `json:"reasonCode,omitempty"`
	State             *InvoiceSectionState           `json:"state,omitempty"`
	SystemId          *string                        `json:"systemId,omitempty"`
	Tags              *map[string]string             `json:"tags,omitempty"`
	TargetCloud       *TargetCloud                   `json:"targetCloud,omitempty"`
}

type InvoiceSectionState

type InvoiceSectionState string
const (
	InvoiceSectionStateActive      InvoiceSectionState = "Active"
	InvoiceSectionStateDeleted     InvoiceSectionState = "Deleted"
	InvoiceSectionStateDisabled    InvoiceSectionState = "Disabled"
	InvoiceSectionStateOther       InvoiceSectionState = "Other"
	InvoiceSectionStateRestricted  InvoiceSectionState = "Restricted"
	InvoiceSectionStateUnderReview InvoiceSectionState = "UnderReview"
	InvoiceSectionStateWarned      InvoiceSectionState = "Warned"
)

func (*InvoiceSectionState) UnmarshalJSON

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

type InvoiceSectionStateReasonCode

type InvoiceSectionStateReasonCode string
const (
	InvoiceSectionStateReasonCodeOther                InvoiceSectionStateReasonCode = "Other"
	InvoiceSectionStateReasonCodePastDue              InvoiceSectionStateReasonCode = "PastDue"
	InvoiceSectionStateReasonCodeSpendingLimitExpired InvoiceSectionStateReasonCode = "SpendingLimitExpired"
	InvoiceSectionStateReasonCodeSpendingLimitReached InvoiceSectionStateReasonCode = "SpendingLimitReached"
	InvoiceSectionStateReasonCodeUnusualActivity      InvoiceSectionStateReasonCode = "UnusualActivity"
)

func (*InvoiceSectionStateReasonCode) UnmarshalJSON

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

type ListByBillingProfileCompleteResult

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 ListByBillingProfileOperationOptions

type ListByBillingProfileOperationOptions struct {
	Count          *bool
	Filter         *string
	IncludeDeleted *bool
	OrderBy        *string
	Search         *string
	Skip           *int64
	Top            *int64
}

func DefaultListByBillingProfileOperationOptions

func DefaultListByBillingProfileOperationOptions() ListByBillingProfileOperationOptions

func (ListByBillingProfileOperationOptions) ToHeaders

func (ListByBillingProfileOperationOptions) ToOData

func (ListByBillingProfileOperationOptions) ToQuery

type ListByBillingProfileOperationResponse

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

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateCanceled     ProvisioningState = "Canceled"
	ProvisioningStateFailed       ProvisioningState = "Failed"
	ProvisioningStateNew          ProvisioningState = "New"
	ProvisioningStatePending      ProvisioningState = "Pending"
	ProvisioningStateProvisioning ProvisioningState = "Provisioning"
	ProvisioningStateSucceeded    ProvisioningState = "Succeeded"
)

func (*ProvisioningState) UnmarshalJSON

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

type TargetCloud

type TargetCloud string
const (
	TargetCloudInternal TargetCloud = "Internal"
	TargetCloudOther    TargetCloud = "Other"
	TargetCloudUSGov    TargetCloud = "USGov"
	TargetCloudUSNat    TargetCloud = "USNat"
	TargetCloudUSSec    TargetCloud = "USSec"
)

func (*TargetCloud) UnmarshalJSON

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

type ValidateDeleteEligibilityOperationResponse

type ValidateDeleteEligibilityOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *DeleteInvoiceSectionEligibilityResult
}

Jump to

Keyboard shortcuts

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