Skip to content

Commit

Permalink
Merge pull request #766 from hashicorp/auto-pr/00ee6aaa3
Browse files Browse the repository at this point in the history
Auto PR: Regenerating the Go SDK (a168fd6)
  • Loading branch information
mbfrahry authored Dec 12, 2023
2 parents 387d4a3 + a168fd6 commit ed17769
Show file tree
Hide file tree
Showing 25 changed files with 1,604 additions and 0 deletions.
28 changes: 28 additions & 0 deletions resource-manager/hybridkubernetes/2024-01-01/client.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package v2024_01_01

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See NOTICE.txt in the project root for license information.

import (
"fmt"

"github.com/hashicorp/go-azure-sdk/resource-manager/hybridkubernetes/2024-01-01/connectedclusters"
"github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager"
sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments"
)

type Client struct {
ConnectedClusters *connectedclusters.ConnectedClustersClient
}

func NewClientWithBaseURI(sdkApi sdkEnv.Api, configureFunc func(c *resourcemanager.Client)) (*Client, error) {
connectedClustersClient, err := connectedclusters.NewConnectedClustersClientWithBaseURI(sdkApi)
if err != nil {
return nil, fmt.Errorf("building ConnectedClusters client: %+v", err)
}
configureFunc(connectedClustersClient.Client)

return &Client{
ConnectedClusters: connectedClustersClient,
}, nil
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@

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

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


### Client Initialization

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


### Example Usage: `ConnectedClustersClient.ConnectedClusterCreate`

```go
ctx := context.TODO()
id := connectedclusters.NewConnectedClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "connectedClusterValue")

payload := connectedclusters.ConnectedCluster{
// ...
}


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


### Example Usage: `ConnectedClustersClient.ConnectedClusterDelete`

```go
ctx := context.TODO()
id := connectedclusters.NewConnectedClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "connectedClusterValue")

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


### Example Usage: `ConnectedClustersClient.ConnectedClusterGet`

```go
ctx := context.TODO()
id := connectedclusters.NewConnectedClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "connectedClusterValue")

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


### Example Usage: `ConnectedClustersClient.ConnectedClusterListByResourceGroup`

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

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


### Example Usage: `ConnectedClustersClient.ConnectedClusterListBySubscription`

```go
ctx := context.TODO()
id := connectedclusters.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

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


### Example Usage: `ConnectedClustersClient.ConnectedClusterListClusterUserCredential`

```go
ctx := context.TODO()
id := connectedclusters.NewConnectedClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "connectedClusterValue")

payload := connectedclusters.ListClusterUserCredentialProperties{
// ...
}


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


### Example Usage: `ConnectedClustersClient.ConnectedClusterUpdate`

```go
ctx := context.TODO()
id := connectedclusters.NewConnectedClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "connectedClusterValue")

payload := connectedclusters.ConnectedClusterPatch{
// ...
}


read, err := client.ConnectedClusterUpdate(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package connectedclusters

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

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

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

0 comments on commit ed17769

Please sign in to comment.