-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #573 from hashicorp/auto-pr/793206634
Auto PR: Regenerating the Go SDK (0ac7865)
- Loading branch information
Showing
1,443 changed files
with
113,866 additions
and
0 deletions.
There are no files selected for viewing
99 changes: 99 additions & 0 deletions
99
...ce-manager/machinelearningservices/2023-04-01-preview/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/2023-04-01-preview/batchdeployment` Documentation | ||
|
||
The `batchdeployment` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2023-04-01-preview`). | ||
|
||
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/2023-04-01-preview/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", "workspaceValue", "batchEndpointValue", "deploymentValue") | ||
|
||
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", "workspaceValue", "batchEndpointValue", "deploymentValue") | ||
|
||
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", "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` | ||
|
||
```go | ||
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` | ||
|
||
```go | ||
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 | ||
} | ||
``` |
26 changes: 26 additions & 0 deletions
26
resource-manager/machinelearningservices/2023-04-01-preview/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" | ||
"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(api environments.Api) (*BatchDeploymentClient, error) { | ||
client, err := resourcemanager.NewResourceManagerClient(api, "batchdeployment", defaultApiVersion) | ||
if err != nil { | ||
return nil, fmt.Errorf("instantiating BatchDeploymentClient: %+v", err) | ||
} | ||
|
||
return &BatchDeploymentClient{ | ||
Client: client, | ||
}, nil | ||
} |
Oops, something went wrong.