-
Notifications
You must be signed in to change notification settings - Fork 50
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
Jan 13, 2025
1 parent
3e57c83
commit 9af6244
Showing
261 changed files
with
17,337 additions
and
44 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
12 changes: 12 additions & 0 deletions
12
resource-manager/datadog/2023-01-01/createresource/predicates.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,12 @@ | ||
package createresource | ||
|
||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. See NOTICE.txt in the project root for license information. | ||
|
||
type CreateResourceSupportedResponseOperationPredicate struct { | ||
} | ||
|
||
func (p CreateResourceSupportedResponseOperationPredicate) Matches(input CreateResourceSupportedResponse) bool { | ||
|
||
return true | ||
} |
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
27 changes: 27 additions & 0 deletions
27
resource-manager/datadog/2023-01-01/monitoredsubscriptions/predicates.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,27 @@ | ||
package monitoredsubscriptions | ||
|
||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. See NOTICE.txt in the project root for license information. | ||
|
||
type MonitoredSubscriptionPropertiesOperationPredicate struct { | ||
Id *string | ||
Name *string | ||
Type *string | ||
} | ||
|
||
func (p MonitoredSubscriptionPropertiesOperationPredicate) Matches(input MonitoredSubscriptionProperties) bool { | ||
|
||
if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { | ||
return false | ||
} | ||
|
||
if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { | ||
return false | ||
} | ||
|
||
if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { | ||
return false | ||
} | ||
|
||
return true | ||
} |
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,59 @@ | ||
|
||
## `github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2023-10-20/agreements` Documentation | ||
|
||
The `agreements` SDK allows for interaction with Azure Resource Manager `datadog` (API Version `2023-10-20`). | ||
|
||
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/datadog/2023-10-20/agreements" | ||
``` | ||
|
||
|
||
### Client Initialization | ||
|
||
```go | ||
client := agreements.NewAgreementsClientWithBaseURI("https://management.azure.com") | ||
client.Client.Authorizer = authorizer | ||
``` | ||
|
||
|
||
### Example Usage: `AgreementsClient.MarketplaceAgreementsCreateOrUpdate` | ||
|
||
```go | ||
ctx := context.TODO() | ||
id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") | ||
|
||
payload := agreements.DatadogAgreementResource{ | ||
// ... | ||
} | ||
|
||
|
||
read, err := client.MarketplaceAgreementsCreateOrUpdate(ctx, id, payload) | ||
if err != nil { | ||
// handle the error | ||
} | ||
if model := read.Model; model != nil { | ||
// do something with the model/response object | ||
} | ||
``` | ||
|
||
|
||
### Example Usage: `AgreementsClient.MarketplaceAgreementsList` | ||
|
||
```go | ||
ctx := context.TODO() | ||
id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") | ||
|
||
// alternatively `client.MarketplaceAgreementsList(ctx, id)` can be used to do batched pagination | ||
items, err := client.MarketplaceAgreementsListComplete(ctx, id) | ||
if err != nil { | ||
// handle the error | ||
} | ||
for _, item := range items { | ||
// do something | ||
} | ||
``` |
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 agreements | ||
|
||
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 AgreementsClient struct { | ||
Client *resourcemanager.Client | ||
} | ||
|
||
func NewAgreementsClientWithBaseURI(sdkApi sdkEnv.Api) (*AgreementsClient, error) { | ||
client, err := resourcemanager.NewClient(sdkApi, "agreements", defaultApiVersion) | ||
if err != nil { | ||
return nil, fmt.Errorf("instantiating AgreementsClient: %+v", err) | ||
} | ||
|
||
return &AgreementsClient{ | ||
Client: client, | ||
}, nil | ||
} |
Oops, something went wrong.