tagrules

package
v0.20240527.1094340 Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: MPL-2.0 Imports: 12 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules Documentation

The tagrules SDK allows for interaction with the Azure Resource Manager Service logz (API Version 2020-10-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/logz/2020-10-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.MonitoringTagRules{
	// ...
}


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

Example Usage: TagRulesClient.Delete

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

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

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

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

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

Example Usage: TagRulesClient.SubAccountTagRulesCreateOrUpdate

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

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


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

Example Usage: TagRulesClient.SubAccountTagRulesDelete

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

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

Example Usage: TagRulesClient.SubAccountTagRulesGet

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

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

Example Usage: TagRulesClient.SubAccountTagRulesList

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

// alternatively `client.SubAccountTagRulesList(ctx, id)` can be used to do batched pagination
items, err := client.SubAccountTagRulesListComplete(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 ValidateAccountID

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

ValidateAccountID checks that 'input' can be parsed as a Account ID

func ValidateAccountTagRuleID

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

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

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 AccountId

type AccountId struct {
	SubscriptionId    string
	ResourceGroupName string
	MonitorName       string
	AccountName       string
}

AccountId is a struct representing the Resource ID for a Account

func NewAccountID

func NewAccountID(subscriptionId string, resourceGroupName string, monitorName string, accountName string) AccountId

NewAccountID returns a new AccountId struct

func ParseAccountID

func ParseAccountID(input string) (*AccountId, error)

ParseAccountID parses 'input' into a AccountId

func ParseAccountIDInsensitively

func ParseAccountIDInsensitively(input string) (*AccountId, error)

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

func (*AccountId) FromParseResult

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

func (AccountId) ID

func (id AccountId) ID() string

ID returns the formatted Account ID

func (AccountId) Segments

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

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

func (AccountId) String

func (id AccountId) String() string

String returns a human-readable description of this Account ID

type AccountTagRuleId

type AccountTagRuleId struct {
	SubscriptionId    string
	ResourceGroupName string
	MonitorName       string
	AccountName       string
	TagRuleName       string
}

AccountTagRuleId is a struct representing the Resource ID for a Account Tag Rule

func NewAccountTagRuleID

func NewAccountTagRuleID(subscriptionId string, resourceGroupName string, monitorName string, accountName string, tagRuleName string) AccountTagRuleId

NewAccountTagRuleID returns a new AccountTagRuleId struct

func ParseAccountTagRuleID

func ParseAccountTagRuleID(input string) (*AccountTagRuleId, error)

ParseAccountTagRuleID parses 'input' into a AccountTagRuleId

func ParseAccountTagRuleIDInsensitively

func ParseAccountTagRuleIDInsensitively(input string) (*AccountTagRuleId, error)

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

func (*AccountTagRuleId) FromParseResult

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

func (AccountTagRuleId) ID

func (id AccountTagRuleId) ID() string

ID returns the formatted Account Tag Rule ID

func (AccountTagRuleId) Segments

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

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

func (AccountTagRuleId) String

func (id AccountTagRuleId) String() string

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

type CreateOrUpdateOperationResponse

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

type DeleteOperationResponse

type DeleteOperationResponse struct {
	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        *MonitoringTagRules
}

type ListCompleteResult

type ListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []MonitoringTagRules
}

type ListOperationResponse

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

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) 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 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"`
	SystemData        *systemdata.SystemData `json:"systemData,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 SubAccountTagRulesCreateOrUpdateOperationResponse

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

type SubAccountTagRulesDeleteOperationResponse

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

type SubAccountTagRulesGetOperationResponse

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

type SubAccountTagRulesListCompleteResult

type SubAccountTagRulesListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []MonitoringTagRules
}

type SubAccountTagRulesListOperationResponse

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

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

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

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 TagRulesClient

type TagRulesClient struct {
	Client *resourcemanager.Client
}

func NewTagRulesClientWithBaseURI

func NewTagRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*TagRulesClient, error)

func (TagRulesClient) CreateOrUpdate

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

CreateOrUpdate ...

func (TagRulesClient) Delete

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

Delete ...

func (TagRulesClient) Get

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

Get ...

func (TagRulesClient) List

func (c TagRulesClient) List(ctx context.Context, id MonitorId) (result ListOperationResponse, err error)

List ...

func (TagRulesClient) ListComplete

func (c TagRulesClient) ListComplete(ctx context.Context, id MonitorId) (ListCompleteResult, error)

ListComplete retrieves all the results into a single object

func (TagRulesClient) ListCompleteMatchingPredicate

func (c TagRulesClient) ListCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate MonitoringTagRulesOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (TagRulesClient) SubAccountTagRulesCreateOrUpdate

func (c TagRulesClient) SubAccountTagRulesCreateOrUpdate(ctx context.Context, id AccountTagRuleId, input MonitoringTagRules) (result SubAccountTagRulesCreateOrUpdateOperationResponse, err error)

SubAccountTagRulesCreateOrUpdate ...

func (TagRulesClient) SubAccountTagRulesDelete

func (c TagRulesClient) SubAccountTagRulesDelete(ctx context.Context, id AccountTagRuleId) (result SubAccountTagRulesDeleteOperationResponse, err error)

SubAccountTagRulesDelete ...

func (TagRulesClient) SubAccountTagRulesGet

func (c TagRulesClient) SubAccountTagRulesGet(ctx context.Context, id AccountTagRuleId) (result SubAccountTagRulesGetOperationResponse, err error)

SubAccountTagRulesGet ...

func (TagRulesClient) SubAccountTagRulesList

func (c TagRulesClient) SubAccountTagRulesList(ctx context.Context, id AccountId) (result SubAccountTagRulesListOperationResponse, err error)

SubAccountTagRulesList ...

func (TagRulesClient) SubAccountTagRulesListComplete

func (c TagRulesClient) SubAccountTagRulesListComplete(ctx context.Context, id AccountId) (SubAccountTagRulesListCompleteResult, error)

SubAccountTagRulesListComplete retrieves all the results into a single object

func (TagRulesClient) SubAccountTagRulesListCompleteMatchingPredicate

func (c TagRulesClient) SubAccountTagRulesListCompleteMatchingPredicate(ctx context.Context, id AccountId, predicate MonitoringTagRulesOperationPredicate) (result SubAccountTagRulesListCompleteResult, err error)

SubAccountTagRulesListCompleteMatchingPredicate retrieves all the results and then applies the predicate

Jump to

Keyboard shortcuts

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