deployments

package
v0.20230331.1143618 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2023 License: MPL-2.0 Imports: 10 Imported by: 0

README

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

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

func PossibleValuesForDeploymentProvisioningState() []string

func PossibleValuesForDeploymentScaleType

func PossibleValuesForDeploymentScaleType() []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       polling.LongRunningPoller
	HttpResponse *http.Response
}

type DeleteOperationResponse

type DeleteOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

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"`
	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"`
	Version       *string        `json:"version,omitempty"`
}

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"`
	ScaleSettings     *DeploymentScaleSettings     `json:"scaleSettings,omitempty"`
}

type DeploymentProvisioningState

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

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

type DeploymentsClient

type DeploymentsClient struct {
	Client autorest.Client
	// contains filtered or unexported fields
}

func NewDeploymentsClientWithBaseURI

func NewDeploymentsClientWithBaseURI(endpoint string) DeploymentsClient

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

List ...

func (DeploymentsClient) ListComplete

ListComplete retrieves all of the results into a single object

func (DeploymentsClient) ListCompleteMatchingPredicate

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

ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate

type GetOperationResponse

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

type ListCompleteResult

type ListCompleteResult struct {
	Items []Deployment
}

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]Deployment
	// contains filtered or unexported fields
}

func (ListOperationResponse) HasMore

func (r ListOperationResponse) HasMore() bool

func (ListOperationResponse) LoadMore

func (r ListOperationResponse) LoadMore(ctx context.Context) (resp ListOperationResponse, err error)

type RequestMatchPattern

type RequestMatchPattern struct {
	Method *string `json:"method,omitempty"`
	Path   *string `json:"path,omitempty"`
}

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