Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto PR: Regenerating the Go SDK (0ac7865ab529df558012bea245fc17108248ad95) #573

Merged
merged 1 commit into from
Jul 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
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