deployments

package
v0.20231113.1151754 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2023 License: MPL-2.0 Imports: 12 Imported by: 1

README

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

The deployments 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/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
}

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) 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 CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse 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 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"`
	Type       *string                `json:"type,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) 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"`
	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

type GetOperationResponse

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

type ListCompleteResult

type ListCompleteResult struct {
	Items []Deployment
}

type ListOperationResponse

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

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 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"`
}

Jump to

Keyboard shortcuts

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