tagrules

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: 12 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/newrelic/2022-07-01/tagrules Documentation

The tagrules SDK allows for interaction with the Azure Resource Manager Service newrelic (API Version 2022-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/newrelic/2022-07-01/tagrules"

Client Initialization

client := tagrules.NewTagRulesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: TagRulesClient.CreateOrUpdate

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

payload := tagrules.TagRule{
	// ...
}


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

Example Usage: TagRulesClient.Delete

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

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

Example Usage: TagRulesClient.Get

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

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

Example Usage: TagRulesClient.ListByNewRelicMonitorResource

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

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

Example Usage: TagRulesClient.Update

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

payload := tagrules.TagRuleUpdate{
	// ...
}


read, err := client.Update(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 PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func PossibleValuesForSendAadLogsStatus

func PossibleValuesForSendAadLogsStatus() []string

func PossibleValuesForSendActivityLogsStatus

func PossibleValuesForSendActivityLogsStatus() []string

func PossibleValuesForSendMetricsStatus

func PossibleValuesForSendMetricsStatus() []string

func PossibleValuesForSendSubscriptionLogsStatus

func PossibleValuesForSendSubscriptionLogsStatus() []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 CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type DeleteOperationResponse

type DeleteOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type FilteringTag

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

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *TagRule
}

type ListByNewRelicMonitorResourceCompleteResult

type ListByNewRelicMonitorResourceCompleteResult struct {
	Items []TagRule
}

type ListByNewRelicMonitorResourceOperationResponse

type ListByNewRelicMonitorResourceOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]TagRule
}

type LogRules

type LogRules struct {
	FilteringTags        *[]FilteringTag             `json:"filteringTags,omitempty"`
	SendAadLogs          *SendAadLogsStatus          `json:"sendAadLogs,omitempty"`
	SendActivityLogs     *SendActivityLogsStatus     `json:"sendActivityLogs,omitempty"`
	SendSubscriptionLogs *SendSubscriptionLogsStatus `json:"sendSubscriptionLogs,omitempty"`
}

type MetricRules

type MetricRules struct {
	FilteringTags *[]FilteringTag    `json:"filteringTags,omitempty"`
	SendMetrics   *SendMetricsStatus `json:"sendMetrics,omitempty"`
	UserEmail     *string            `json:"userEmail,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 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 SendAadLogsStatus

type SendAadLogsStatus string
const (
	SendAadLogsStatusDisabled SendAadLogsStatus = "Disabled"
	SendAadLogsStatusEnabled  SendAadLogsStatus = "Enabled"
)

func (*SendAadLogsStatus) UnmarshalJSON

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

type SendActivityLogsStatus

type SendActivityLogsStatus string
const (
	SendActivityLogsStatusDisabled SendActivityLogsStatus = "Disabled"
	SendActivityLogsStatusEnabled  SendActivityLogsStatus = "Enabled"
)

func (*SendActivityLogsStatus) UnmarshalJSON

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

type SendMetricsStatus

type SendMetricsStatus string
const (
	SendMetricsStatusDisabled SendMetricsStatus = "Disabled"
	SendMetricsStatusEnabled  SendMetricsStatus = "Enabled"
)

func (*SendMetricsStatus) UnmarshalJSON

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

type SendSubscriptionLogsStatus

type SendSubscriptionLogsStatus string
const (
	SendSubscriptionLogsStatusDisabled SendSubscriptionLogsStatus = "Disabled"
	SendSubscriptionLogsStatusEnabled  SendSubscriptionLogsStatus = "Enabled"
)

func (*SendSubscriptionLogsStatus) UnmarshalJSON

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

type TagAction

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

func (*TagAction) UnmarshalJSON

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

type TagRule

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

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 TagRuleOperationPredicate

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

func (TagRuleOperationPredicate) Matches

func (p TagRuleOperationPredicate) Matches(input TagRule) bool

type TagRuleUpdate

type TagRuleUpdate struct {
	Properties *TagRuleUpdateProperties `json:"properties,omitempty"`
}

type TagRuleUpdateProperties

type TagRuleUpdateProperties struct {
	LogRules    *LogRules    `json:"logRules,omitempty"`
	MetricRules *MetricRules `json:"metricRules,omitempty"`
}

type TagRulesClient

type TagRulesClient struct {
	Client *resourcemanager.Client
}

func NewTagRulesClientWithBaseURI

func NewTagRulesClientWithBaseURI(api environments.Api) (*TagRulesClient, error)

func (TagRulesClient) CreateOrUpdate

func (c TagRulesClient) CreateOrUpdate(ctx context.Context, id TagRuleId, input TagRule) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (TagRulesClient) CreateOrUpdateThenPoll

func (c TagRulesClient) CreateOrUpdateThenPoll(ctx context.Context, id TagRuleId, input TagRule) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (TagRulesClient) Delete

func (c TagRulesClient) Delete(ctx context.Context, id TagRuleId) (result DeleteOperationResponse, err error)

Delete ...

func (TagRulesClient) DeleteThenPoll

func (c TagRulesClient) DeleteThenPoll(ctx context.Context, id TagRuleId) error

DeleteThenPoll performs Delete then polls until it's completed

func (TagRulesClient) Get

func (c TagRulesClient) Get(ctx context.Context, id TagRuleId) (result GetOperationResponse, err error)

Get ...

func (TagRulesClient) ListByNewRelicMonitorResource

func (c TagRulesClient) ListByNewRelicMonitorResource(ctx context.Context, id MonitorId) (result ListByNewRelicMonitorResourceOperationResponse, err error)

ListByNewRelicMonitorResource ...

func (TagRulesClient) ListByNewRelicMonitorResourceComplete

func (c TagRulesClient) ListByNewRelicMonitorResourceComplete(ctx context.Context, id MonitorId) (ListByNewRelicMonitorResourceCompleteResult, error)

ListByNewRelicMonitorResourceComplete retrieves all the results into a single object

func (TagRulesClient) ListByNewRelicMonitorResourceCompleteMatchingPredicate

func (c TagRulesClient) ListByNewRelicMonitorResourceCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate TagRuleOperationPredicate) (result ListByNewRelicMonitorResourceCompleteResult, err error)

ListByNewRelicMonitorResourceCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (TagRulesClient) Update

func (c TagRulesClient) Update(ctx context.Context, id TagRuleId, input TagRuleUpdate) (result UpdateOperationResponse, err error)

Update ...

type UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *TagRule
}

Jump to

Keyboard shortcuts

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