routingrules

package
v0.20241212.1154051 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: MPL-2.0 Imports: 13 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-05-01/routingrules Documentation

The routingrules SDK allows for interaction with Azure Resource Manager network (API Version 2024-05-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/network/2024-05-01/routingrules"

Client Initialization

client := routingrules.NewRoutingRulesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: RoutingRulesClient.CreateOrUpdate

ctx := context.TODO()
id := routingrules.NewRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerName", "routingConfigurationName", "ruleCollectionName", "ruleName")

payload := routingrules.RoutingRule{
	// ...
}


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

ctx := context.TODO()
id := routingrules.NewRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerName", "routingConfigurationName", "ruleCollectionName", "ruleName")

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

Example Usage: RoutingRulesClient.Get

ctx := context.TODO()
id := routingrules.NewRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerName", "routingConfigurationName", "ruleCollectionName", "ruleName")

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

ctx := context.TODO()
id := routingrules.NewRuleCollectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerName", "routingConfigurationName", "ruleCollectionName")

// 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
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func PossibleValuesForRoutingRuleDestinationType

func PossibleValuesForRoutingRuleDestinationType() []string

func PossibleValuesForRoutingRuleNextHopType

func PossibleValuesForRoutingRuleNextHopType() []string

func ValidateRuleCollectionID

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

ValidateRuleCollectionID checks that 'input' can be parsed as a Rule Collection ID

func ValidateRuleID

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

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

Types

type CreateOrUpdateOperationResponse

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

type DeleteOperationOptions

type DeleteOperationOptions struct {
	Force *bool
}

func DefaultDeleteOperationOptions

func DefaultDeleteOperationOptions() DeleteOperationOptions

func (DeleteOperationOptions) ToHeaders

func (o DeleteOperationOptions) ToHeaders() *client.Headers

func (DeleteOperationOptions) ToOData

func (o DeleteOperationOptions) ToOData() *odata.Query

func (DeleteOperationOptions) ToQuery

type DeleteOperationResponse

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

type GetOperationResponse

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

type ListCompleteResult

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

type ListCustomPager

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

type ListOperationResponse

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

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateDeleting  ProvisioningState = "Deleting"
	ProvisioningStateFailed    ProvisioningState = "Failed"
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
	ProvisioningStateUpdating  ProvisioningState = "Updating"
)

func (*ProvisioningState) UnmarshalJSON

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

type RoutingRule

type RoutingRule struct {
	Etag       *string                      `json:"etag,omitempty"`
	Id         *string                      `json:"id,omitempty"`
	Name       *string                      `json:"name,omitempty"`
	Properties *RoutingRulePropertiesFormat `json:"properties,omitempty"`
	SystemData *systemdata.SystemData       `json:"systemData,omitempty"`
	Type       *string                      `json:"type,omitempty"`
}

type RoutingRuleDestinationType

type RoutingRuleDestinationType string
const (
	RoutingRuleDestinationTypeAddressPrefix RoutingRuleDestinationType = "AddressPrefix"
	RoutingRuleDestinationTypeServiceTag    RoutingRuleDestinationType = "ServiceTag"
)

func (*RoutingRuleDestinationType) UnmarshalJSON

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

type RoutingRuleNextHop

type RoutingRuleNextHop struct {
	NextHopAddress *string                `json:"nextHopAddress,omitempty"`
	NextHopType    RoutingRuleNextHopType `json:"nextHopType"`
}

type RoutingRuleNextHopType

type RoutingRuleNextHopType string
const (
	RoutingRuleNextHopTypeInternet              RoutingRuleNextHopType = "Internet"
	RoutingRuleNextHopTypeNoNextHop             RoutingRuleNextHopType = "NoNextHop"
	RoutingRuleNextHopTypeVirtualAppliance      RoutingRuleNextHopType = "VirtualAppliance"
	RoutingRuleNextHopTypeVirtualNetworkGateway RoutingRuleNextHopType = "VirtualNetworkGateway"
	RoutingRuleNextHopTypeVnetLocal             RoutingRuleNextHopType = "VnetLocal"
)

func (*RoutingRuleNextHopType) UnmarshalJSON

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

type RoutingRuleOperationPredicate

type RoutingRuleOperationPredicate struct {
	Etag *string
	Id   *string
	Name *string
	Type *string
}

func (RoutingRuleOperationPredicate) Matches

type RoutingRulePropertiesFormat

type RoutingRulePropertiesFormat struct {
	Description       *string                     `json:"description,omitempty"`
	Destination       RoutingRuleRouteDestination `json:"destination"`
	NextHop           RoutingRuleNextHop          `json:"nextHop"`
	ProvisioningState *ProvisioningState          `json:"provisioningState,omitempty"`
	ResourceGuid      *string                     `json:"resourceGuid,omitempty"`
}

type RoutingRuleRouteDestination

type RoutingRuleRouteDestination struct {
	DestinationAddress string                     `json:"destinationAddress"`
	Type               RoutingRuleDestinationType `json:"type"`
}

type RoutingRulesClient

type RoutingRulesClient struct {
	Client *resourcemanager.Client
}

func NewRoutingRulesClientWithBaseURI

func NewRoutingRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*RoutingRulesClient, error)

func (RoutingRulesClient) CreateOrUpdate

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

CreateOrUpdate ...

func (RoutingRulesClient) Delete

Delete ...

func (RoutingRulesClient) DeleteThenPoll

func (c RoutingRulesClient) DeleteThenPoll(ctx context.Context, id RuleId, options DeleteOperationOptions) error

DeleteThenPoll performs Delete then polls until it's completed

func (RoutingRulesClient) Get

func (c RoutingRulesClient) Get(ctx context.Context, id RuleId) (result GetOperationResponse, err error)

Get ...

func (RoutingRulesClient) List

List ...

func (RoutingRulesClient) ListComplete

ListComplete retrieves all the results into a single object

func (RoutingRulesClient) ListCompleteMatchingPredicate

func (c RoutingRulesClient) ListCompleteMatchingPredicate(ctx context.Context, id RuleCollectionId, predicate RoutingRuleOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

type RuleCollectionId

type RuleCollectionId struct {
	SubscriptionId           string
	ResourceGroupName        string
	NetworkManagerName       string
	RoutingConfigurationName string
	RuleCollectionName       string
}

RuleCollectionId is a struct representing the Resource ID for a Rule Collection

func NewRuleCollectionID

func NewRuleCollectionID(subscriptionId string, resourceGroupName string, networkManagerName string, routingConfigurationName string, ruleCollectionName string) RuleCollectionId

NewRuleCollectionID returns a new RuleCollectionId struct

func ParseRuleCollectionID

func ParseRuleCollectionID(input string) (*RuleCollectionId, error)

ParseRuleCollectionID parses 'input' into a RuleCollectionId

func ParseRuleCollectionIDInsensitively

func ParseRuleCollectionIDInsensitively(input string) (*RuleCollectionId, error)

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

func (*RuleCollectionId) FromParseResult

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

func (RuleCollectionId) ID

func (id RuleCollectionId) ID() string

ID returns the formatted Rule Collection ID

func (RuleCollectionId) Segments

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

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

func (RuleCollectionId) String

func (id RuleCollectionId) String() string

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

type RuleId

type RuleId struct {
	SubscriptionId           string
	ResourceGroupName        string
	NetworkManagerName       string
	RoutingConfigurationName string
	RuleCollectionName       string
	RuleName                 string
}

RuleId is a struct representing the Resource ID for a Rule

func NewRuleID

func NewRuleID(subscriptionId string, resourceGroupName string, networkManagerName string, routingConfigurationName string, ruleCollectionName 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

Jump to

Keyboard shortcuts

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