rules

package
v0.0.0-...-a81a29a Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: MPL-2.0 Imports: 11 Imported by: 0

README

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

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

Client Initialization

client := rules.NewRulesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: RulesClient.TagRulesCreateOrUpdate

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

payload := rules.MonitoringTagRules{
	// ...
}


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

Example Usage: RulesClient.TagRulesGet

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

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

Example Usage: RulesClient.TagRulesList

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func PossibleValuesForTagAction

func PossibleValuesForTagAction() []string

func ValidateMonitorID

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

ValidateMonitorID checks that 'input' can be parsed as a Monitor ID

func ValidateTagRuleID

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

ValidateTagRuleID checks that 'input' can be parsed as a Tag Rule ID

Types

type FilteringTag

type FilteringTag struct {
	Action *TagAction `json:"action,omitempty"`
	Name   *string    `json:"name,omitempty"`
	Value  *string    `json:"value,omitempty"`
}

type LogRules

type LogRules struct {
	FilteringTags        *[]FilteringTag `json:"filteringTags,omitempty"`
	SendAadLogs          *bool           `json:"sendAadLogs,omitempty"`
	SendResourceLogs     *bool           `json:"sendResourceLogs,omitempty"`
	SendSubscriptionLogs *bool           `json:"sendSubscriptionLogs,omitempty"`
}

type MetricRules

type MetricRules struct {
	FilteringTags *[]FilteringTag `json:"filteringTags,omitempty"`
}

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 MonitoringTagRules

type MonitoringTagRules struct {
	Id         *string                       `json:"id,omitempty"`
	Name       *string                       `json:"name,omitempty"`
	Properties *MonitoringTagRulesProperties `json:"properties,omitempty"`
	SystemData *systemdata.SystemData        `json:"systemData,omitempty"`
	Type       *string                       `json:"type,omitempty"`
}

type MonitoringTagRulesOperationPredicate

type MonitoringTagRulesOperationPredicate struct {
	Id   *string
	Name *string
	Type *string
}

func (MonitoringTagRulesOperationPredicate) Matches

type MonitoringTagRulesProperties

type MonitoringTagRulesProperties struct {
	LogRules          *LogRules          `json:"logRules,omitempty"`
	MetricRules       *MetricRules       `json:"metricRules,omitempty"`
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"`
}

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

func (*ProvisioningState) UnmarshalJSON

func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error

type RulesClient

type RulesClient struct {
	Client *resourcemanager.Client
}

func NewRulesClientWithBaseURI

func NewRulesClientWithBaseURI(api environments.Api) (*RulesClient, error)

func (RulesClient) TagRulesCreateOrUpdate

func (c RulesClient) TagRulesCreateOrUpdate(ctx context.Context, id TagRuleId, input MonitoringTagRules) (result TagRulesCreateOrUpdateOperationResponse, err error)

TagRulesCreateOrUpdate ...

func (RulesClient) TagRulesGet

func (c RulesClient) TagRulesGet(ctx context.Context, id TagRuleId) (result TagRulesGetOperationResponse, err error)

TagRulesGet ...

func (RulesClient) TagRulesList

func (c RulesClient) TagRulesList(ctx context.Context, id MonitorId) (result TagRulesListOperationResponse, err error)

TagRulesList ...

func (RulesClient) TagRulesListComplete

func (c RulesClient) TagRulesListComplete(ctx context.Context, id MonitorId) (TagRulesListCompleteResult, error)

TagRulesListComplete retrieves all the results into a single object

func (RulesClient) TagRulesListCompleteMatchingPredicate

func (c RulesClient) TagRulesListCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate MonitoringTagRulesOperationPredicate) (result TagRulesListCompleteResult, err error)

TagRulesListCompleteMatchingPredicate retrieves all the results and then applies the predicate

type TagAction

type TagAction string
const (
	TagActionExclude TagAction = "Exclude"
	TagActionInclude TagAction = "Include"
)

func (*TagAction) UnmarshalJSON

func (s *TagAction) UnmarshalJSON(bytes []byte) error

type TagRuleId

type TagRuleId struct {
	SubscriptionId    string
	ResourceGroupName string
	MonitorName       string
	TagRuleName       string
}

TagRuleId is a struct representing the Resource ID for a Tag Rule

func NewTagRuleID

func NewTagRuleID(subscriptionId string, resourceGroupName string, monitorName string, tagRuleName string) TagRuleId

NewTagRuleID returns a new TagRuleId struct

func ParseTagRuleID

func ParseTagRuleID(input string) (*TagRuleId, error)

ParseTagRuleID parses 'input' into a TagRuleId

func ParseTagRuleIDInsensitively

func ParseTagRuleIDInsensitively(input string) (*TagRuleId, error)

ParseTagRuleIDInsensitively parses 'input' case-insensitively into a TagRuleId note: this method should only be used for API response data and not user input

func (TagRuleId) ID

func (id TagRuleId) ID() string

ID returns the formatted Tag Rule ID

func (TagRuleId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Tag Rule ID

func (TagRuleId) String

func (id TagRuleId) String() string

String returns a human-readable description of this Tag Rule ID

type TagRulesCreateOrUpdateOperationResponse

type TagRulesCreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *MonitoringTagRules
}

type TagRulesGetOperationResponse

type TagRulesGetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *MonitoringTagRules
}

type TagRulesListCompleteResult

type TagRulesListCompleteResult struct {
	Items []MonitoringTagRules
}

type TagRulesListOperationResponse

type TagRulesListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]MonitoringTagRules
}

Jump to

Keyboard shortcuts

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