Categorygithub.com/hashicorp/go-azure-sdk/resource-managermachinelearningservices2023-10-01environmentversion
package
0.20240715.1103416
Repository: https://github.com/hashicorp/go-azure-sdk.git
Documentation: pkg.go.dev
# README
github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-10-01/environmentversion
Documentation
The environmentversion
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/environmentversion"
Client Initialization
client := environmentversion.NewEnvironmentVersionClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
Example Usage: EnvironmentVersionClient.CreateOrUpdate
ctx := context.TODO()
id := environmentversion.NewEnvironmentVersionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "environmentValue", "versionValue")
payload := environmentversion.EnvironmentVersionResource{
// ...
}
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: EnvironmentVersionClient.Delete
ctx := context.TODO()
id := environmentversion.NewEnvironmentVersionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "environmentValue", "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: EnvironmentVersionClient.Get
ctx := context.TODO()
id := environmentversion.NewEnvironmentVersionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "environmentValue", "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: EnvironmentVersionClient.List
ctx := context.TODO()
id := environmentversion.NewEnvironmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "environmentValue")
// alternatively `client.List(ctx, id, environmentversion.DefaultListOperationOptions())` can be used to do batched pagination
items, err := client.ListComplete(ctx, id, environmentversion.DefaultListOperationOptions())
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: EnvironmentVersionClient.Publish
ctx := context.TODO()
id := environmentversion.NewEnvironmentVersionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "environmentValue", "versionValue")
payload := environmentversion.DestinationAsset{
// ...
}
if err := client.PublishThenPoll(ctx, id, payload); err != nil {
// handle the error
}
Example Usage: EnvironmentVersionClient.RegistryEnvironmentVersionsCreateOrUpdate
ctx := context.TODO()
id := environmentversion.NewRegistryEnvironmentVersionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "environmentValue", "versionValue")
payload := environmentversion.EnvironmentVersionResource{
// ...
}
if err := client.RegistryEnvironmentVersionsCreateOrUpdateThenPoll(ctx, id, payload); err != nil {
// handle the error
}
Example Usage: EnvironmentVersionClient.RegistryEnvironmentVersionsDelete
ctx := context.TODO()
id := environmentversion.NewRegistryEnvironmentVersionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "environmentValue", "versionValue")
if err := client.RegistryEnvironmentVersionsDeleteThenPoll(ctx, id); err != nil {
// handle the error
}
Example Usage: EnvironmentVersionClient.RegistryEnvironmentVersionsGet
ctx := context.TODO()
id := environmentversion.NewRegistryEnvironmentVersionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "environmentValue", "versionValue")
read, err := client.RegistryEnvironmentVersionsGet(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: EnvironmentVersionClient.RegistryEnvironmentVersionsList
ctx := context.TODO()
id := environmentversion.NewRegistryEnvironmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "environmentValue")
// alternatively `client.RegistryEnvironmentVersionsList(ctx, id, environmentversion.DefaultRegistryEnvironmentVersionsListOperationOptions())` can be used to do batched pagination
items, err := client.RegistryEnvironmentVersionsListComplete(ctx, id, environmentversion.DefaultRegistryEnvironmentVersionsListOperationOptions())
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}