rules

package
v0.20230105.1121404 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2023 License: MPL-2.0 Imports: 10 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2020-07-01/rules Documentation

The rules SDK allows for interaction with the Azure Resource Manager Service elastic (API Version 2020-07-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/elastic/2020-07-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", "ruleSetValue")

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.TagRulesDelete

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

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

Example Usage: RulesClient.TagRulesGet

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

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"`
	SendActivityLogs     *bool           `json:"sendActivityLogs,omitempty"`
	SendSubscriptionLogs *bool           `json:"sendSubscriptionLogs,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"`
	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"
)

type RulesClient

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

func NewRulesClientWithBaseURI

func NewRulesClientWithBaseURI(endpoint string) RulesClient

func (RulesClient) TagRulesCreateOrUpdate

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

TagRulesCreateOrUpdate ...

func (RulesClient) TagRulesDelete

func (c RulesClient) TagRulesDelete(ctx context.Context, id TagRuleId) (result TagRulesDeleteOperationResponse, err error)

TagRulesDelete ...

func (RulesClient) TagRulesDeleteThenPoll

func (c RulesClient) TagRulesDeleteThenPoll(ctx context.Context, id TagRuleId) error

TagRulesDeleteThenPoll performs TagRulesDelete then polls until it's completed

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) (resp TagRulesListOperationResponse, err error)

TagRulesList ...

func (RulesClient) TagRulesListComplete

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

TagRulesListComplete retrieves all of the results into a single object

func (RulesClient) TagRulesListCompleteMatchingPredicate

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

TagRulesListCompleteMatchingPredicate retrieves all of the results and then applied the predicate

type TagAction

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

type TagRuleId

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

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

func NewTagRuleID

func NewTagRuleID(subscriptionId string, resourceGroupName string, monitorName string, ruleSetName 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
	Model        *MonitoringTagRules
}

type TagRulesDeleteOperationResponse

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

type TagRulesGetOperationResponse

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

type TagRulesListCompleteResult

type TagRulesListCompleteResult struct {
	Items []MonitoringTagRules
}

type TagRulesListOperationResponse

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

func (TagRulesListOperationResponse) HasMore

func (r TagRulesListOperationResponse) HasMore() bool

func (TagRulesListOperationResponse) LoadMore

Jump to

Keyboard shortcuts

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