README ¶
github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2022-06-01/apikey
Documentation
The apikey
SDK allows for interaction with the Azure Resource Manager Service datadog
(API Version 2022-06-01
).
This readme covers example usages, but further information on using this SDK can be found in the project root.
Import Path
import "github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2022-06-01/apikey"
Client Initialization
client := apikey.NewApiKeyClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
Example Usage: ApiKeyClient.MonitorsGetDefaultKey
ctx := context.TODO()
id := apikey.NewMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue")
read, err := client.MonitorsGetDefaultKey(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: ApiKeyClient.MonitorsListApiKeys
ctx := context.TODO()
id := apikey.NewMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue")
// alternatively `client.MonitorsListApiKeys(ctx, id)` can be used to do batched pagination
items, err := client.MonitorsListApiKeysComplete(ctx, id)
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: ApiKeyClient.MonitorsSetDefaultKey
ctx := context.TODO()
id := apikey.NewMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue")
payload := apikey.DatadogApiKey{
// ...
}
read, err := client.MonitorsSetDefaultKey(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Documentation ¶
Index ¶
- func ValidateMonitorID(input interface{}, key string) (warnings []string, errors []error)
- type ApiKeyClient
- func (c ApiKeyClient) MonitorsGetDefaultKey(ctx context.Context, id MonitorId) (result MonitorsGetDefaultKeyOperationResponse, err error)
- func (c ApiKeyClient) MonitorsListApiKeys(ctx context.Context, id MonitorId) (result MonitorsListApiKeysOperationResponse, err error)
- func (c ApiKeyClient) MonitorsListApiKeysComplete(ctx context.Context, id MonitorId) (MonitorsListApiKeysCompleteResult, error)
- func (c ApiKeyClient) MonitorsListApiKeysCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate DatadogApiKeyOperationPredicate) (result MonitorsListApiKeysCompleteResult, err error)
- func (c ApiKeyClient) MonitorsSetDefaultKey(ctx context.Context, id MonitorId, input DatadogApiKey) (result MonitorsSetDefaultKeyOperationResponse, err error)
- type DatadogApiKey
- type DatadogApiKeyOperationPredicate
- type MonitorId
- type MonitorsGetDefaultKeyOperationResponse
- type MonitorsListApiKeysCompleteResult
- type MonitorsListApiKeysOperationResponse
- type MonitorsSetDefaultKeyOperationResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateMonitorID ¶
ValidateMonitorID checks that 'input' can be parsed as a Monitor ID
Types ¶
type ApiKeyClient ¶
type ApiKeyClient struct {
Client *resourcemanager.Client
}
func NewApiKeyClientWithBaseURI ¶
func NewApiKeyClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiKeyClient, error)
func (ApiKeyClient) MonitorsGetDefaultKey ¶
func (c ApiKeyClient) MonitorsGetDefaultKey(ctx context.Context, id MonitorId) (result MonitorsGetDefaultKeyOperationResponse, err error)
MonitorsGetDefaultKey ...
func (ApiKeyClient) MonitorsListApiKeys ¶
func (c ApiKeyClient) MonitorsListApiKeys(ctx context.Context, id MonitorId) (result MonitorsListApiKeysOperationResponse, err error)
MonitorsListApiKeys ...
func (ApiKeyClient) MonitorsListApiKeysComplete ¶
func (c ApiKeyClient) MonitorsListApiKeysComplete(ctx context.Context, id MonitorId) (MonitorsListApiKeysCompleteResult, error)
MonitorsListApiKeysComplete retrieves all the results into a single object
func (ApiKeyClient) MonitorsListApiKeysCompleteMatchingPredicate ¶
func (c ApiKeyClient) MonitorsListApiKeysCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate DatadogApiKeyOperationPredicate) (result MonitorsListApiKeysCompleteResult, err error)
MonitorsListApiKeysCompleteMatchingPredicate retrieves all the results and then applies the predicate
func (ApiKeyClient) MonitorsSetDefaultKey ¶
func (c ApiKeyClient) MonitorsSetDefaultKey(ctx context.Context, id MonitorId, input DatadogApiKey) (result MonitorsSetDefaultKeyOperationResponse, err error)
MonitorsSetDefaultKey ...
type DatadogApiKey ¶
type DatadogApiKeyOperationPredicate ¶
type DatadogApiKeyOperationPredicate struct { Created *string CreatedBy *string Key *string Name *string }
func (DatadogApiKeyOperationPredicate) Matches ¶
func (p DatadogApiKeyOperationPredicate) Matches(input DatadogApiKey) bool
type MonitorId ¶
MonitorId is a struct representing the Resource ID for a Monitor
func NewMonitorID ¶
NewMonitorID returns a new MonitorId struct
func ParseMonitorID ¶
ParseMonitorID parses 'input' into a MonitorId
func ParseMonitorIDInsensitively ¶
ParseMonitorIDInsensitively parses 'input' case-insensitively into a MonitorId note: this method should only be used for API response data and not user input
func (MonitorId) Segments ¶
func (id MonitorId) Segments() []resourceids.Segment
Segments returns a slice of Resource ID Segments which comprise this Monitor ID
type MonitorsGetDefaultKeyOperationResponse ¶
type MonitorsGetDefaultKeyOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *DatadogApiKey }
type MonitorsListApiKeysCompleteResult ¶
type MonitorsListApiKeysCompleteResult struct {
Items []DatadogApiKey
}
type MonitorsListApiKeysOperationResponse ¶
type MonitorsListApiKeysOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *[]DatadogApiKey }