monitorsresource

package
v0.20230414.1145511 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2023 License: MPL-2.0 Imports: 11 Imported by: 1

README

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

The monitorsresource 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/monitorsresource"

Client Initialization

client := monitorsresource.NewMonitorsResourceClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: MonitorsResourceClient.MonitorsCreate

ctx := context.TODO()
id := monitorsresource.NewMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue")

payload := monitorsresource.DatadogMonitorResource{
	// ...
}


if err := client.MonitorsCreateThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Example Usage: MonitorsResourceClient.MonitorsDelete

ctx := context.TODO()
id := monitorsresource.NewMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue")

if err := client.MonitorsDeleteThenPoll(ctx, id); err != nil {
	// handle the error
}

Example Usage: MonitorsResourceClient.MonitorsGet

ctx := context.TODO()
id := monitorsresource.NewMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue")

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

Example Usage: MonitorsResourceClient.MonitorsList

ctx := context.TODO()
id := monitorsresource.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

// alternatively `client.MonitorsList(ctx, id)` can be used to do batched pagination
items, err := client.MonitorsListComplete(ctx, id)
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: MonitorsResourceClient.MonitorsListByResourceGroup

ctx := context.TODO()
id := monitorsresource.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group")

// alternatively `client.MonitorsListByResourceGroup(ctx, id)` can be used to do batched pagination
items, err := client.MonitorsListByResourceGroupComplete(ctx, id)
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: MonitorsResourceClient.MonitorsUpdate

ctx := context.TODO()
id := monitorsresource.NewMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue")

payload := monitorsresource.DatadogMonitorResourceUpdateParameters{
	// ...
}


if err := client.MonitorsUpdateThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForLiftrResourceCategories

func PossibleValuesForLiftrResourceCategories() []string

func PossibleValuesForManagedIdentityTypes

func PossibleValuesForManagedIdentityTypes() []string

func PossibleValuesForMarketplaceSubscriptionStatus

func PossibleValuesForMarketplaceSubscriptionStatus() []string

func PossibleValuesForMonitoringStatus

func PossibleValuesForMonitoringStatus() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

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 DatadogMonitorResource

type DatadogMonitorResource struct {
	Id         *string                `json:"id,omitempty"`
	Identity   *IdentityProperties    `json:"identity,omitempty"`
	Location   string                 `json:"location"`
	Name       *string                `json:"name,omitempty"`
	Properties *MonitorProperties     `json:"properties,omitempty"`
	Sku        *ResourceSku           `json:"sku,omitempty"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Tags       *map[string]string     `json:"tags,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type DatadogMonitorResourceOperationPredicate

type DatadogMonitorResourceOperationPredicate struct {
	Id       *string
	Location *string
	Name     *string
	Type     *string
}

func (DatadogMonitorResourceOperationPredicate) Matches

type DatadogMonitorResourceUpdateParameters

type DatadogMonitorResourceUpdateParameters struct {
	Properties *MonitorUpdateProperties `json:"properties,omitempty"`
	Sku        *ResourceSku             `json:"sku,omitempty"`
	Tags       *map[string]string       `json:"tags,omitempty"`
}

type DatadogOrganizationProperties

type DatadogOrganizationProperties struct {
	ApiKey          *string `json:"apiKey,omitempty"`
	ApplicationKey  *string `json:"applicationKey,omitempty"`
	EnterpriseAppId *string `json:"enterpriseAppId,omitempty"`
	Id              *string `json:"id,omitempty"`
	LinkingAuthCode *string `json:"linkingAuthCode,omitempty"`
	LinkingClientId *string `json:"linkingClientId,omitempty"`
	Name            *string `json:"name,omitempty"`
	RedirectUri     *string `json:"redirectUri,omitempty"`
}

type IdentityProperties

type IdentityProperties struct {
	PrincipalId *string               `json:"principalId,omitempty"`
	TenantId    *string               `json:"tenantId,omitempty"`
	Type        *ManagedIdentityTypes `json:"type,omitempty"`
}

type LiftrResourceCategories

type LiftrResourceCategories string
const (
	LiftrResourceCategoriesMonitorLogs LiftrResourceCategories = "MonitorLogs"
	LiftrResourceCategoriesUnknown     LiftrResourceCategories = "Unknown"
)

type ManagedIdentityTypes

type ManagedIdentityTypes string
const (
	ManagedIdentityTypesSystemAssigned ManagedIdentityTypes = "SystemAssigned"
	ManagedIdentityTypesUserAssigned   ManagedIdentityTypes = "UserAssigned"
)

type MarketplaceSubscriptionStatus

type MarketplaceSubscriptionStatus string
const (
	MarketplaceSubscriptionStatusActive       MarketplaceSubscriptionStatus = "Active"
	MarketplaceSubscriptionStatusProvisioning MarketplaceSubscriptionStatus = "Provisioning"
	MarketplaceSubscriptionStatusSuspended    MarketplaceSubscriptionStatus = "Suspended"
	MarketplaceSubscriptionStatusUnsubscribed MarketplaceSubscriptionStatus = "Unsubscribed"
)

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

type MonitorProperties struct {
	DatadogOrganizationProperties *DatadogOrganizationProperties `json:"datadogOrganizationProperties,omitempty"`
	LiftrResourceCategory         *LiftrResourceCategories       `json:"liftrResourceCategory,omitempty"`
	LiftrResourcePreference       *int64                         `json:"liftrResourcePreference,omitempty"`
	MarketplaceSubscriptionStatus *MarketplaceSubscriptionStatus `json:"marketplaceSubscriptionStatus,omitempty"`
	MonitoringStatus              *MonitoringStatus              `json:"monitoringStatus,omitempty"`
	ProvisioningState             *ProvisioningState             `json:"provisioningState,omitempty"`
	UserInfo                      *UserInfo                      `json:"userInfo,omitempty"`
}

type MonitorUpdateProperties

type MonitorUpdateProperties struct {
	MonitoringStatus *MonitoringStatus `json:"monitoringStatus,omitempty"`
}

type MonitoringStatus

type MonitoringStatus string
const (
	MonitoringStatusDisabled MonitoringStatus = "Disabled"
	MonitoringStatusEnabled  MonitoringStatus = "Enabled"
)

type MonitorsCreateOperationResponse

type MonitorsCreateOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

type MonitorsDeleteOperationResponse

type MonitorsDeleteOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

type MonitorsGetOperationResponse

type MonitorsGetOperationResponse struct {
	HttpResponse *http.Response
	Model        *DatadogMonitorResource
}

type MonitorsListByResourceGroupCompleteResult

type MonitorsListByResourceGroupCompleteResult struct {
	Items []DatadogMonitorResource
}

type MonitorsListByResourceGroupOperationResponse

type MonitorsListByResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]DatadogMonitorResource
	// contains filtered or unexported fields
}

func (MonitorsListByResourceGroupOperationResponse) HasMore

func (MonitorsListByResourceGroupOperationResponse) LoadMore

type MonitorsListCompleteResult

type MonitorsListCompleteResult struct {
	Items []DatadogMonitorResource
}

type MonitorsListOperationResponse

type MonitorsListOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]DatadogMonitorResource
	// contains filtered or unexported fields
}

func (MonitorsListOperationResponse) HasMore

func (r MonitorsListOperationResponse) HasMore() bool

func (MonitorsListOperationResponse) LoadMore

type MonitorsResourceClient

type MonitorsResourceClient struct {
	Client autorest.Client
	// contains filtered or unexported fields
}

func NewMonitorsResourceClientWithBaseURI

func NewMonitorsResourceClientWithBaseURI(endpoint string) MonitorsResourceClient

func (MonitorsResourceClient) MonitorsCreate

MonitorsCreate ...

func (MonitorsResourceClient) MonitorsCreateThenPoll

func (c MonitorsResourceClient) MonitorsCreateThenPoll(ctx context.Context, id MonitorId, input DatadogMonitorResource) error

MonitorsCreateThenPoll performs MonitorsCreate then polls until it's completed

func (MonitorsResourceClient) MonitorsDelete

func (c MonitorsResourceClient) MonitorsDelete(ctx context.Context, id MonitorId) (result MonitorsDeleteOperationResponse, err error)

MonitorsDelete ...

func (MonitorsResourceClient) MonitorsDeleteThenPoll

func (c MonitorsResourceClient) MonitorsDeleteThenPoll(ctx context.Context, id MonitorId) error

MonitorsDeleteThenPoll performs MonitorsDelete then polls until it's completed

func (MonitorsResourceClient) MonitorsGet

MonitorsGet ...

func (MonitorsResourceClient) MonitorsList

MonitorsList ...

func (MonitorsResourceClient) MonitorsListByResourceGroup

MonitorsListByResourceGroup ...

func (MonitorsResourceClient) MonitorsListByResourceGroupComplete

MonitorsListByResourceGroupComplete retrieves all of the results into a single object

func (MonitorsResourceClient) MonitorsListByResourceGroupCompleteMatchingPredicate

func (c MonitorsResourceClient) MonitorsListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate DatadogMonitorResourceOperationPredicate) (resp MonitorsListByResourceGroupCompleteResult, err error)

MonitorsListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (MonitorsResourceClient) MonitorsListComplete

MonitorsListComplete retrieves all of the results into a single object

func (MonitorsResourceClient) MonitorsListCompleteMatchingPredicate

func (c MonitorsResourceClient) MonitorsListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate DatadogMonitorResourceOperationPredicate) (resp MonitorsListCompleteResult, err error)

MonitorsListCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (MonitorsResourceClient) MonitorsUpdate

MonitorsUpdate ...

func (MonitorsResourceClient) MonitorsUpdateThenPoll

MonitorsUpdateThenPoll performs MonitorsUpdate then polls until it's completed

type MonitorsUpdateOperationResponse

type MonitorsUpdateOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateAccepted     ProvisioningState = "Accepted"
	ProvisioningStateCanceled     ProvisioningState = "Canceled"
	ProvisioningStateCreating     ProvisioningState = "Creating"
	ProvisioningStateDeleted      ProvisioningState = "Deleted"
	ProvisioningStateDeleting     ProvisioningState = "Deleting"
	ProvisioningStateFailed       ProvisioningState = "Failed"
	ProvisioningStateNotSpecified ProvisioningState = "NotSpecified"
	ProvisioningStateSucceeded    ProvisioningState = "Succeeded"
	ProvisioningStateUpdating     ProvisioningState = "Updating"
)

type ResourceSku

type ResourceSku struct {
	Name string `json:"name"`
}

type UserInfo

type UserInfo struct {
	EmailAddress *string `json:"emailAddress,omitempty"`
	Name         *string `json:"name,omitempty"`
	PhoneNumber  *string `json:"phoneNumber,omitempty"`
}

Jump to

Keyboard shortcuts

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