batchdeployment

package
v0.20231002.1065327 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2023 License: MPL-2.0 Imports: 13 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-04-01/batchdeployment Documentation

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

Client Initialization

client := batchdeployment.NewBatchDeploymentClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: BatchDeploymentClient.CreateOrUpdate

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

payload := batchdeployment.BatchDeploymentTrackedResource{
	// ...
}


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

Example Usage: BatchDeploymentClient.Delete

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

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

Example Usage: BatchDeploymentClient.Get

ctx := context.TODO()
id := batchdeployment.NewDeploymentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "batchEndpointValue", "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: BatchDeploymentClient.List

ctx := context.TODO()
id := batchdeployment.NewBatchEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "batchEndpointValue")

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

Example Usage: BatchDeploymentClient.Update

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

payload := batchdeployment.PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties{
	// ...
}


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 PossibleValuesForBatchLoggingLevel

func PossibleValuesForBatchLoggingLevel() []string

func PossibleValuesForBatchOutputAction

func PossibleValuesForBatchOutputAction() []string

func PossibleValuesForDeploymentProvisioningState

func PossibleValuesForDeploymentProvisioningState() []string

func PossibleValuesForReferenceType

func PossibleValuesForReferenceType() []string

func PossibleValuesForSkuTier

func PossibleValuesForSkuTier() []string

func ValidateBatchEndpointID

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

ValidateBatchEndpointID checks that 'input' can be parsed as a Batch Endpoint 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 AssetReferenceBase

type AssetReferenceBase interface {
}

type BatchDeployment

type BatchDeployment struct {
	CodeConfiguration         *CodeConfiguration           `json:"codeConfiguration,omitempty"`
	Compute                   *string                      `json:"compute,omitempty"`
	Description               *string                      `json:"description,omitempty"`
	EnvironmentId             *string                      `json:"environmentId,omitempty"`
	EnvironmentVariables      *map[string]string           `json:"environmentVariables,omitempty"`
	ErrorThreshold            *int64                       `json:"errorThreshold,omitempty"`
	LoggingLevel              *BatchLoggingLevel           `json:"loggingLevel,omitempty"`
	MaxConcurrencyPerInstance *int64                       `json:"maxConcurrencyPerInstance,omitempty"`
	MiniBatchSize             *int64                       `json:"miniBatchSize,omitempty"`
	Model                     AssetReferenceBase           `json:"model"`
	OutputAction              *BatchOutputAction           `json:"outputAction,omitempty"`
	OutputFileName            *string                      `json:"outputFileName,omitempty"`
	Properties                *map[string]string           `json:"properties,omitempty"`
	ProvisioningState         *DeploymentProvisioningState `json:"provisioningState,omitempty"`
	Resources                 *ResourceConfiguration       `json:"resources,omitempty"`
	RetrySettings             *BatchRetrySettings          `json:"retrySettings,omitempty"`
}

func (*BatchDeployment) UnmarshalJSON

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

type BatchDeploymentClient

type BatchDeploymentClient struct {
	Client *resourcemanager.Client
}

func NewBatchDeploymentClientWithBaseURI

func NewBatchDeploymentClientWithBaseURI(sdkApi sdkEnv.Api) (*BatchDeploymentClient, error)

func (BatchDeploymentClient) CreateOrUpdate

CreateOrUpdate ...

func (BatchDeploymentClient) CreateOrUpdateThenPoll

func (c BatchDeploymentClient) CreateOrUpdateThenPoll(ctx context.Context, id DeploymentId, input BatchDeploymentTrackedResource) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (BatchDeploymentClient) Delete

Delete ...

func (BatchDeploymentClient) DeleteThenPoll

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

DeleteThenPoll performs Delete then polls until it's completed

func (BatchDeploymentClient) Get

Get ...

func (BatchDeploymentClient) List

List ...

func (BatchDeploymentClient) ListComplete

ListComplete retrieves all the results into a single object

func (BatchDeploymentClient) ListCompleteMatchingPredicate

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (BatchDeploymentClient) UpdateThenPoll

UpdateThenPoll performs Update then polls until it's completed

type BatchDeploymentTrackedResource

type BatchDeploymentTrackedResource struct {
	Id         *string                                  `json:"id,omitempty"`
	Identity   *identity.LegacySystemAndUserAssignedMap `json:"identity,omitempty"`
	Kind       *string                                  `json:"kind,omitempty"`
	Location   string                                   `json:"location"`
	Name       *string                                  `json:"name,omitempty"`
	Properties BatchDeployment                          `json:"properties"`
	Sku        *Sku                                     `json:"sku,omitempty"`
	SystemData *systemdata.SystemData                   `json:"systemData,omitempty"`
	Tags       *map[string]string                       `json:"tags,omitempty"`
	Type       *string                                  `json:"type,omitempty"`
}

type BatchDeploymentTrackedResourceOperationPredicate

type BatchDeploymentTrackedResourceOperationPredicate struct {
	Id       *string
	Kind     *string
	Location *string
	Name     *string
	Type     *string
}

func (BatchDeploymentTrackedResourceOperationPredicate) Matches

type BatchEndpointId

type BatchEndpointId struct {
	SubscriptionId    string
	ResourceGroupName string
	WorkspaceName     string
	BatchEndpointName string
}

BatchEndpointId is a struct representing the Resource ID for a Batch Endpoint

func NewBatchEndpointID

func NewBatchEndpointID(subscriptionId string, resourceGroupName string, workspaceName string, batchEndpointName string) BatchEndpointId

NewBatchEndpointID returns a new BatchEndpointId struct

func ParseBatchEndpointID

func ParseBatchEndpointID(input string) (*BatchEndpointId, error)

ParseBatchEndpointID parses 'input' into a BatchEndpointId

func ParseBatchEndpointIDInsensitively

func ParseBatchEndpointIDInsensitively(input string) (*BatchEndpointId, error)

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

func (BatchEndpointId) ID

func (id BatchEndpointId) ID() string

ID returns the formatted Batch Endpoint ID

func (BatchEndpointId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Batch Endpoint ID

func (BatchEndpointId) String

func (id BatchEndpointId) String() string

String returns a human-readable description of this Batch Endpoint ID

type BatchLoggingLevel

type BatchLoggingLevel string
const (
	BatchLoggingLevelDebug   BatchLoggingLevel = "Debug"
	BatchLoggingLevelInfo    BatchLoggingLevel = "Info"
	BatchLoggingLevelWarning BatchLoggingLevel = "Warning"
)

func (*BatchLoggingLevel) UnmarshalJSON added in v0.20230713.1092427

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

type BatchOutputAction

type BatchOutputAction string
const (
	BatchOutputActionAppendRow   BatchOutputAction = "AppendRow"
	BatchOutputActionSummaryOnly BatchOutputAction = "SummaryOnly"
)

func (*BatchOutputAction) UnmarshalJSON added in v0.20230713.1092427

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

type BatchRetrySettings

type BatchRetrySettings struct {
	MaxRetries *int64  `json:"maxRetries,omitempty"`
	Timeout    *string `json:"timeout,omitempty"`
}

type CodeConfiguration

type CodeConfiguration struct {
	CodeId        *string `json:"codeId,omitempty"`
	ScoringScript string  `json:"scoringScript"`
}

type CreateOrUpdateOperationResponse

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

type DataPathAssetReference

type DataPathAssetReference struct {
	DatastoreId *string `json:"datastoreId,omitempty"`
	Path        *string `json:"path,omitempty"`
}

func (DataPathAssetReference) MarshalJSON

func (s DataPathAssetReference) MarshalJSON() ([]byte, error)

type DeleteOperationResponse

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

type DeploymentId

type DeploymentId struct {
	SubscriptionId    string
	ResourceGroupName string
	WorkspaceName     string
	BatchEndpointName string
	DeploymentName    string
}

DeploymentId is a struct representing the Resource ID for a Deployment

func NewDeploymentID

func NewDeploymentID(subscriptionId string, resourceGroupName string, workspaceName string, batchEndpointName 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 DeploymentProvisioningState

type DeploymentProvisioningState string
const (
	DeploymentProvisioningStateCanceled  DeploymentProvisioningState = "Canceled"
	DeploymentProvisioningStateCreating  DeploymentProvisioningState = "Creating"
	DeploymentProvisioningStateDeleting  DeploymentProvisioningState = "Deleting"
	DeploymentProvisioningStateFailed    DeploymentProvisioningState = "Failed"
	DeploymentProvisioningStateScaling   DeploymentProvisioningState = "Scaling"
	DeploymentProvisioningStateSucceeded DeploymentProvisioningState = "Succeeded"
	DeploymentProvisioningStateUpdating  DeploymentProvisioningState = "Updating"
)

func (*DeploymentProvisioningState) UnmarshalJSON added in v0.20230713.1092427

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

type GetOperationResponse

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

type IdAssetReference

type IdAssetReference struct {
	AssetId string `json:"assetId"`
}

func (IdAssetReference) MarshalJSON

func (s IdAssetReference) MarshalJSON() ([]byte, error)

type ListCompleteResult

type ListCompleteResult struct {
	Items []BatchDeploymentTrackedResource
}

type ListOperationOptions

type ListOperationOptions struct {
	OrderBy *string
	Skip    *string
	Top     *int64
}

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

func (ListOperationOptions) ToHeaders added in v0.20230713.1092427

func (o ListOperationOptions) ToHeaders() *client.Headers

func (ListOperationOptions) ToOData added in v0.20230713.1092427

func (o ListOperationOptions) ToOData() *odata.Query

func (ListOperationOptions) ToQuery added in v0.20230713.1092427

type ListOperationResponse

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

type OutputPathAssetReference

type OutputPathAssetReference struct {
	JobId *string `json:"jobId,omitempty"`
	Path  *string `json:"path,omitempty"`
}

func (OutputPathAssetReference) MarshalJSON

func (s OutputPathAssetReference) MarshalJSON() ([]byte, error)

type PartialBatchDeployment

type PartialBatchDeployment struct {
	Description *string `json:"description,omitempty"`
}

type PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties

type PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties struct {
	Properties *PartialBatchDeployment `json:"properties,omitempty"`
	Tags       *map[string]string      `json:"tags,omitempty"`
}

type RawAssetReferenceBaseImpl added in v0.20230807.1063129

type RawAssetReferenceBaseImpl struct {
	Type   string
	Values map[string]interface{}
}

RawAssetReferenceBaseImpl is returned when the Discriminated Value doesn't match any of the defined types NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) and is used only for Deserialization (e.g. this cannot be used as a Request Payload).

type ReferenceType

type ReferenceType string
const (
	ReferenceTypeDataPath   ReferenceType = "DataPath"
	ReferenceTypeId         ReferenceType = "Id"
	ReferenceTypeOutputPath ReferenceType = "OutputPath"
)

func (*ReferenceType) UnmarshalJSON added in v0.20230713.1092427

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

type ResourceConfiguration

type ResourceConfiguration struct {
	InstanceCount *int64                  `json:"instanceCount,omitempty"`
	InstanceType  *string                 `json:"instanceType,omitempty"`
	Properties    *map[string]interface{} `json:"properties,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"
	SkuTierFree     SkuTier = "Free"
	SkuTierPremium  SkuTier = "Premium"
	SkuTierStandard SkuTier = "Standard"
)

func (*SkuTier) UnmarshalJSON added in v0.20230713.1092427

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

type UpdateOperationResponse

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

Jump to

Keyboard shortcuts

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