codeversion

package
v0.20240304.1112406 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-10-01/codeversion Documentation

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

Client Initialization

client := codeversion.NewCodeVersionClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: CodeVersionClient.CreateOrGetStartPendingUpload

ctx := context.TODO()
id := codeversion.NewCodeVersionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "codeValue", "versionValue")

payload := codeversion.PendingUploadRequestDto{
	// ...
}


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

Example Usage: CodeVersionClient.CreateOrUpdate

ctx := context.TODO()
id := codeversion.NewCodeVersionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "codeValue", "versionValue")

payload := codeversion.CodeVersionResource{
	// ...
}


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

Example Usage: CodeVersionClient.Delete

ctx := context.TODO()
id := codeversion.NewCodeVersionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "codeValue", "versionValue")

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

Example Usage: CodeVersionClient.Get

ctx := context.TODO()
id := codeversion.NewCodeVersionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "codeValue", "versionValue")

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

ctx := context.TODO()
id := codeversion.NewCodeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "codeValue")

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

Example Usage: CodeVersionClient.Publish

ctx := context.TODO()
id := codeversion.NewCodeVersionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "codeValue", "versionValue")

payload := codeversion.DestinationAsset{
	// ...
}


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

Example Usage: CodeVersionClient.RegistryCodeVersionsCreateOrGetStartPendingUpload

ctx := context.TODO()
id := codeversion.NewRegistryCodeVersionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "codeValue", "versionValue")

payload := codeversion.PendingUploadRequestDto{
	// ...
}


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

Example Usage: CodeVersionClient.RegistryCodeVersionsCreateOrUpdate

ctx := context.TODO()
id := codeversion.NewRegistryCodeVersionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "codeValue", "versionValue")

payload := codeversion.CodeVersionResource{
	// ...
}


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

Example Usage: CodeVersionClient.RegistryCodeVersionsDelete

ctx := context.TODO()
id := codeversion.NewRegistryCodeVersionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "codeValue", "versionValue")

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

Example Usage: CodeVersionClient.RegistryCodeVersionsGet

ctx := context.TODO()
id := codeversion.NewRegistryCodeVersionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "codeValue", "versionValue")

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

Example Usage: CodeVersionClient.RegistryCodeVersionsList

ctx := context.TODO()
id := codeversion.NewRegistryCodeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "codeValue")

// alternatively `client.RegistryCodeVersionsList(ctx, id, codeversion.DefaultRegistryCodeVersionsListOperationOptions())` can be used to do batched pagination
items, err := client.RegistryCodeVersionsListComplete(ctx, id, codeversion.DefaultRegistryCodeVersionsListOperationOptions())
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 PossibleValuesForAssetProvisioningState

func PossibleValuesForAssetProvisioningState() []string

func PossibleValuesForPendingUploadCredentialType

func PossibleValuesForPendingUploadCredentialType() []string

func PossibleValuesForPendingUploadType

func PossibleValuesForPendingUploadType() []string

func ValidateCodeID

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

ValidateCodeID checks that 'input' can be parsed as a Code ID

func ValidateCodeVersionID

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

ValidateCodeVersionID checks that 'input' can be parsed as a Code Version ID

func ValidateRegistryCodeID

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

ValidateRegistryCodeID checks that 'input' can be parsed as a Registry Code ID

func ValidateRegistryCodeVersionID

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

ValidateRegistryCodeVersionID checks that 'input' can be parsed as a Registry Code Version ID

Types

type AssetProvisioningState

type AssetProvisioningState string
const (
	AssetProvisioningStateCanceled  AssetProvisioningState = "Canceled"
	AssetProvisioningStateCreating  AssetProvisioningState = "Creating"
	AssetProvisioningStateDeleting  AssetProvisioningState = "Deleting"
	AssetProvisioningStateFailed    AssetProvisioningState = "Failed"
	AssetProvisioningStateSucceeded AssetProvisioningState = "Succeeded"
	AssetProvisioningStateUpdating  AssetProvisioningState = "Updating"
)

func (*AssetProvisioningState) UnmarshalJSON

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

type BlobReferenceForConsumptionDto

type BlobReferenceForConsumptionDto struct {
	BlobUri             *string                    `json:"blobUri,omitempty"`
	Credential          PendingUploadCredentialDto `json:"credential"`
	StorageAccountArmId *string                    `json:"storageAccountArmId,omitempty"`
}

func (*BlobReferenceForConsumptionDto) UnmarshalJSON

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

type CodeId

type CodeId struct {
	SubscriptionId    string
	ResourceGroupName string
	WorkspaceName     string
	CodeName          string
}

CodeId is a struct representing the Resource ID for a Code

func NewCodeID

func NewCodeID(subscriptionId string, resourceGroupName string, workspaceName string, codeName string) CodeId

NewCodeID returns a new CodeId struct

func ParseCodeID

func ParseCodeID(input string) (*CodeId, error)

ParseCodeID parses 'input' into a CodeId

func ParseCodeIDInsensitively

func ParseCodeIDInsensitively(input string) (*CodeId, error)

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

func (*CodeId) FromParseResult

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

func (CodeId) ID

func (id CodeId) ID() string

ID returns the formatted Code ID

func (CodeId) Segments

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

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

func (CodeId) String

func (id CodeId) String() string

String returns a human-readable description of this Code ID

type CodeVersion

type CodeVersion struct {
	CodeUri           *string                 `json:"codeUri,omitempty"`
	Description       *string                 `json:"description,omitempty"`
	IsAnonymous       *bool                   `json:"isAnonymous,omitempty"`
	IsArchived        *bool                   `json:"isArchived,omitempty"`
	Properties        *map[string]string      `json:"properties,omitempty"`
	ProvisioningState *AssetProvisioningState `json:"provisioningState,omitempty"`
	Tags              *map[string]string      `json:"tags,omitempty"`
}

type CodeVersionClient

type CodeVersionClient struct {
	Client *resourcemanager.Client
}

func NewCodeVersionClientWithBaseURI

func NewCodeVersionClientWithBaseURI(sdkApi sdkEnv.Api) (*CodeVersionClient, error)

func (CodeVersionClient) CreateOrGetStartPendingUpload

CreateOrGetStartPendingUpload ...

func (CodeVersionClient) CreateOrUpdate

CreateOrUpdate ...

func (CodeVersionClient) Delete

Delete ...

func (CodeVersionClient) Get

Get ...

func (CodeVersionClient) List

List ...

func (CodeVersionClient) ListComplete

ListComplete retrieves all the results into a single object

func (CodeVersionClient) ListCompleteMatchingPredicate

func (c CodeVersionClient) ListCompleteMatchingPredicate(ctx context.Context, id CodeId, options ListOperationOptions, predicate CodeVersionResourceOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (CodeVersionClient) Publish

Publish ...

func (CodeVersionClient) PublishThenPoll

func (c CodeVersionClient) PublishThenPoll(ctx context.Context, id CodeVersionId, input DestinationAsset) error

PublishThenPoll performs Publish then polls until it's completed

func (CodeVersionClient) RegistryCodeVersionsCreateOrGetStartPendingUpload

RegistryCodeVersionsCreateOrGetStartPendingUpload ...

func (CodeVersionClient) RegistryCodeVersionsCreateOrUpdate

RegistryCodeVersionsCreateOrUpdate ...

func (CodeVersionClient) RegistryCodeVersionsCreateOrUpdateThenPoll

func (c CodeVersionClient) RegistryCodeVersionsCreateOrUpdateThenPoll(ctx context.Context, id RegistryCodeVersionId, input CodeVersionResource) error

RegistryCodeVersionsCreateOrUpdateThenPoll performs RegistryCodeVersionsCreateOrUpdate then polls until it's completed

func (CodeVersionClient) RegistryCodeVersionsDelete

RegistryCodeVersionsDelete ...

func (CodeVersionClient) RegistryCodeVersionsDeleteThenPoll

func (c CodeVersionClient) RegistryCodeVersionsDeleteThenPoll(ctx context.Context, id RegistryCodeVersionId) error

RegistryCodeVersionsDeleteThenPoll performs RegistryCodeVersionsDelete then polls until it's completed

func (CodeVersionClient) RegistryCodeVersionsGet

RegistryCodeVersionsGet ...

func (CodeVersionClient) RegistryCodeVersionsList

RegistryCodeVersionsList ...

func (CodeVersionClient) RegistryCodeVersionsListComplete

RegistryCodeVersionsListComplete retrieves all the results into a single object

func (CodeVersionClient) RegistryCodeVersionsListCompleteMatchingPredicate

func (c CodeVersionClient) RegistryCodeVersionsListCompleteMatchingPredicate(ctx context.Context, id RegistryCodeId, options RegistryCodeVersionsListOperationOptions, predicate CodeVersionResourceOperationPredicate) (result RegistryCodeVersionsListCompleteResult, err error)

RegistryCodeVersionsListCompleteMatchingPredicate retrieves all the results and then applies the predicate

type CodeVersionId

type CodeVersionId struct {
	SubscriptionId    string
	ResourceGroupName string
	WorkspaceName     string
	CodeName          string
	VersionName       string
}

CodeVersionId is a struct representing the Resource ID for a Code Version

func NewCodeVersionID

func NewCodeVersionID(subscriptionId string, resourceGroupName string, workspaceName string, codeName string, versionName string) CodeVersionId

NewCodeVersionID returns a new CodeVersionId struct

func ParseCodeVersionID

func ParseCodeVersionID(input string) (*CodeVersionId, error)

ParseCodeVersionID parses 'input' into a CodeVersionId

func ParseCodeVersionIDInsensitively

func ParseCodeVersionIDInsensitively(input string) (*CodeVersionId, error)

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

func (*CodeVersionId) FromParseResult

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

func (CodeVersionId) ID

func (id CodeVersionId) ID() string

ID returns the formatted Code Version ID

func (CodeVersionId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Code Version ID

func (CodeVersionId) String

func (id CodeVersionId) String() string

String returns a human-readable description of this Code Version ID

type CodeVersionResource

type CodeVersionResource struct {
	Id         *string                `json:"id,omitempty"`
	Name       *string                `json:"name,omitempty"`
	Properties CodeVersion            `json:"properties"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type CodeVersionResourceOperationPredicate

type CodeVersionResourceOperationPredicate struct {
	Id   *string
	Name *string
	Type *string
}

func (CodeVersionResourceOperationPredicate) Matches

type CreateOrGetStartPendingUploadOperationResponse

type CreateOrGetStartPendingUploadOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *PendingUploadResponseDto
}

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *CodeVersionResource
}

type DeleteOperationResponse

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

type DestinationAsset

type DestinationAsset struct {
	DestinationName    *string `json:"destinationName,omitempty"`
	DestinationVersion *string `json:"destinationVersion,omitempty"`
	RegistryName       *string `json:"registryName,omitempty"`
}

type GetOperationResponse

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

type ListCompleteResult

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

type ListOperationOptions

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

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

func (ListOperationOptions) ToHeaders

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

func (ListOperationOptions) ToOData

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

func (ListOperationOptions) ToQuery

type ListOperationResponse

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

type PendingUploadCredentialDto

type PendingUploadCredentialDto interface {
}

type PendingUploadCredentialType

type PendingUploadCredentialType string
const (
	PendingUploadCredentialTypeSAS PendingUploadCredentialType = "SAS"
)

func (*PendingUploadCredentialType) UnmarshalJSON

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

type PendingUploadRequestDto

type PendingUploadRequestDto struct {
	PendingUploadId   *string            `json:"pendingUploadId,omitempty"`
	PendingUploadType *PendingUploadType `json:"pendingUploadType,omitempty"`
}

type PendingUploadResponseDto

type PendingUploadResponseDto struct {
	BlobReferenceForConsumption *BlobReferenceForConsumptionDto `json:"blobReferenceForConsumption,omitempty"`
	PendingUploadId             *string                         `json:"pendingUploadId,omitempty"`
	PendingUploadType           *PendingUploadType              `json:"pendingUploadType,omitempty"`
}

type PendingUploadType

type PendingUploadType string
const (
	PendingUploadTypeNone                   PendingUploadType = "None"
	PendingUploadTypeTemporaryBlobReference PendingUploadType = "TemporaryBlobReference"
)

func (*PendingUploadType) UnmarshalJSON

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

type PublishOperationResponse

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

type RawPendingUploadCredentialDtoImpl

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

RawPendingUploadCredentialDtoImpl 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 RegistryCodeId

type RegistryCodeId struct {
	SubscriptionId    string
	ResourceGroupName string
	RegistryName      string
	CodeName          string
}

RegistryCodeId is a struct representing the Resource ID for a Registry Code

func NewRegistryCodeID

func NewRegistryCodeID(subscriptionId string, resourceGroupName string, registryName string, codeName string) RegistryCodeId

NewRegistryCodeID returns a new RegistryCodeId struct

func ParseRegistryCodeID

func ParseRegistryCodeID(input string) (*RegistryCodeId, error)

ParseRegistryCodeID parses 'input' into a RegistryCodeId

func ParseRegistryCodeIDInsensitively

func ParseRegistryCodeIDInsensitively(input string) (*RegistryCodeId, error)

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

func (*RegistryCodeId) FromParseResult

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

func (RegistryCodeId) ID

func (id RegistryCodeId) ID() string

ID returns the formatted Registry Code ID

func (RegistryCodeId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Registry Code ID

func (RegistryCodeId) String

func (id RegistryCodeId) String() string

String returns a human-readable description of this Registry Code ID

type RegistryCodeVersionId

type RegistryCodeVersionId struct {
	SubscriptionId    string
	ResourceGroupName string
	RegistryName      string
	CodeName          string
	VersionName       string
}

RegistryCodeVersionId is a struct representing the Resource ID for a Registry Code Version

func NewRegistryCodeVersionID

func NewRegistryCodeVersionID(subscriptionId string, resourceGroupName string, registryName string, codeName string, versionName string) RegistryCodeVersionId

NewRegistryCodeVersionID returns a new RegistryCodeVersionId struct

func ParseRegistryCodeVersionID

func ParseRegistryCodeVersionID(input string) (*RegistryCodeVersionId, error)

ParseRegistryCodeVersionID parses 'input' into a RegistryCodeVersionId

func ParseRegistryCodeVersionIDInsensitively

func ParseRegistryCodeVersionIDInsensitively(input string) (*RegistryCodeVersionId, error)

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

func (*RegistryCodeVersionId) FromParseResult

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

func (RegistryCodeVersionId) ID

func (id RegistryCodeVersionId) ID() string

ID returns the formatted Registry Code Version ID

func (RegistryCodeVersionId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Registry Code Version ID

func (RegistryCodeVersionId) String

func (id RegistryCodeVersionId) String() string

String returns a human-readable description of this Registry Code Version ID

type RegistryCodeVersionsCreateOrGetStartPendingUploadOperationResponse

type RegistryCodeVersionsCreateOrGetStartPendingUploadOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *PendingUploadResponseDto
}

type RegistryCodeVersionsCreateOrUpdateOperationResponse

type RegistryCodeVersionsCreateOrUpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *CodeVersionResource
}

type RegistryCodeVersionsDeleteOperationResponse

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

type RegistryCodeVersionsGetOperationResponse

type RegistryCodeVersionsGetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *CodeVersionResource
}

type RegistryCodeVersionsListCompleteResult

type RegistryCodeVersionsListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []CodeVersionResource
}

type RegistryCodeVersionsListOperationOptions

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

func DefaultRegistryCodeVersionsListOperationOptions

func DefaultRegistryCodeVersionsListOperationOptions() RegistryCodeVersionsListOperationOptions

func (RegistryCodeVersionsListOperationOptions) ToHeaders

func (RegistryCodeVersionsListOperationOptions) ToOData

func (RegistryCodeVersionsListOperationOptions) ToQuery

type RegistryCodeVersionsListOperationResponse

type RegistryCodeVersionsListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]CodeVersionResource
}

type SASCredentialDto

type SASCredentialDto struct {
	SasUri *string `json:"sasUri,omitempty"`
}

func (SASCredentialDto) MarshalJSON

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

Jump to

Keyboard shortcuts

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