rules

package
v0.20240731.1212841 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/rules Documentation

The rules SDK allows for interaction with the Azure Resource Manager Service servicebus (API Version 2021-06-01-preview).

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/servicebus/2021-06-01-preview/rules"

Client Initialization

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

Example Usage: RulesClient.CreateOrUpdate

ctx := context.TODO()
id := rules.NewRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceValue", "topicValue", "subscriptionValue", "ruleValue")

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


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: RulesClient.Delete

ctx := context.TODO()
id := rules.NewRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceValue", "topicValue", "subscriptionValue", "ruleValue")

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: RulesClient.ListBySubscriptions

ctx := context.TODO()
id := rules.NewSubscriptions2ID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceValue", "topicValue", "subscriptionValue")

// alternatively `client.ListBySubscriptions(ctx, id, rules.DefaultListBySubscriptionsOperationOptions())` can be used to do batched pagination
items, err := client.ListBySubscriptionsComplete(ctx, id, rules.DefaultListBySubscriptionsOperationOptions())
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 PossibleValuesForFilterType

func PossibleValuesForFilterType() []string

func ValidateRuleID

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

ValidateRuleID checks that 'input' can be parsed as a Rule ID

func ValidateSubscriptions2ID

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

ValidateSubscriptions2ID checks that 'input' can be parsed as a Subscriptions 2 ID

Types

type Action

type Action struct {
	CompatibilityLevel    *int64  `json:"compatibilityLevel,omitempty"`
	RequiresPreprocessing *bool   `json:"requiresPreprocessing,omitempty"`
	SqlExpression         *string `json:"sqlExpression,omitempty"`
}

type CorrelationFilter

type CorrelationFilter struct {
	ContentType           *string            `json:"contentType,omitempty"`
	CorrelationId         *string            `json:"correlationId,omitempty"`
	Label                 *string            `json:"label,omitempty"`
	MessageId             *string            `json:"messageId,omitempty"`
	Properties            *map[string]string `json:"properties,omitempty"`
	ReplyTo               *string            `json:"replyTo,omitempty"`
	ReplyToSessionId      *string            `json:"replyToSessionId,omitempty"`
	RequiresPreprocessing *bool              `json:"requiresPreprocessing,omitempty"`
	SessionId             *string            `json:"sessionId,omitempty"`
	To                    *string            `json:"to,omitempty"`
}

type CreateOrUpdateOperationResponse

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

type DeleteOperationResponse

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

type FilterType

type FilterType string
const (
	FilterTypeCorrelationFilter FilterType = "CorrelationFilter"
	FilterTypeSqlFilter         FilterType = "SqlFilter"
)

func (*FilterType) UnmarshalJSON

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

type ListBySubscriptionsCompleteResult

type ListBySubscriptionsCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Rule
}

type ListBySubscriptionsCustomPager added in v0.20240628.1153531

type ListBySubscriptionsCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ListBySubscriptionsCustomPager) NextPageLink() *odata.Link

type ListBySubscriptionsOperationOptions

type ListBySubscriptionsOperationOptions struct {
	Skip *int64
	Top  *int64
}

func DefaultListBySubscriptionsOperationOptions

func DefaultListBySubscriptionsOperationOptions() ListBySubscriptionsOperationOptions

func (ListBySubscriptionsOperationOptions) ToHeaders

func (ListBySubscriptionsOperationOptions) ToOData

func (ListBySubscriptionsOperationOptions) ToQuery

type ListBySubscriptionsOperationResponse

type ListBySubscriptionsOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Rule
}

type Rule

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

type RuleId

type RuleId struct {
	SubscriptionId    string
	ResourceGroupName string
	NamespaceName     string
	TopicName         string
	SubscriptionName  string
	RuleName          string
}

RuleId is a struct representing the Resource ID for a Rule

func NewRuleID

func NewRuleID(subscriptionId string, resourceGroupName string, namespaceName string, topicName string, subscriptionName string, ruleName string) RuleId

NewRuleID returns a new RuleId struct

func ParseRuleID

func ParseRuleID(input string) (*RuleId, error)

ParseRuleID parses 'input' into a RuleId

func ParseRuleIDInsensitively

func ParseRuleIDInsensitively(input string) (*RuleId, error)

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

func (*RuleId) FromParseResult

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

func (RuleId) ID

func (id RuleId) ID() string

ID returns the formatted Rule ID

func (RuleId) Segments

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

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

func (RuleId) String

func (id RuleId) String() string

String returns a human-readable description of this Rule ID

type RuleOperationPredicate

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

func (RuleOperationPredicate) Matches

func (p RuleOperationPredicate) Matches(input Rule) bool

type Ruleproperties

type Ruleproperties struct {
	Action            *Action            `json:"action,omitempty"`
	CorrelationFilter *CorrelationFilter `json:"correlationFilter,omitempty"`
	FilterType        *FilterType        `json:"filterType,omitempty"`
	SqlFilter         *SqlFilter         `json:"sqlFilter,omitempty"`
}

type RulesClient

type RulesClient struct {
	Client *resourcemanager.Client
}

func NewRulesClientWithBaseURI

func NewRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*RulesClient, error)

func (RulesClient) CreateOrUpdate

func (c RulesClient) CreateOrUpdate(ctx context.Context, id RuleId, input Rule) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (RulesClient) Delete

func (c RulesClient) Delete(ctx context.Context, id RuleId) (result DeleteOperationResponse, err error)

Delete ...

func (RulesClient) ListBySubscriptions

ListBySubscriptions ...

func (RulesClient) ListBySubscriptionsComplete

ListBySubscriptionsComplete retrieves all the results into a single object

func (RulesClient) ListBySubscriptionsCompleteMatchingPredicate

func (c RulesClient) ListBySubscriptionsCompleteMatchingPredicate(ctx context.Context, id Subscriptions2Id, options ListBySubscriptionsOperationOptions, predicate RuleOperationPredicate) (result ListBySubscriptionsCompleteResult, err error)

ListBySubscriptionsCompleteMatchingPredicate retrieves all the results and then applies the predicate

type SqlFilter

type SqlFilter struct {
	CompatibilityLevel    *int64  `json:"compatibilityLevel,omitempty"`
	RequiresPreprocessing *bool   `json:"requiresPreprocessing,omitempty"`
	SqlExpression         *string `json:"sqlExpression,omitempty"`
}

type Subscriptions2Id

type Subscriptions2Id struct {
	SubscriptionId    string
	ResourceGroupName string
	NamespaceName     string
	TopicName         string
	SubscriptionName  string
}

Subscriptions2Id is a struct representing the Resource ID for a Subscriptions 2

func NewSubscriptions2ID

func NewSubscriptions2ID(subscriptionId string, resourceGroupName string, namespaceName string, topicName string, subscriptionName string) Subscriptions2Id

NewSubscriptions2ID returns a new Subscriptions2Id struct

func ParseSubscriptions2ID

func ParseSubscriptions2ID(input string) (*Subscriptions2Id, error)

ParseSubscriptions2ID parses 'input' into a Subscriptions2Id

func ParseSubscriptions2IDInsensitively

func ParseSubscriptions2IDInsensitively(input string) (*Subscriptions2Id, error)

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

func (*Subscriptions2Id) FromParseResult

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

func (Subscriptions2Id) ID

func (id Subscriptions2Id) ID() string

ID returns the formatted Subscriptions 2 ID

func (Subscriptions2Id) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Subscriptions 2 ID

func (Subscriptions2Id) String

func (id Subscriptions2Id) String() string

String returns a human-readable description of this Subscriptions 2 ID

Jump to

Keyboard shortcuts

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