-
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.
- Loading branch information
hc-github-team-tf-azure
committed
Apr 25, 2024
1 parent
5c4be19
commit 2314a83
Showing
158 changed files
with
9,510 additions
and
2 deletions.
There are no files selected for viewing
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
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
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
196 changes: 196 additions & 0 deletions
196
resource-manager/storagecache/2024-03-01/amlfilesystems/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,196 @@ | ||
|
||
## `github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2024-03-01/amlfilesystems` Documentation | ||
|
||
The `amlfilesystems` SDK allows for interaction with the Azure Resource Manager Service `storagecache` (API Version `2024-03-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-helpers/resourcemanager/commonids" | ||
import "github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2024-03-01/amlfilesystems" | ||
``` | ||
|
||
|
||
### Client Initialization | ||
|
||
```go | ||
client := amlfilesystems.NewAmlFilesystemsClientWithBaseURI("https://management.azure.com") | ||
client.Client.Authorizer = authorizer | ||
``` | ||
|
||
|
||
### Example Usage: `AmlFilesystemsClient.Archive` | ||
|
||
```go | ||
ctx := context.TODO() | ||
id := amlfilesystems.NewAmlFilesystemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "amlFilesystemValue") | ||
|
||
payload := amlfilesystems.AmlFilesystemArchiveInfo{ | ||
// ... | ||
} | ||
|
||
|
||
read, err := client.Archive(ctx, id, payload) | ||
if err != nil { | ||
// handle the error | ||
} | ||
if model := read.Model; model != nil { | ||
// do something with the model/response object | ||
} | ||
``` | ||
|
||
|
||
### Example Usage: `AmlFilesystemsClient.CancelArchive` | ||
|
||
```go | ||
ctx := context.TODO() | ||
id := amlfilesystems.NewAmlFilesystemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "amlFilesystemValue") | ||
|
||
read, err := client.CancelArchive(ctx, id) | ||
if err != nil { | ||
// handle the error | ||
} | ||
if model := read.Model; model != nil { | ||
// do something with the model/response object | ||
} | ||
``` | ||
|
||
|
||
### Example Usage: `AmlFilesystemsClient.CheckAmlFSSubnets` | ||
|
||
```go | ||
ctx := context.TODO() | ||
id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") | ||
|
||
payload := amlfilesystems.AmlFilesystemSubnetInfo{ | ||
// ... | ||
} | ||
|
||
|
||
read, err := client.CheckAmlFSSubnets(ctx, id, payload) | ||
if err != nil { | ||
// handle the error | ||
} | ||
if model := read.Model; model != nil { | ||
// do something with the model/response object | ||
} | ||
``` | ||
|
||
|
||
### Example Usage: `AmlFilesystemsClient.CreateOrUpdate` | ||
|
||
```go | ||
ctx := context.TODO() | ||
id := amlfilesystems.NewAmlFilesystemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "amlFilesystemValue") | ||
|
||
payload := amlfilesystems.AmlFilesystem{ | ||
// ... | ||
} | ||
|
||
|
||
if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { | ||
// handle the error | ||
} | ||
``` | ||
|
||
|
||
### Example Usage: `AmlFilesystemsClient.Delete` | ||
|
||
```go | ||
ctx := context.TODO() | ||
id := amlfilesystems.NewAmlFilesystemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "amlFilesystemValue") | ||
|
||
if err := client.DeleteThenPoll(ctx, id); err != nil { | ||
// handle the error | ||
} | ||
``` | ||
|
||
|
||
### Example Usage: `AmlFilesystemsClient.Get` | ||
|
||
```go | ||
ctx := context.TODO() | ||
id := amlfilesystems.NewAmlFilesystemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "amlFilesystemValue") | ||
|
||
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: `AmlFilesystemsClient.GetRequiredAmlFSSubnetsSize` | ||
|
||
```go | ||
ctx := context.TODO() | ||
id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") | ||
|
||
payload := amlfilesystems.RequiredAmlFilesystemSubnetsSizeInfo{ | ||
// ... | ||
} | ||
|
||
|
||
read, err := client.GetRequiredAmlFSSubnetsSize(ctx, id, payload) | ||
if err != nil { | ||
// handle the error | ||
} | ||
if model := read.Model; model != nil { | ||
// do something with the model/response object | ||
} | ||
``` | ||
|
||
|
||
### Example Usage: `AmlFilesystemsClient.List` | ||
|
||
```go | ||
ctx := context.TODO() | ||
id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") | ||
|
||
// alternatively `client.List(ctx, id)` can be used to do batched pagination | ||
items, err := client.ListComplete(ctx, id) | ||
if err != nil { | ||
// handle the error | ||
} | ||
for _, item := range items { | ||
// do something | ||
} | ||
``` | ||
|
||
|
||
### Example Usage: `AmlFilesystemsClient.ListByResourceGroup` | ||
|
||
```go | ||
ctx := context.TODO() | ||
id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") | ||
|
||
// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination | ||
items, err := client.ListByResourceGroupComplete(ctx, id) | ||
if err != nil { | ||
// handle the error | ||
} | ||
for _, item := range items { | ||
// do something | ||
} | ||
``` | ||
|
||
|
||
### Example Usage: `AmlFilesystemsClient.Update` | ||
|
||
```go | ||
ctx := context.TODO() | ||
id := amlfilesystems.NewAmlFilesystemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "amlFilesystemValue") | ||
|
||
payload := amlfilesystems.AmlFilesystemUpdate{ | ||
// ... | ||
} | ||
|
||
|
||
if err := client.UpdateThenPoll(ctx, id, payload); err != nil { | ||
// handle the error | ||
} | ||
``` |
26 changes: 26 additions & 0 deletions
26
resource-manager/storagecache/2024-03-01/amlfilesystems/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 amlfilesystems | ||
|
||
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 AmlFilesystemsClient struct { | ||
Client *resourcemanager.Client | ||
} | ||
|
||
func NewAmlFilesystemsClientWithBaseURI(sdkApi sdkEnv.Api) (*AmlFilesystemsClient, error) { | ||
client, err := resourcemanager.NewResourceManagerClient(sdkApi, "amlfilesystems", defaultApiVersion) | ||
if err != nil { | ||
return nil, fmt.Errorf("instantiating AmlFilesystemsClient: %+v", err) | ||
} | ||
|
||
return &AmlFilesystemsClient{ | ||
Client: client, | ||
}, nil | ||
} |
Oops, something went wrong.