Skip to content

Commit

Permalink
Merge pull request #573 from hashicorp/auto-pr/793206634
Browse files Browse the repository at this point in the history
Auto PR: Regenerating the Go SDK (0ac7865)
  • Loading branch information
tombuildsstuff authored Jul 28, 2023
2 parents f4bfcf0 + 0ac7865 commit 556aec3
Show file tree
Hide file tree
Showing 1,443 changed files with 113,866 additions and 0 deletions.
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
}
```
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
}
Loading

0 comments on commit 556aec3

Please sign in to comment.