associatedtenant

package
v0.20241023.1122425 Latest Latest
Warning

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

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

README

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

The associatedtenant SDK allows for interaction with Azure Resource Manager 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/associatedtenant"

Client Initialization

client := associatedtenant.NewAssociatedTenantClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: AssociatedTenantClient.CreateOrUpdate

ctx := context.TODO()
id := associatedtenant.NewAssociatedTenantID("billingAccountName", "associatedTenantName")

payload := associatedtenant.AssociatedTenant{
	// ...
}


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

Example Usage: AssociatedTenantClient.Delete

ctx := context.TODO()
id := associatedtenant.NewAssociatedTenantID("billingAccountName", "associatedTenantName")

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

Example Usage: AssociatedTenantClient.Get

ctx := context.TODO()
id := associatedtenant.NewAssociatedTenantID("billingAccountName", "associatedTenantName")

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: AssociatedTenantClient.ListByBillingAccount

ctx := context.TODO()
id := associatedtenant.NewBillingAccountID("billingAccountName")

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForBillingManagementTenantState

func PossibleValuesForBillingManagementTenantState() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func PossibleValuesForProvisioningTenantState

func PossibleValuesForProvisioningTenantState() []string

func ValidateAssociatedTenantID

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

ValidateAssociatedTenantID checks that 'input' can be parsed as a Associated Tenant ID

func ValidateBillingAccountID

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

ValidateBillingAccountID checks that 'input' can be parsed as a Billing Account ID

Types

type AssociatedTenant

type AssociatedTenant struct {
	Id         *string                     `json:"id,omitempty"`
	Name       *string                     `json:"name,omitempty"`
	Properties *AssociatedTenantProperties `json:"properties,omitempty"`
	SystemData *systemdata.SystemData      `json:"systemData,omitempty"`
	Tags       *map[string]string          `json:"tags,omitempty"`
	Type       *string                     `json:"type,omitempty"`
}

type AssociatedTenantClient

type AssociatedTenantClient struct {
	Client *resourcemanager.Client
}

func NewAssociatedTenantClientWithBaseURI

func NewAssociatedTenantClientWithBaseURI(sdkApi sdkEnv.Api) (*AssociatedTenantClient, error)

func (AssociatedTenantClient) CreateOrUpdate

CreateOrUpdate ...

func (AssociatedTenantClient) CreateOrUpdateThenPoll

func (c AssociatedTenantClient) CreateOrUpdateThenPoll(ctx context.Context, id AssociatedTenantId, input AssociatedTenant) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (AssociatedTenantClient) Delete

Delete ...

func (AssociatedTenantClient) DeleteThenPoll

DeleteThenPoll performs Delete then polls until it's completed

func (AssociatedTenantClient) Get

Get ...

func (AssociatedTenantClient) ListByBillingAccount

ListByBillingAccount ...

func (AssociatedTenantClient) ListByBillingAccountComplete

ListByBillingAccountComplete retrieves all the results into a single object

func (AssociatedTenantClient) ListByBillingAccountCompleteMatchingPredicate

ListByBillingAccountCompleteMatchingPredicate retrieves all the results and then applies the predicate

type AssociatedTenantId

type AssociatedTenantId struct {
	BillingAccountName   string
	AssociatedTenantName string
}

AssociatedTenantId is a struct representing the Resource ID for a Associated Tenant

func NewAssociatedTenantID

func NewAssociatedTenantID(billingAccountName string, associatedTenantName string) AssociatedTenantId

NewAssociatedTenantID returns a new AssociatedTenantId struct

func ParseAssociatedTenantID

func ParseAssociatedTenantID(input string) (*AssociatedTenantId, error)

ParseAssociatedTenantID parses 'input' into a AssociatedTenantId

func ParseAssociatedTenantIDInsensitively

func ParseAssociatedTenantIDInsensitively(input string) (*AssociatedTenantId, error)

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

func (*AssociatedTenantId) FromParseResult

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

func (AssociatedTenantId) ID

func (id AssociatedTenantId) ID() string

ID returns the formatted Associated Tenant ID

func (AssociatedTenantId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Associated Tenant ID

func (AssociatedTenantId) String

func (id AssociatedTenantId) String() string

String returns a human-readable description of this Associated Tenant ID

type AssociatedTenantOperationPredicate

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

func (AssociatedTenantOperationPredicate) Matches

type AssociatedTenantProperties

type AssociatedTenantProperties struct {
	BillingManagementState       *BillingManagementTenantState `json:"billingManagementState,omitempty"`
	DisplayName                  *string                       `json:"displayName,omitempty"`
	ProvisioningBillingRequestId *string                       `json:"provisioningBillingRequestId,omitempty"`
	ProvisioningManagementState  *ProvisioningTenantState      `json:"provisioningManagementState,omitempty"`
	ProvisioningState            *ProvisioningState            `json:"provisioningState,omitempty"`
	TenantId                     *string                       `json:"tenantId,omitempty"`
}

type BillingAccountId

type BillingAccountId struct {
	BillingAccountName string
}

BillingAccountId is a struct representing the Resource ID for a Billing Account

func NewBillingAccountID

func NewBillingAccountID(billingAccountName string) BillingAccountId

NewBillingAccountID returns a new BillingAccountId struct

func ParseBillingAccountID

func ParseBillingAccountID(input string) (*BillingAccountId, error)

ParseBillingAccountID parses 'input' into a BillingAccountId

func ParseBillingAccountIDInsensitively

func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error)

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

func (*BillingAccountId) FromParseResult

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

func (BillingAccountId) ID

func (id BillingAccountId) ID() string

ID returns the formatted Billing Account ID

func (BillingAccountId) Segments

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

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

func (BillingAccountId) String

func (id BillingAccountId) String() string

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

type BillingManagementTenantState

type BillingManagementTenantState string
const (
	BillingManagementTenantStateActive     BillingManagementTenantState = "Active"
	BillingManagementTenantStateNotAllowed BillingManagementTenantState = "NotAllowed"
	BillingManagementTenantStateOther      BillingManagementTenantState = "Other"
	BillingManagementTenantStateRevoked    BillingManagementTenantState = "Revoked"
)

func (*BillingManagementTenantState) UnmarshalJSON

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

type CreateOrUpdateOperationResponse

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

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

type ListByBillingAccountCompleteResult

type ListByBillingAccountCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []AssociatedTenant
}

type ListByBillingAccountCustomPager added in v0.20240628.1153531

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

type ListByBillingAccountOperationOptions

type ListByBillingAccountOperationOptions struct {
	Count          *bool
	Filter         *string
	IncludeRevoked *bool
	OrderBy        *string
	Search         *string
	Skip           *int64
	Top            *int64
}

func DefaultListByBillingAccountOperationOptions

func DefaultListByBillingAccountOperationOptions() ListByBillingAccountOperationOptions

func (ListByBillingAccountOperationOptions) ToHeaders

func (ListByBillingAccountOperationOptions) ToOData

func (ListByBillingAccountOperationOptions) ToQuery

type ListByBillingAccountOperationResponse

type ListByBillingAccountOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]AssociatedTenant
}

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 ProvisioningTenantState

type ProvisioningTenantState string
const (
	ProvisioningTenantStateActive                 ProvisioningTenantState = "Active"
	ProvisioningTenantStateBillingRequestDeclined ProvisioningTenantState = "BillingRequestDeclined"
	ProvisioningTenantStateBillingRequestExpired  ProvisioningTenantState = "BillingRequestExpired"
	ProvisioningTenantStateNotRequested           ProvisioningTenantState = "NotRequested"
	ProvisioningTenantStateOther                  ProvisioningTenantState = "Other"
	ProvisioningTenantStatePending                ProvisioningTenantState = "Pending"
	ProvisioningTenantStateRevoked                ProvisioningTenantState = "Revoked"
)

func (*ProvisioningTenantState) UnmarshalJSON

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

Jump to

Keyboard shortcuts

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