Skip to content

Commit

Permalink
Updating based on 85d34d866
Browse files Browse the repository at this point in the history
  • Loading branch information
hc-github-team-tf-azure committed Oct 22, 2024
1 parent d9ab9e6 commit 542ce67
Show file tree
Hide file tree
Showing 485 changed files with 36,958 additions and 0 deletions.
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

0 comments on commit 542ce67

Please sign in to comment.