commitmentplans

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: 12 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/commitmentplans Documentation

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

Client Initialization

client := commitmentplans.NewCommitmentPlansClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: CommitmentPlansClient.CreateOrUpdate

ctx := context.TODO()
id := commitmentplans.NewAccountCommitmentPlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue", "commitmentPlanValue")

payload := commitmentplans.CommitmentPlan{
	// ...
}


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

Example Usage: CommitmentPlansClient.CreateOrUpdateAssociation

ctx := context.TODO()
id := commitmentplans.NewAccountAssociationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "commitmentPlanValue", "accountAssociationValue")

payload := commitmentplans.CommitmentPlanAccountAssociation{
	// ...
}


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

Example Usage: CommitmentPlansClient.Delete

ctx := context.TODO()
id := commitmentplans.NewAccountCommitmentPlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue", "commitmentPlanValue")

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

Example Usage: CommitmentPlansClient.DeleteAssociation

ctx := context.TODO()
id := commitmentplans.NewAccountAssociationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "commitmentPlanValue", "accountAssociationValue")

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

Example Usage: CommitmentPlansClient.Get

ctx := context.TODO()
id := commitmentplans.NewAccountCommitmentPlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue", "commitmentPlanValue")

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: CommitmentPlansClient.GetAssociation

ctx := context.TODO()
id := commitmentplans.NewAccountAssociationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "commitmentPlanValue", "accountAssociationValue")

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

Example Usage: CommitmentPlansClient.List

ctx := context.TODO()
id := commitmentplans.NewAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue")

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

Example Usage: CommitmentPlansClient.ListAssociations

ctx := context.TODO()
id := commitmentplans.NewCommitmentPlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "commitmentPlanValue")

// alternatively `client.ListAssociations(ctx, id)` can be used to do batched pagination
items, err := client.ListAssociationsComplete(ctx, id)
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 PossibleValuesForCommitmentPlanProvisioningState

func PossibleValuesForCommitmentPlanProvisioningState() []string

func PossibleValuesForHostingModel

func PossibleValuesForHostingModel() []string

func PossibleValuesForSkuTier

func PossibleValuesForSkuTier() []string

func ValidateAccountAssociationID

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

ValidateAccountAssociationID checks that 'input' can be parsed as a Account Association ID

func ValidateAccountCommitmentPlanID

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

ValidateAccountCommitmentPlanID checks that 'input' can be parsed as a Account Commitment Plan ID

func ValidateAccountID

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

ValidateAccountID checks that 'input' can be parsed as a Account ID

func ValidateCommitmentPlanID

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

ValidateCommitmentPlanID checks that 'input' can be parsed as a Commitment Plan ID

Types

type AccountAssociationId

type AccountAssociationId struct {
	SubscriptionId         string
	ResourceGroupName      string
	CommitmentPlanName     string
	AccountAssociationName string
}

AccountAssociationId is a struct representing the Resource ID for a Account Association

func NewAccountAssociationID

func NewAccountAssociationID(subscriptionId string, resourceGroupName string, commitmentPlanName string, accountAssociationName string) AccountAssociationId

NewAccountAssociationID returns a new AccountAssociationId struct

func ParseAccountAssociationID

func ParseAccountAssociationID(input string) (*AccountAssociationId, error)

ParseAccountAssociationID parses 'input' into a AccountAssociationId

func ParseAccountAssociationIDInsensitively

func ParseAccountAssociationIDInsensitively(input string) (*AccountAssociationId, error)

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

func (*AccountAssociationId) FromParseResult

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

func (AccountAssociationId) ID

func (id AccountAssociationId) ID() string

ID returns the formatted Account Association ID

func (AccountAssociationId) Segments

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

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

func (AccountAssociationId) String

func (id AccountAssociationId) String() string

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

type AccountCommitmentPlanId

type AccountCommitmentPlanId struct {
	SubscriptionId     string
	ResourceGroupName  string
	AccountName        string
	CommitmentPlanName string
}

AccountCommitmentPlanId is a struct representing the Resource ID for a Account Commitment Plan

func NewAccountCommitmentPlanID

func NewAccountCommitmentPlanID(subscriptionId string, resourceGroupName string, accountName string, commitmentPlanName string) AccountCommitmentPlanId

NewAccountCommitmentPlanID returns a new AccountCommitmentPlanId struct

func ParseAccountCommitmentPlanID

func ParseAccountCommitmentPlanID(input string) (*AccountCommitmentPlanId, error)

ParseAccountCommitmentPlanID parses 'input' into a AccountCommitmentPlanId

func ParseAccountCommitmentPlanIDInsensitively

func ParseAccountCommitmentPlanIDInsensitively(input string) (*AccountCommitmentPlanId, error)

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

func (*AccountCommitmentPlanId) FromParseResult

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

func (AccountCommitmentPlanId) ID

ID returns the formatted Account Commitment Plan ID

func (AccountCommitmentPlanId) Segments

Segments returns a slice of Resource ID Segments which comprise this Account Commitment Plan ID

func (AccountCommitmentPlanId) String

func (id AccountCommitmentPlanId) String() string

String returns a human-readable description of this Account Commitment Plan ID

type AccountId

type AccountId struct {
	SubscriptionId    string
	ResourceGroupName string
	AccountName       string
}

AccountId is a struct representing the Resource ID for a Account

func NewAccountID

func NewAccountID(subscriptionId string, resourceGroupName string, accountName string) AccountId

NewAccountID returns a new AccountId struct

func ParseAccountID

func ParseAccountID(input string) (*AccountId, error)

ParseAccountID parses 'input' into a AccountId

func ParseAccountIDInsensitively

func ParseAccountIDInsensitively(input string) (*AccountId, error)

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

func (*AccountId) FromParseResult

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

func (AccountId) ID

func (id AccountId) ID() string

ID returns the formatted Account ID

func (AccountId) Segments

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

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

func (AccountId) String

func (id AccountId) String() string

String returns a human-readable description of this Account ID

type CommitmentPeriod

type CommitmentPeriod struct {
	Count     *int64           `json:"count,omitempty"`
	EndDate   *string          `json:"endDate,omitempty"`
	Quota     *CommitmentQuota `json:"quota,omitempty"`
	StartDate *string          `json:"startDate,omitempty"`
	Tier      *string          `json:"tier,omitempty"`
}

type CommitmentPlan

type CommitmentPlan struct {
	Etag       *string                   `json:"etag,omitempty"`
	Id         *string                   `json:"id,omitempty"`
	Kind       *string                   `json:"kind,omitempty"`
	Location   *string                   `json:"location,omitempty"`
	Name       *string                   `json:"name,omitempty"`
	Properties *CommitmentPlanProperties `json:"properties,omitempty"`
	Sku        *Sku                      `json:"sku,omitempty"`
	SystemData *systemdata.SystemData    `json:"systemData,omitempty"`
	Tags       *map[string]string        `json:"tags,omitempty"`
	Type       *string                   `json:"type,omitempty"`
}

type CommitmentPlanAccountAssociation

type CommitmentPlanAccountAssociation struct {
	Etag       *string                                     `json:"etag,omitempty"`
	Id         *string                                     `json:"id,omitempty"`
	Name       *string                                     `json:"name,omitempty"`
	Properties *CommitmentPlanAccountAssociationProperties `json:"properties,omitempty"`
	SystemData *systemdata.SystemData                      `json:"systemData,omitempty"`
	Type       *string                                     `json:"type,omitempty"`
}

type CommitmentPlanAccountAssociationOperationPredicate

type CommitmentPlanAccountAssociationOperationPredicate struct {
	Etag *string
	Id   *string
	Name *string
	Type *string
}

func (CommitmentPlanAccountAssociationOperationPredicate) Matches

type CommitmentPlanAccountAssociationProperties

type CommitmentPlanAccountAssociationProperties struct {
	AccountId *string `json:"accountId,omitempty"`
}

type CommitmentPlanId

type CommitmentPlanId struct {
	SubscriptionId     string
	ResourceGroupName  string
	CommitmentPlanName string
}

CommitmentPlanId is a struct representing the Resource ID for a Commitment Plan

func NewCommitmentPlanID

func NewCommitmentPlanID(subscriptionId string, resourceGroupName string, commitmentPlanName string) CommitmentPlanId

NewCommitmentPlanID returns a new CommitmentPlanId struct

func ParseCommitmentPlanID

func ParseCommitmentPlanID(input string) (*CommitmentPlanId, error)

ParseCommitmentPlanID parses 'input' into a CommitmentPlanId

func ParseCommitmentPlanIDInsensitively

func ParseCommitmentPlanIDInsensitively(input string) (*CommitmentPlanId, error)

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

func (*CommitmentPlanId) FromParseResult

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

func (CommitmentPlanId) ID

func (id CommitmentPlanId) ID() string

ID returns the formatted Commitment Plan ID

func (CommitmentPlanId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Commitment Plan ID

func (CommitmentPlanId) String

func (id CommitmentPlanId) String() string

String returns a human-readable description of this Commitment Plan ID

type CommitmentPlanOperationPredicate

type CommitmentPlanOperationPredicate struct {
	Etag     *string
	Id       *string
	Kind     *string
	Location *string
	Name     *string
	Type     *string
}

func (CommitmentPlanOperationPredicate) Matches

type CommitmentPlanProperties

type CommitmentPlanProperties struct {
	AutoRenew          *bool                            `json:"autoRenew,omitempty"`
	CommitmentPlanGuid *string                          `json:"commitmentPlanGuid,omitempty"`
	Current            *CommitmentPeriod                `json:"current,omitempty"`
	HostingModel       *HostingModel                    `json:"hostingModel,omitempty"`
	Last               *CommitmentPeriod                `json:"last,omitempty"`
	Next               *CommitmentPeriod                `json:"next,omitempty"`
	PlanType           *string                          `json:"planType,omitempty"`
	ProvisioningIssues *[]string                        `json:"provisioningIssues,omitempty"`
	ProvisioningState  *CommitmentPlanProvisioningState `json:"provisioningState,omitempty"`
}

type CommitmentPlanProvisioningState

type CommitmentPlanProvisioningState string
const (
	CommitmentPlanProvisioningStateAccepted  CommitmentPlanProvisioningState = "Accepted"
	CommitmentPlanProvisioningStateCanceled  CommitmentPlanProvisioningState = "Canceled"
	CommitmentPlanProvisioningStateCreating  CommitmentPlanProvisioningState = "Creating"
	CommitmentPlanProvisioningStateDeleting  CommitmentPlanProvisioningState = "Deleting"
	CommitmentPlanProvisioningStateFailed    CommitmentPlanProvisioningState = "Failed"
	CommitmentPlanProvisioningStateMoving    CommitmentPlanProvisioningState = "Moving"
	CommitmentPlanProvisioningStateSucceeded CommitmentPlanProvisioningState = "Succeeded"
)

func (*CommitmentPlanProvisioningState) UnmarshalJSON

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

type CommitmentPlansClient

type CommitmentPlansClient struct {
	Client *resourcemanager.Client
}

func NewCommitmentPlansClientWithBaseURI

func NewCommitmentPlansClientWithBaseURI(sdkApi sdkEnv.Api) (*CommitmentPlansClient, error)

func (CommitmentPlansClient) CreateOrUpdate

CreateOrUpdate ...

func (CommitmentPlansClient) CreateOrUpdateAssociation

CreateOrUpdateAssociation ...

func (CommitmentPlansClient) CreateOrUpdateAssociationThenPoll

func (c CommitmentPlansClient) CreateOrUpdateAssociationThenPoll(ctx context.Context, id AccountAssociationId, input CommitmentPlanAccountAssociation) error

CreateOrUpdateAssociationThenPoll performs CreateOrUpdateAssociation then polls until it's completed

func (CommitmentPlansClient) Delete

Delete ...

func (CommitmentPlansClient) DeleteAssociation

DeleteAssociation ...

func (CommitmentPlansClient) DeleteAssociationThenPoll

func (c CommitmentPlansClient) DeleteAssociationThenPoll(ctx context.Context, id AccountAssociationId) error

DeleteAssociationThenPoll performs DeleteAssociation then polls until it's completed

func (CommitmentPlansClient) DeleteThenPoll

DeleteThenPoll performs Delete then polls until it's completed

func (CommitmentPlansClient) Get

Get ...

func (CommitmentPlansClient) GetAssociation

GetAssociation ...

func (CommitmentPlansClient) List

List ...

func (CommitmentPlansClient) ListAssociations

ListAssociations ...

func (CommitmentPlansClient) ListAssociationsComplete

ListAssociationsComplete retrieves all the results into a single object

func (CommitmentPlansClient) ListAssociationsCompleteMatchingPredicate

func (c CommitmentPlansClient) ListAssociationsCompleteMatchingPredicate(ctx context.Context, id CommitmentPlanId, predicate CommitmentPlanAccountAssociationOperationPredicate) (result ListAssociationsCompleteResult, err error)

ListAssociationsCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (CommitmentPlansClient) ListComplete

ListComplete retrieves all the results into a single object

func (CommitmentPlansClient) ListCompleteMatchingPredicate

func (c CommitmentPlansClient) ListCompleteMatchingPredicate(ctx context.Context, id AccountId, predicate CommitmentPlanOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

type CommitmentQuota

type CommitmentQuota struct {
	Quantity *int64  `json:"quantity,omitempty"`
	Unit     *string `json:"unit,omitempty"`
}

type CreateOrUpdateAssociationOperationResponse

type CreateOrUpdateAssociationOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *CommitmentPlanAccountAssociation
}

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *CommitmentPlan
}

type DeleteAssociationOperationResponse

type DeleteAssociationOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type DeleteOperationResponse

type DeleteOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type GetAssociationOperationResponse

type GetAssociationOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *CommitmentPlanAccountAssociation
}

type GetOperationResponse

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

type HostingModel

type HostingModel string
const (
	HostingModelConnectedContainer    HostingModel = "ConnectedContainer"
	HostingModelDisconnectedContainer HostingModel = "DisconnectedContainer"
	HostingModelProvisionedWeb        HostingModel = "ProvisionedWeb"
	HostingModelWeb                   HostingModel = "Web"
)

func (*HostingModel) UnmarshalJSON

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

type ListAssociationsCompleteResult

type ListAssociationsCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []CommitmentPlanAccountAssociation
}

type ListAssociationsOperationResponse

type ListAssociationsOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]CommitmentPlanAccountAssociation
}

type ListCompleteResult

type ListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []CommitmentPlan
}

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]CommitmentPlan
}

type Sku

type Sku struct {
	Capacity *int64   `json:"capacity,omitempty"`
	Family   *string  `json:"family,omitempty"`
	Name     string   `json:"name"`
	Size     *string  `json:"size,omitempty"`
	Tier     *SkuTier `json:"tier,omitempty"`
}

type SkuTier

type SkuTier string
const (
	SkuTierBasic      SkuTier = "Basic"
	SkuTierEnterprise SkuTier = "Enterprise"
	SkuTierFree       SkuTier = "Free"
	SkuTierPremium    SkuTier = "Premium"
	SkuTierStandard   SkuTier = "Standard"
)

func (*SkuTier) UnmarshalJSON

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

Jump to

Keyboard shortcuts

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