-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
hc-github-team-tf-azure
committed
Nov 4, 2024
1 parent
1e84839
commit 224da9a
Showing
1,276 changed files
with
107,761 additions
and
0 deletions.
There are no files selected for viewing
99 changes: 99 additions & 0 deletions
99
resource-manager/machinelearningservices/2024-10-01/batchdeployment/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
|
||
## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2024-10-01/batchdeployment` Documentation | ||
|
||
The `batchdeployment` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2024-10-01`). | ||
|
||
This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). | ||
|
||
### Import Path | ||
|
||
```go | ||
import "github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2024-10-01/batchdeployment" | ||
``` | ||
|
||
|
||
### Client Initialization | ||
|
||
```go | ||
client := batchdeployment.NewBatchDeploymentClientWithBaseURI("https://management.azure.com") | ||
client.Client.Authorizer = authorizer | ||
``` | ||
|
||
|
||
### Example Usage: `BatchDeploymentClient.CreateOrUpdate` | ||
|
||
```go | ||
ctx := context.TODO() | ||
id := batchdeployment.NewDeploymentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceName", "batchEndpointName", "deploymentName") | ||
|
||
payload := batchdeployment.BatchDeploymentTrackedResource{ | ||
// ... | ||
} | ||
|
||
|
||
if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { | ||
// handle the error | ||
} | ||
``` | ||
|
||
|
||
### Example Usage: `BatchDeploymentClient.Delete` | ||
|
||
```go | ||
ctx := context.TODO() | ||
id := batchdeployment.NewDeploymentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceName", "batchEndpointName", "deploymentName") | ||
|
||
if err := client.DeleteThenPoll(ctx, id); err != nil { | ||
// handle the error | ||
} | ||
``` | ||
|
||
|
||
### Example Usage: `BatchDeploymentClient.Get` | ||
|
||
```go | ||
ctx := context.TODO() | ||
id := batchdeployment.NewDeploymentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceName", "batchEndpointName", "deploymentName") | ||
|
||
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` | ||
|
||
```go | ||
ctx := context.TODO() | ||
id := batchdeployment.NewBatchEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceName", "batchEndpointName") | ||
|
||
// 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` | ||
|
||
```go | ||
ctx := context.TODO() | ||
id := batchdeployment.NewDeploymentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceName", "batchEndpointName", "deploymentName") | ||
|
||
payload := batchdeployment.PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties{ | ||
// ... | ||
} | ||
|
||
|
||
if err := client.UpdateThenPoll(ctx, id, payload); err != nil { | ||
// handle the error | ||
} | ||
``` |
26 changes: 26 additions & 0 deletions
26
resource-manager/machinelearningservices/2024-10-01/batchdeployment/client.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package batchdeployment | ||
|
||
import ( | ||
"fmt" | ||
|
||
"github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" | ||
sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" | ||
) | ||
|
||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. See NOTICE.txt in the project root for license information. | ||
|
||
type BatchDeploymentClient struct { | ||
Client *resourcemanager.Client | ||
} | ||
|
||
func NewBatchDeploymentClientWithBaseURI(sdkApi sdkEnv.Api) (*BatchDeploymentClient, error) { | ||
client, err := resourcemanager.NewClient(sdkApi, "batchdeployment", defaultApiVersion) | ||
if err != nil { | ||
return nil, fmt.Errorf("instantiating BatchDeploymentClient: %+v", err) | ||
} | ||
|
||
return &BatchDeploymentClient{ | ||
Client: client, | ||
}, nil | ||
} |
Oops, something went wrong.