virtualrouterpeerings

package
v0.20231110.1074255 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-05-01/virtualrouterpeerings Documentation

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

Client Initialization

client := virtualrouterpeerings.NewVirtualRouterPeeringsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: VirtualRouterPeeringsClient.CreateOrUpdate

ctx := context.TODO()
id := virtualrouterpeerings.NewVirtualRouterPeeringID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualRouterValue", "peeringValue")

payload := virtualrouterpeerings.VirtualRouterPeering{
	// ...
}


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

Example Usage: VirtualRouterPeeringsClient.Delete

ctx := context.TODO()
id := virtualrouterpeerings.NewVirtualRouterPeeringID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualRouterValue", "peeringValue")

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

Example Usage: VirtualRouterPeeringsClient.Get

ctx := context.TODO()
id := virtualrouterpeerings.NewVirtualRouterPeeringID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualRouterValue", "peeringValue")

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

ctx := context.TODO()
id := virtualrouterpeerings.NewVirtualRouterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualRouterValue")

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

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

ValidateVirtualRouterID checks that 'input' can be parsed as a Virtual Router 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 GetOperationResponse

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

type ListCompleteResult

type ListCompleteResult struct {
	Items []VirtualRouterPeering
}

type ListOperationResponse

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

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 VirtualRouterId

type VirtualRouterId struct {
	SubscriptionId    string
	ResourceGroupName string
	VirtualRouterName string
}

VirtualRouterId is a struct representing the Resource ID for a Virtual Router

func NewVirtualRouterID

func NewVirtualRouterID(subscriptionId string, resourceGroupName string, virtualRouterName string) VirtualRouterId

NewVirtualRouterID returns a new VirtualRouterId struct

func ParseVirtualRouterID

func ParseVirtualRouterID(input string) (*VirtualRouterId, error)

ParseVirtualRouterID parses 'input' into a VirtualRouterId

func ParseVirtualRouterIDInsensitively

func ParseVirtualRouterIDInsensitively(input string) (*VirtualRouterId, error)

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

func (VirtualRouterId) ID

func (id VirtualRouterId) ID() string

ID returns the formatted Virtual Router ID

func (VirtualRouterId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Virtual Router ID

func (VirtualRouterId) String

func (id VirtualRouterId) String() string

String returns a human-readable description of this Virtual Router ID

type VirtualRouterPeering

type VirtualRouterPeering struct {
	Etag       *string                         `json:"etag,omitempty"`
	Id         *string                         `json:"id,omitempty"`
	Name       *string                         `json:"name,omitempty"`
	Properties *VirtualRouterPeeringProperties `json:"properties,omitempty"`
	Type       *string                         `json:"type,omitempty"`
}

type VirtualRouterPeeringOperationPredicate

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

func (VirtualRouterPeeringOperationPredicate) Matches

type VirtualRouterPeeringProperties

type VirtualRouterPeeringProperties struct {
	PeerAsn           *int64             `json:"peerAsn,omitempty"`
	PeerIP            *string            `json:"peerIp,omitempty"`
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"`
}

type VirtualRouterPeeringsClient

type VirtualRouterPeeringsClient struct {
	Client *resourcemanager.Client
}

func NewVirtualRouterPeeringsClientWithBaseURI

func NewVirtualRouterPeeringsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualRouterPeeringsClient, error)

func (VirtualRouterPeeringsClient) CreateOrUpdate

CreateOrUpdate ...

func (VirtualRouterPeeringsClient) CreateOrUpdateThenPoll

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (VirtualRouterPeeringsClient) Delete

Delete ...

func (VirtualRouterPeeringsClient) DeleteThenPoll

DeleteThenPoll performs Delete then polls until it's completed

func (VirtualRouterPeeringsClient) Get

Get ...

func (VirtualRouterPeeringsClient) List

List ...

func (VirtualRouterPeeringsClient) ListComplete

ListComplete retrieves all the results into a single object

func (VirtualRouterPeeringsClient) ListCompleteMatchingPredicate

func (c VirtualRouterPeeringsClient) ListCompleteMatchingPredicate(ctx context.Context, id VirtualRouterId, predicate VirtualRouterPeeringOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate 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