apikey

package
v0.20240906.1232634 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 6, 2024 License: MPL-2.0 Imports: 10 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2021-03-01/apikey Documentation

The apikey SDK allows for interaction with the Azure Resource Manager Service datadog (API Version 2021-03-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/2021-03-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

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateMonitorID

func ValidateMonitorID(input interface{}, key string) (warnings []string, errors []error)

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 DatadogApiKey struct {
	Created   *string `json:"created,omitempty"`
	CreatedBy *string `json:"createdBy,omitempty"`
	Key       string  `json:"key"`
	Name      *string `json:"name,omitempty"`
}

type DatadogApiKeyOperationPredicate

type DatadogApiKeyOperationPredicate struct {
	Created   *string
	CreatedBy *string
	Key       *string
	Name      *string
}

func (DatadogApiKeyOperationPredicate) Matches

type MonitorId

type MonitorId struct {
	SubscriptionId    string
	ResourceGroupName string
	MonitorName       string
}

MonitorId is a struct representing the Resource ID for a Monitor

func NewMonitorID

func NewMonitorID(subscriptionId string, resourceGroupName string, monitorName string) MonitorId

NewMonitorID returns a new MonitorId struct

func ParseMonitorID

func ParseMonitorID(input string) (*MonitorId, error)

ParseMonitorID parses 'input' into a MonitorId

func ParseMonitorIDInsensitively

func ParseMonitorIDInsensitively(input string) (*MonitorId, error)

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) FromParseResult

func (id *MonitorId) FromParseResult(input resourceids.ParseResult) error

func (MonitorId) ID

func (id MonitorId) ID() string

ID returns the formatted Monitor ID

func (MonitorId) Segments

func (id MonitorId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Monitor ID

func (MonitorId) String

func (id MonitorId) String() string

String returns a human-readable description of this Monitor ID

type MonitorsGetDefaultKeyOperationResponse

type MonitorsGetDefaultKeyOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *DatadogApiKey
}

type MonitorsListApiKeysCompleteResult

type MonitorsListApiKeysCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []DatadogApiKey
}

type MonitorsListApiKeysCustomPager added in v0.20240628.1153531

type MonitorsListApiKeysCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *MonitorsListApiKeysCustomPager) NextPageLink() *odata.Link

type MonitorsListApiKeysOperationResponse

type MonitorsListApiKeysOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]DatadogApiKey
}

type MonitorsSetDefaultKeyOperationResponse

type MonitorsSetDefaultKeyOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL