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 (542ce6757b4851aeb3ddc3b2b619c4c435664bbd) #1106

Merged
merged 1 commit into from
Oct 22, 2024
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
Expand Up @@ -23,6 +23,7 @@ type EAPriceSheetProperties struct {
MeterRegion *string `json:"meterRegion,omitempty"`
MeterSubCategory *string `json:"meterSubCategory,omitempty"`
MeterType *string `json:"meterType,omitempty"`
OfferId *string `json:"offerId,omitempty"`
PartNumber *string `json:"partNumber,omitempty"`
PriceType *string `json:"priceType,omitempty"`
Product *string `json:"product,omitempty"`
Expand Down
92 changes: 92 additions & 0 deletions resource-manager/costmanagement/2024-08-01/alerts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@

## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2024-08-01/alerts` Documentation

The `alerts` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2024-08-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/costmanagement/2024-08-01/alerts"
```


### Client Initialization

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


### Example Usage: `AlertsClient.Dismiss`

```go
ctx := context.TODO()
id := alerts.NewScopedAlertID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "alertId")

payload := alerts.DismissAlertPayload{
// ...
}


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


### Example Usage: `AlertsClient.Get`

```go
ctx := context.TODO()
id := alerts.NewScopedAlertID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "alertId")

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: `AlertsClient.List`

```go
ctx := context.TODO()
id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")

// 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: `AlertsClient.ListExternal`

```go
ctx := context.TODO()
id := alerts.NewExternalCloudProviderTypeID("externalBillingAccounts", "externalCloudProviderId")

// alternatively `client.ListExternal(ctx, id)` can be used to do batched pagination
items, err := client.ListExternalComplete(ctx, id)
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
```
26 changes: 26 additions & 0 deletions resource-manager/costmanagement/2024-08-01/alerts/client.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package alerts

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

func NewAlertsClientWithBaseURI(sdkApi sdkEnv.Api) (*AlertsClient, error) {
client, err := resourcemanager.NewClient(sdkApi, "alerts", defaultApiVersion)
if err != nil {
return nil, fmt.Errorf("instantiating AlertsClient: %+v", err)
}

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