Skip to content

Commit

Permalink
Updating based on bc235546
Browse files Browse the repository at this point in the history
  • Loading branch information
hc-github-team-tf-azure committed Mar 4, 2024
1 parent 7bbe8d2 commit 0e7f713
Show file tree
Hide file tree
Showing 471 changed files with 31,912 additions and 0 deletions.
163 changes: 163 additions & 0 deletions resource-manager/azurestackhci/2024-01-01/arcsettings/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@

## `github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/arcsettings` Documentation

The `arcsettings` SDK allows for interaction with the Azure Resource Manager Service `azurestackhci` (API Version `2024-01-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/azurestackhci/2024-01-01/arcsettings"
```


### Client Initialization

```go
client := arcsettings.NewArcSettingsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
```


### Example Usage: `ArcSettingsClient.ArcSettingsCreate`

```go
ctx := context.TODO()
id := arcsettings.NewArcSettingID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "arcSettingValue")

payload := arcsettings.ArcSetting{
// ...
}


read, err := client.ArcSettingsCreate(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
```


### Example Usage: `ArcSettingsClient.ArcSettingsDelete`

```go
ctx := context.TODO()
id := arcsettings.NewArcSettingID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "arcSettingValue")

if err := client.ArcSettingsDeleteThenPoll(ctx, id); err != nil {
// handle the error
}
```


### Example Usage: `ArcSettingsClient.ArcSettingsGet`

```go
ctx := context.TODO()
id := arcsettings.NewArcSettingID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "arcSettingValue")

read, err := client.ArcSettingsGet(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
```


### Example Usage: `ArcSettingsClient.ArcSettingsListByCluster`

```go
ctx := context.TODO()
id := arcsettings.NewClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue")

// alternatively `client.ArcSettingsListByCluster(ctx, id)` can be used to do batched pagination
items, err := client.ArcSettingsListByClusterComplete(ctx, id)
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
```


### Example Usage: `ArcSettingsClient.ArcSettingsUpdate`

```go
ctx := context.TODO()
id := arcsettings.NewArcSettingID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "arcSettingValue")

payload := arcsettings.ArcSettingsPatch{
// ...
}


read, err := client.ArcSettingsUpdate(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
```


### Example Usage: `ArcSettingsClient.ConsentAndInstallDefaultExtensions`

```go
ctx := context.TODO()
id := arcsettings.NewArcSettingID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "arcSettingValue")

read, err := client.ConsentAndInstallDefaultExtensions(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
```


### Example Usage: `ArcSettingsClient.CreateIdentity`

```go
ctx := context.TODO()
id := arcsettings.NewArcSettingID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "arcSettingValue")

if err := client.CreateIdentityThenPoll(ctx, id); err != nil {
// handle the error
}
```


### Example Usage: `ArcSettingsClient.GeneratePassword`

```go
ctx := context.TODO()
id := arcsettings.NewArcSettingID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "arcSettingValue")

read, err := client.GeneratePassword(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
```


### Example Usage: `ArcSettingsClient.InitializeDisableProcess`

```go
ctx := context.TODO()
id := arcsettings.NewArcSettingID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "arcSettingValue")

if err := client.InitializeDisableProcessThenPoll(ctx, id); err != nil {
// handle the error
}
```
26 changes: 26 additions & 0 deletions resource-manager/azurestackhci/2024-01-01/arcsettings/client.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package arcsettings

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 ArcSettingsClient struct {
Client *resourcemanager.Client
}

func NewArcSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*ArcSettingsClient, error) {
client, err := resourcemanager.NewResourceManagerClient(sdkApi, "arcsettings", defaultApiVersion)
if err != nil {
return nil, fmt.Errorf("instantiating ArcSettingsClient: %+v", err)
}

return &ArcSettingsClient{
Client: client,
}, nil
}
Loading

0 comments on commit 0e7f713

Please sign in to comment.