virtualrouters

package
v0.20240524.1090207 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/virtualrouters Documentation

The virtualrouters SDK allows for interaction with the Azure Resource Manager Service network (API Version 2023-09-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-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/virtualrouters"

Client Initialization

client := virtualrouters.NewVirtualRoutersClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: VirtualRoutersClient.CreateOrUpdate

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

payload := virtualrouters.VirtualRouter{
	// ...
}


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

Example Usage: VirtualRoutersClient.Delete

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

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

Example Usage: VirtualRoutersClient.Get

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

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

Example Usage: VirtualRoutersClient.List

ctx := context.TODO()
id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

// 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: VirtualRoutersClient.ListByResourceGroup

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

// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination
items, err := client.ListByResourceGroupComplete(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
	Model        *VirtualRouter
}

type DeleteOperationResponse

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

type GetOperationOptions

type GetOperationOptions struct {
	Expand *string
}

func DefaultGetOperationOptions

func DefaultGetOperationOptions() GetOperationOptions

func (GetOperationOptions) ToHeaders

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

func (GetOperationOptions) ToOData

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

func (GetOperationOptions) ToQuery

func (o GetOperationOptions) ToQuery() *client.QueryParams

type GetOperationResponse

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

type ListByResourceGroupCompleteResult

type ListByResourceGroupCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []VirtualRouter
}

type ListByResourceGroupOperationResponse

type ListByResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]VirtualRouter
}

type ListCompleteResult

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

type ListOperationResponse

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

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 SubResource

type SubResource struct {
	Id *string `json:"id,omitempty"`
}

type VirtualRouter

type VirtualRouter struct {
	Etag       *string                        `json:"etag,omitempty"`
	Id         *string                        `json:"id,omitempty"`
	Location   *string                        `json:"location,omitempty"`
	Name       *string                        `json:"name,omitempty"`
	Properties *VirtualRouterPropertiesFormat `json:"properties,omitempty"`
	Tags       *map[string]string             `json:"tags,omitempty"`
	Type       *string                        `json:"type,omitempty"`
}

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

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

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 VirtualRouterOperationPredicate

type VirtualRouterOperationPredicate struct {
	Etag     *string
	Id       *string
	Location *string
	Name     *string
	Type     *string
}

func (VirtualRouterOperationPredicate) Matches

type VirtualRouterPropertiesFormat

type VirtualRouterPropertiesFormat struct {
	HostedGateway     *SubResource       `json:"hostedGateway,omitempty"`
	HostedSubnet      *SubResource       `json:"hostedSubnet,omitempty"`
	Peerings          *[]SubResource     `json:"peerings,omitempty"`
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"`
	VirtualRouterAsn  *int64             `json:"virtualRouterAsn,omitempty"`
	VirtualRouterIPs  *[]string          `json:"virtualRouterIps,omitempty"`
}

type VirtualRoutersClient

type VirtualRoutersClient struct {
	Client *resourcemanager.Client
}

func NewVirtualRoutersClientWithBaseURI

func NewVirtualRoutersClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualRoutersClient, error)

func (VirtualRoutersClient) CreateOrUpdate

CreateOrUpdate ...

func (VirtualRoutersClient) CreateOrUpdateThenPoll

func (c VirtualRoutersClient) CreateOrUpdateThenPoll(ctx context.Context, id VirtualRouterId, input VirtualRouter) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (VirtualRoutersClient) Delete

Delete ...

func (VirtualRoutersClient) DeleteThenPoll

func (c VirtualRoutersClient) DeleteThenPoll(ctx context.Context, id VirtualRouterId) error

DeleteThenPoll performs Delete then polls until it's completed

func (VirtualRoutersClient) Get

Get ...

func (VirtualRoutersClient) List

List ...

func (VirtualRoutersClient) ListByResourceGroup

ListByResourceGroup ...

func (VirtualRoutersClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all the results into a single object

func (VirtualRoutersClient) ListByResourceGroupCompleteMatchingPredicate

func (c VirtualRoutersClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate VirtualRouterOperationPredicate) (result ListByResourceGroupCompleteResult, err error)

ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (VirtualRoutersClient) ListComplete

ListComplete retrieves all the results into a single object

func (VirtualRoutersClient) ListCompleteMatchingPredicate

func (c VirtualRoutersClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate VirtualRouterOperationPredicate) (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