cognitiveservicescommitmentplans

package
v0.20240325.1113504 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: MPL-2.0 Imports: 13 Imported by: 1

README

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

The cognitiveservicescommitmentplans 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-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicescommitmentplans"

Client Initialization

client := cognitiveservicescommitmentplans.NewCognitiveServicesCommitmentPlansClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: CognitiveServicesCommitmentPlansClient.CommitmentPlansCreateOrUpdatePlan

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

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


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

Example Usage: CognitiveServicesCommitmentPlansClient.CommitmentPlansDeletePlan

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

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

Example Usage: CognitiveServicesCommitmentPlansClient.CommitmentPlansGetPlan

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

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

Example Usage: CognitiveServicesCommitmentPlansClient.CommitmentPlansListPlansByResourceGroup

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

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

Example Usage: CognitiveServicesCommitmentPlansClient.CommitmentPlansListPlansBySubscription

ctx := context.TODO()
id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

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

Example Usage: CognitiveServicesCommitmentPlansClient.CommitmentPlansUpdatePlan

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

payload := cognitiveservicescommitmentplans.PatchResourceTagsAndSku{
	// ...
}


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

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 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 CognitiveServicesCommitmentPlansClient

type CognitiveServicesCommitmentPlansClient struct {
	Client *resourcemanager.Client
}

func NewCognitiveServicesCommitmentPlansClientWithBaseURI

func NewCognitiveServicesCommitmentPlansClientWithBaseURI(sdkApi sdkEnv.Api) (*CognitiveServicesCommitmentPlansClient, error)

func (CognitiveServicesCommitmentPlansClient) CommitmentPlansCreateOrUpdatePlan

CommitmentPlansCreateOrUpdatePlan ...

func (CognitiveServicesCommitmentPlansClient) CommitmentPlansCreateOrUpdatePlanThenPoll

func (c CognitiveServicesCommitmentPlansClient) CommitmentPlansCreateOrUpdatePlanThenPoll(ctx context.Context, id CommitmentPlanId, input CommitmentPlan) error

CommitmentPlansCreateOrUpdatePlanThenPoll performs CommitmentPlansCreateOrUpdatePlan then polls until it's completed

func (CognitiveServicesCommitmentPlansClient) CommitmentPlansDeletePlan

CommitmentPlansDeletePlan ...

func (CognitiveServicesCommitmentPlansClient) CommitmentPlansDeletePlanThenPoll

func (c CognitiveServicesCommitmentPlansClient) CommitmentPlansDeletePlanThenPoll(ctx context.Context, id CommitmentPlanId) error

CommitmentPlansDeletePlanThenPoll performs CommitmentPlansDeletePlan then polls until it's completed

func (CognitiveServicesCommitmentPlansClient) CommitmentPlansGetPlan

CommitmentPlansGetPlan ...

func (CognitiveServicesCommitmentPlansClient) CommitmentPlansListPlansByResourceGroup

CommitmentPlansListPlansByResourceGroup ...

func (CognitiveServicesCommitmentPlansClient) CommitmentPlansListPlansByResourceGroupComplete

CommitmentPlansListPlansByResourceGroupComplete retrieves all the results into a single object

func (CognitiveServicesCommitmentPlansClient) CommitmentPlansListPlansByResourceGroupCompleteMatchingPredicate

func (c CognitiveServicesCommitmentPlansClient) CommitmentPlansListPlansByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate CommitmentPlanOperationPredicate) (result CommitmentPlansListPlansByResourceGroupCompleteResult, err error)

CommitmentPlansListPlansByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (CognitiveServicesCommitmentPlansClient) CommitmentPlansListPlansBySubscription

CommitmentPlansListPlansBySubscription ...

func (CognitiveServicesCommitmentPlansClient) CommitmentPlansListPlansBySubscriptionComplete

CommitmentPlansListPlansBySubscriptionComplete retrieves all the results into a single object

func (CognitiveServicesCommitmentPlansClient) CommitmentPlansListPlansBySubscriptionCompleteMatchingPredicate

func (c CognitiveServicesCommitmentPlansClient) CommitmentPlansListPlansBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate CommitmentPlanOperationPredicate) (result CommitmentPlansListPlansBySubscriptionCompleteResult, err error)

CommitmentPlansListPlansBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (CognitiveServicesCommitmentPlansClient) CommitmentPlansUpdatePlan

CommitmentPlansUpdatePlan ...

func (CognitiveServicesCommitmentPlansClient) CommitmentPlansUpdatePlanThenPoll

func (c CognitiveServicesCommitmentPlansClient) CommitmentPlansUpdatePlanThenPoll(ctx context.Context, id CommitmentPlanId, input PatchResourceTagsAndSku) error

CommitmentPlansUpdatePlanThenPoll performs CommitmentPlansUpdatePlan then polls until it's completed

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 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 CommitmentPlansCreateOrUpdatePlanOperationResponse

type CommitmentPlansCreateOrUpdatePlanOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *CommitmentPlan
}

type CommitmentPlansDeletePlanOperationResponse

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

type CommitmentPlansGetPlanOperationResponse

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

type CommitmentPlansListPlansByResourceGroupCompleteResult

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

type CommitmentPlansListPlansByResourceGroupOperationResponse

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

type CommitmentPlansListPlansBySubscriptionCompleteResult

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

type CommitmentPlansListPlansBySubscriptionOperationResponse

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

type CommitmentPlansUpdatePlanOperationResponse

type CommitmentPlansUpdatePlanOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *CommitmentPlan
}

type CommitmentQuota

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

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 PatchResourceTagsAndSku

type PatchResourceTagsAndSku struct {
	Sku  *Sku               `json:"sku,omitempty"`
	Tags *map[string]string `json:"tags,omitempty"`
}

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