dataversion

package
v0.20241021.1074254 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2024-04-01/dataversion Documentation

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

Client Initialization

client := dataversion.NewDataVersionClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: DataVersionClient.CreateOrUpdate

ctx := context.TODO()
id := dataversion.NewDataVersionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceName", "dataName", "versionName")

payload := dataversion.DataVersionBaseResource{
	// ...
}


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: DataVersionClient.Delete

ctx := context.TODO()
id := dataversion.NewDataVersionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceName", "dataName", "versionName")

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: DataVersionClient.Get

ctx := context.TODO()
id := dataversion.NewDataVersionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceName", "dataName", "versionName")

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

ctx := context.TODO()
id := dataversion.NewWorkspaceDataID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceName", "dataName")

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

Example Usage: DataVersionClient.Publish

ctx := context.TODO()
id := dataversion.NewDataVersionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceName", "dataName", "versionName")

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


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForDataType

func PossibleValuesForDataType() []string

func PossibleValuesForListViewType

func PossibleValuesForListViewType() []string

func ValidateDataVersionID

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

ValidateDataVersionID checks that 'input' can be parsed as a Data Version ID

func ValidateWorkspaceDataID

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

ValidateWorkspaceDataID checks that 'input' can be parsed as a Workspace Data ID

Types

type BaseDataVersionBaseImpl added in v0.20240920.1135249

type BaseDataVersionBaseImpl struct {
	DataType    DataType           `json:"dataType"`
	DataUri     string             `json:"dataUri"`
	Description *string            `json:"description,omitempty"`
	IsAnonymous *bool              `json:"isAnonymous,omitempty"`
	IsArchived  *bool              `json:"isArchived,omitempty"`
	Properties  *map[string]string `json:"properties,omitempty"`
	Tags        *map[string]string `json:"tags,omitempty"`
}

func (BaseDataVersionBaseImpl) DataVersionBase added in v0.20240920.1135249

type CreateOrUpdateOperationResponse

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

type DataType

type DataType string
const (
	DataTypeMltable   DataType = "mltable"
	DataTypeUriFile   DataType = "uri_file"
	DataTypeUriFolder DataType = "uri_folder"
)

func (*DataType) UnmarshalJSON

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

type DataVersionBase

type DataVersionBase interface {
	DataVersionBase() BaseDataVersionBaseImpl
}

func UnmarshalDataVersionBaseImplementation added in v0.20240920.1135249

func UnmarshalDataVersionBaseImplementation(input []byte) (DataVersionBase, error)

type DataVersionBaseResource

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

func (*DataVersionBaseResource) UnmarshalJSON

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

type DataVersionBaseResourceOperationPredicate

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

func (DataVersionBaseResourceOperationPredicate) Matches

type DataVersionClient

type DataVersionClient struct {
	Client *resourcemanager.Client
}

func NewDataVersionClientWithBaseURI

func NewDataVersionClientWithBaseURI(sdkApi sdkEnv.Api) (*DataVersionClient, error)

func (DataVersionClient) CreateOrUpdate

CreateOrUpdate ...

func (DataVersionClient) Delete

Delete ...

func (DataVersionClient) Get

Get ...

func (DataVersionClient) List

List ...

func (DataVersionClient) ListComplete

ListComplete retrieves all the results into a single object

func (DataVersionClient) ListCompleteMatchingPredicate

func (c DataVersionClient) ListCompleteMatchingPredicate(ctx context.Context, id WorkspaceDataId, options ListOperationOptions, predicate DataVersionBaseResourceOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (DataVersionClient) Publish

Publish ...

func (DataVersionClient) PublishThenPoll

func (c DataVersionClient) PublishThenPoll(ctx context.Context, id DataVersionId, input DestinationAsset) error

PublishThenPoll performs Publish then polls until it's completed

type DataVersionId

type DataVersionId struct {
	SubscriptionId    string
	ResourceGroupName string
	WorkspaceName     string
	DataName          string
	VersionName       string
}

DataVersionId is a struct representing the Resource ID for a Data Version

func NewDataVersionID

func NewDataVersionID(subscriptionId string, resourceGroupName string, workspaceName string, dataName string, versionName string) DataVersionId

NewDataVersionID returns a new DataVersionId struct

func ParseDataVersionID

func ParseDataVersionID(input string) (*DataVersionId, error)

ParseDataVersionID parses 'input' into a DataVersionId

func ParseDataVersionIDInsensitively

func ParseDataVersionIDInsensitively(input string) (*DataVersionId, error)

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

func (*DataVersionId) FromParseResult

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

func (DataVersionId) ID

func (id DataVersionId) ID() string

ID returns the formatted Data Version ID

func (DataVersionId) Segments

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

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

func (DataVersionId) String

func (id DataVersionId) String() string

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

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        *DataVersionBaseResource
}

type ListCompleteResult

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

type ListCustomPager added in v0.20240628.1153531

type ListCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ListCustomPager) NextPageLink() *odata.Link

type ListOperationOptions

type ListOperationOptions struct {
	ListViewType *ListViewType
	OrderBy      *string
	Skip         *string
	Tags         *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        *[]DataVersionBaseResource
}

type ListViewType

type ListViewType string
const (
	ListViewTypeActiveOnly   ListViewType = "ActiveOnly"
	ListViewTypeAll          ListViewType = "All"
	ListViewTypeArchivedOnly ListViewType = "ArchivedOnly"
)

func (*ListViewType) UnmarshalJSON

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

type MLTableData

type MLTableData struct {
	ReferencedUris *[]string `json:"referencedUris,omitempty"`

	DataType    DataType           `json:"dataType"`
	DataUri     string             `json:"dataUri"`
	Description *string            `json:"description,omitempty"`
	IsAnonymous *bool              `json:"isAnonymous,omitempty"`
	IsArchived  *bool              `json:"isArchived,omitempty"`
	Properties  *map[string]string `json:"properties,omitempty"`
	Tags        *map[string]string `json:"tags,omitempty"`
}

func (MLTableData) DataVersionBase added in v0.20240920.1135249

func (s MLTableData) DataVersionBase() BaseDataVersionBaseImpl

func (MLTableData) MarshalJSON

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

type PublishOperationResponse

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

type RawDataVersionBaseImpl

type RawDataVersionBaseImpl struct {
	Type   string
	Values map[string]interface{}
	// contains filtered or unexported fields
}

RawDataVersionBaseImpl 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).

func (RawDataVersionBaseImpl) DataVersionBase added in v0.20240920.1135249

func (s RawDataVersionBaseImpl) DataVersionBase() BaseDataVersionBaseImpl

type UriFileDataVersion

type UriFileDataVersion struct {
	DataType    DataType           `json:"dataType"`
	DataUri     string             `json:"dataUri"`
	Description *string            `json:"description,omitempty"`
	IsAnonymous *bool              `json:"isAnonymous,omitempty"`
	IsArchived  *bool              `json:"isArchived,omitempty"`
	Properties  *map[string]string `json:"properties,omitempty"`
	Tags        *map[string]string `json:"tags,omitempty"`
}

func (UriFileDataVersion) DataVersionBase added in v0.20240920.1135249

func (s UriFileDataVersion) DataVersionBase() BaseDataVersionBaseImpl

func (UriFileDataVersion) MarshalJSON

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

type UriFolderDataVersion

type UriFolderDataVersion struct {
	DataType    DataType           `json:"dataType"`
	DataUri     string             `json:"dataUri"`
	Description *string            `json:"description,omitempty"`
	IsAnonymous *bool              `json:"isAnonymous,omitempty"`
	IsArchived  *bool              `json:"isArchived,omitempty"`
	Properties  *map[string]string `json:"properties,omitempty"`
	Tags        *map[string]string `json:"tags,omitempty"`
}

func (UriFolderDataVersion) DataVersionBase added in v0.20240920.1135249

func (s UriFolderDataVersion) DataVersionBase() BaseDataVersionBaseImpl

func (UriFolderDataVersion) MarshalJSON

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

type WorkspaceDataId

type WorkspaceDataId struct {
	SubscriptionId    string
	ResourceGroupName string
	WorkspaceName     string
	DataName          string
}

WorkspaceDataId is a struct representing the Resource ID for a Workspace Data

func NewWorkspaceDataID

func NewWorkspaceDataID(subscriptionId string, resourceGroupName string, workspaceName string, dataName string) WorkspaceDataId

NewWorkspaceDataID returns a new WorkspaceDataId struct

func ParseWorkspaceDataID

func ParseWorkspaceDataID(input string) (*WorkspaceDataId, error)

ParseWorkspaceDataID parses 'input' into a WorkspaceDataId

func ParseWorkspaceDataIDInsensitively

func ParseWorkspaceDataIDInsensitively(input string) (*WorkspaceDataId, error)

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

func (*WorkspaceDataId) FromParseResult

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

func (WorkspaceDataId) ID

func (id WorkspaceDataId) ID() string

ID returns the formatted Workspace Data ID

func (WorkspaceDataId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Workspace Data ID

func (WorkspaceDataId) String

func (id WorkspaceDataId) String() string

String returns a human-readable description of this Workspace Data ID

Jump to

Keyboard shortcuts

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