deployments

package
v0.20240326.1130143 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-10-01-preview/deployments Documentation

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

Client Initialization

client := deployments.NewDeploymentsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: DeploymentsClient.CreateOrUpdate

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

payload := deployments.Deployment{
	// ...
}


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

Example Usage: DeploymentsClient.Delete

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

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

Example Usage: DeploymentsClient.Get

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

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: DeploymentsClient.List

ctx := context.TODO()
id := deployments.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: DeploymentsClient.ListSkus

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

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

Example Usage: DeploymentsClient.Update

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

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


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 PossibleValuesForDeploymentModelVersionUpgradeOption

func PossibleValuesForDeploymentModelVersionUpgradeOption() []string

func PossibleValuesForDeploymentProvisioningState

func PossibleValuesForDeploymentProvisioningState() []string

func PossibleValuesForDeploymentScaleType

func PossibleValuesForDeploymentScaleType() []string

func PossibleValuesForSkuTier

func PossibleValuesForSkuTier() []string

func ValidateAccountID

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

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

func ValidateDeploymentID

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

ValidateDeploymentID checks that 'input' can be parsed as a Deployment ID

Types

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 CallRateLimit

type CallRateLimit struct {
	Count         *float64          `json:"count,omitempty"`
	RenewalPeriod *float64          `json:"renewalPeriod,omitempty"`
	Rules         *[]ThrottlingRule `json:"rules,omitempty"`
}

type CapacityConfig

type CapacityConfig struct {
	AllowedValues *[]int64 `json:"allowedValues,omitempty"`
	Default       *int64   `json:"default,omitempty"`
	Maximum       *int64   `json:"maximum,omitempty"`
	Minimum       *int64   `json:"minimum,omitempty"`
	Step          *int64   `json:"step,omitempty"`
}

type CreateOrUpdateOperationResponse

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

type DeleteOperationResponse

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

type Deployment

type Deployment struct {
	Etag       *string                `json:"etag,omitempty"`
	Id         *string                `json:"id,omitempty"`
	Name       *string                `json:"name,omitempty"`
	Properties *DeploymentProperties  `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 DeploymentCapacitySettings

type DeploymentCapacitySettings struct {
	DesignatedCapacity *int64 `json:"designatedCapacity,omitempty"`
	Priority           *int64 `json:"priority,omitempty"`
}

type DeploymentId

type DeploymentId struct {
	SubscriptionId    string
	ResourceGroupName string
	AccountName       string
	DeploymentName    string
}

DeploymentId is a struct representing the Resource ID for a Deployment

func NewDeploymentID

func NewDeploymentID(subscriptionId string, resourceGroupName string, accountName string, deploymentName string) DeploymentId

NewDeploymentID returns a new DeploymentId struct

func ParseDeploymentID

func ParseDeploymentID(input string) (*DeploymentId, error)

ParseDeploymentID parses 'input' into a DeploymentId

func ParseDeploymentIDInsensitively

func ParseDeploymentIDInsensitively(input string) (*DeploymentId, error)

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

func (*DeploymentId) FromParseResult

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

func (DeploymentId) ID

func (id DeploymentId) ID() string

ID returns the formatted Deployment ID

func (DeploymentId) Segments

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

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

func (DeploymentId) String

func (id DeploymentId) String() string

String returns a human-readable description of this Deployment ID

type DeploymentModel

type DeploymentModel struct {
	CallRateLimit *CallRateLimit `json:"callRateLimit,omitempty"`
	Format        *string        `json:"format,omitempty"`
	Name          *string        `json:"name,omitempty"`
	Source        *string        `json:"source,omitempty"`
	Version       *string        `json:"version,omitempty"`
}

type DeploymentModelVersionUpgradeOption

type DeploymentModelVersionUpgradeOption string
const (
	DeploymentModelVersionUpgradeOptionNoAutoUpgrade                  DeploymentModelVersionUpgradeOption = "NoAutoUpgrade"
	DeploymentModelVersionUpgradeOptionOnceCurrentVersionExpired      DeploymentModelVersionUpgradeOption = "OnceCurrentVersionExpired"
	DeploymentModelVersionUpgradeOptionOnceNewDefaultVersionAvailable DeploymentModelVersionUpgradeOption = "OnceNewDefaultVersionAvailable"
)

func (*DeploymentModelVersionUpgradeOption) UnmarshalJSON

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

type DeploymentOperationPredicate

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

func (DeploymentOperationPredicate) Matches

func (p DeploymentOperationPredicate) Matches(input Deployment) bool

type DeploymentProperties

type DeploymentProperties struct {
	CallRateLimit            *CallRateLimit                       `json:"callRateLimit,omitempty"`
	Capabilities             *map[string]string                   `json:"capabilities,omitempty"`
	CapacitySettings         *DeploymentCapacitySettings          `json:"capacitySettings,omitempty"`
	CurrentCapacity          *int64                               `json:"currentCapacity,omitempty"`
	DynamicThrottlingEnabled *bool                                `json:"dynamicThrottlingEnabled,omitempty"`
	Model                    *DeploymentModel                     `json:"model,omitempty"`
	ProvisioningState        *DeploymentProvisioningState         `json:"provisioningState,omitempty"`
	RaiPolicyName            *string                              `json:"raiPolicyName,omitempty"`
	RateLimits               *[]ThrottlingRule                    `json:"rateLimits,omitempty"`
	ScaleSettings            *DeploymentScaleSettings             `json:"scaleSettings,omitempty"`
	VersionUpgradeOption     *DeploymentModelVersionUpgradeOption `json:"versionUpgradeOption,omitempty"`
}

type DeploymentProvisioningState

type DeploymentProvisioningState string
const (
	DeploymentProvisioningStateAccepted  DeploymentProvisioningState = "Accepted"
	DeploymentProvisioningStateCanceled  DeploymentProvisioningState = "Canceled"
	DeploymentProvisioningStateCreating  DeploymentProvisioningState = "Creating"
	DeploymentProvisioningStateDeleting  DeploymentProvisioningState = "Deleting"
	DeploymentProvisioningStateDisabled  DeploymentProvisioningState = "Disabled"
	DeploymentProvisioningStateFailed    DeploymentProvisioningState = "Failed"
	DeploymentProvisioningStateMoving    DeploymentProvisioningState = "Moving"
	DeploymentProvisioningStateSucceeded DeploymentProvisioningState = "Succeeded"
)

func (*DeploymentProvisioningState) UnmarshalJSON

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

type DeploymentScaleSettings

type DeploymentScaleSettings struct {
	ActiveCapacity *int64               `json:"activeCapacity,omitempty"`
	Capacity       *int64               `json:"capacity,omitempty"`
	ScaleType      *DeploymentScaleType `json:"scaleType,omitempty"`
}

type DeploymentScaleType

type DeploymentScaleType string
const (
	DeploymentScaleTypeManual   DeploymentScaleType = "Manual"
	DeploymentScaleTypeStandard DeploymentScaleType = "Standard"
)

func (*DeploymentScaleType) UnmarshalJSON

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

type DeploymentsClient

type DeploymentsClient struct {
	Client *resourcemanager.Client
}

func NewDeploymentsClientWithBaseURI

func NewDeploymentsClientWithBaseURI(sdkApi sdkEnv.Api) (*DeploymentsClient, error)

func (DeploymentsClient) CreateOrUpdate

func (c DeploymentsClient) CreateOrUpdate(ctx context.Context, id DeploymentId, input Deployment) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (DeploymentsClient) CreateOrUpdateThenPoll

func (c DeploymentsClient) CreateOrUpdateThenPoll(ctx context.Context, id DeploymentId, input Deployment) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (DeploymentsClient) Delete

Delete ...

func (DeploymentsClient) DeleteThenPoll

func (c DeploymentsClient) DeleteThenPoll(ctx context.Context, id DeploymentId) error

DeleteThenPoll performs Delete then polls until it's completed

func (DeploymentsClient) Get

Get ...

func (DeploymentsClient) List

func (c DeploymentsClient) List(ctx context.Context, id AccountId) (result ListOperationResponse, err error)

List ...

func (DeploymentsClient) ListComplete

ListComplete retrieves all the results into a single object

func (DeploymentsClient) ListCompleteMatchingPredicate

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

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (DeploymentsClient) ListSkus

ListSkus ...

func (DeploymentsClient) ListSkusComplete

ListSkusComplete retrieves all the results into a single object

func (DeploymentsClient) ListSkusCompleteMatchingPredicate

func (c DeploymentsClient) ListSkusCompleteMatchingPredicate(ctx context.Context, id DeploymentId, predicate SkuResourceOperationPredicate) (result ListSkusCompleteResult, err error)

ListSkusCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (DeploymentsClient) Update

Update ...

func (DeploymentsClient) UpdateThenPoll

UpdateThenPoll performs Update then polls until it's completed

type GetOperationResponse

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

type ListCompleteResult

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

type ListOperationResponse

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

type ListSkusCompleteResult

type ListSkusCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []SkuResource
}

type ListSkusOperationResponse

type ListSkusOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]SkuResource
}

type PatchResourceTagsAndSku

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

type RequestMatchPattern

type RequestMatchPattern struct {
	Method *string `json:"method,omitempty"`
	Path   *string `json:"path,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 SkuResource

type SkuResource struct {
	Capacity     *CapacityConfig `json:"capacity,omitempty"`
	ResourceType *string         `json:"resourceType,omitempty"`
	Sku          *Sku            `json:"sku,omitempty"`
}

type SkuResourceOperationPredicate

type SkuResourceOperationPredicate struct {
	ResourceType *string
}

func (SkuResourceOperationPredicate) Matches

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

type ThrottlingRule

type ThrottlingRule struct {
	Count                    *float64               `json:"count,omitempty"`
	DynamicThrottlingEnabled *bool                  `json:"dynamicThrottlingEnabled,omitempty"`
	Key                      *string                `json:"key,omitempty"`
	MatchPatterns            *[]RequestMatchPattern `json:"matchPatterns,omitempty"`
	MinCount                 *float64               `json:"minCount,omitempty"`
	RenewalPeriod            *float64               `json:"renewalPeriod,omitempty"`
}

type UpdateOperationResponse

type UpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Deployment
}

Jump to

Keyboard shortcuts

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