routes

package
v0.20240320.1000025 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: MPL-2.0 Imports: 11 Imported by: 0

README

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

The routes 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-sdk/resource-manager/network/2023-09-01/routes"

Client Initialization

client := routes.NewRoutesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: RoutesClient.CreateOrUpdate

ctx := context.TODO()
id := routes.NewRouteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "routeTableValue", "routeValue")

payload := routes.Route{
	// ...
}


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

Example Usage: RoutesClient.Delete

ctx := context.TODO()
id := routes.NewRouteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "routeTableValue", "routeValue")

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

Example Usage: RoutesClient.Get

ctx := context.TODO()
id := routes.NewRouteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "routeTableValue", "routeValue")

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

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

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

func PossibleValuesForRouteNextHopType() []string

func ValidateRouteID

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

ValidateRouteID checks that 'input' can be parsed as a Route ID

func ValidateRouteTableID

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

ValidateRouteTableID checks that 'input' can be parsed as a Route Table ID

Types

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Route
}

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        *Route
}

type ListCompleteResult

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

type ListOperationResponse

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

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 Route

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

type RouteId

type RouteId struct {
	SubscriptionId    string
	ResourceGroupName string
	RouteTableName    string
	RouteName         string
}

RouteId is a struct representing the Resource ID for a Route

func NewRouteID

func NewRouteID(subscriptionId string, resourceGroupName string, routeTableName string, routeName string) RouteId

NewRouteID returns a new RouteId struct

func ParseRouteID

func ParseRouteID(input string) (*RouteId, error)

ParseRouteID parses 'input' into a RouteId

func ParseRouteIDInsensitively

func ParseRouteIDInsensitively(input string) (*RouteId, error)

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

func (*RouteId) FromParseResult

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

func (RouteId) ID

func (id RouteId) ID() string

ID returns the formatted Route ID

func (RouteId) Segments

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

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

func (RouteId) String

func (id RouteId) String() string

String returns a human-readable description of this Route ID

type RouteNextHopType

type RouteNextHopType string
const (
	RouteNextHopTypeInternet              RouteNextHopType = "Internet"
	RouteNextHopTypeNone                  RouteNextHopType = "None"
	RouteNextHopTypeVirtualAppliance      RouteNextHopType = "VirtualAppliance"
	RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway"
	RouteNextHopTypeVnetLocal             RouteNextHopType = "VnetLocal"
)

func (*RouteNextHopType) UnmarshalJSON

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

type RouteOperationPredicate

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

func (RouteOperationPredicate) Matches

func (p RouteOperationPredicate) Matches(input Route) bool

type RoutePropertiesFormat

type RoutePropertiesFormat struct {
	AddressPrefix     *string            `json:"addressPrefix,omitempty"`
	HasBgpOverride    *bool              `json:"hasBgpOverride,omitempty"`
	NextHopIPAddress  *string            `json:"nextHopIpAddress,omitempty"`
	NextHopType       RouteNextHopType   `json:"nextHopType"`
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"`
}

type RouteTableId

type RouteTableId struct {
	SubscriptionId    string
	ResourceGroupName string
	RouteTableName    string
}

RouteTableId is a struct representing the Resource ID for a Route Table

func NewRouteTableID

func NewRouteTableID(subscriptionId string, resourceGroupName string, routeTableName string) RouteTableId

NewRouteTableID returns a new RouteTableId struct

func ParseRouteTableID

func ParseRouteTableID(input string) (*RouteTableId, error)

ParseRouteTableID parses 'input' into a RouteTableId

func ParseRouteTableIDInsensitively

func ParseRouteTableIDInsensitively(input string) (*RouteTableId, error)

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

func (*RouteTableId) FromParseResult

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

func (RouteTableId) ID

func (id RouteTableId) ID() string

ID returns the formatted Route Table ID

func (RouteTableId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Route Table ID

func (RouteTableId) String

func (id RouteTableId) String() string

String returns a human-readable description of this Route Table ID

type RoutesClient

type RoutesClient struct {
	Client *resourcemanager.Client
}

func NewRoutesClientWithBaseURI

func NewRoutesClientWithBaseURI(sdkApi sdkEnv.Api) (*RoutesClient, error)

func (RoutesClient) CreateOrUpdate

func (c RoutesClient) CreateOrUpdate(ctx context.Context, id RouteId, input Route) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (RoutesClient) CreateOrUpdateThenPoll

func (c RoutesClient) CreateOrUpdateThenPoll(ctx context.Context, id RouteId, input Route) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (RoutesClient) Delete

func (c RoutesClient) Delete(ctx context.Context, id RouteId) (result DeleteOperationResponse, err error)

Delete ...

func (RoutesClient) DeleteThenPoll

func (c RoutesClient) DeleteThenPoll(ctx context.Context, id RouteId) error

DeleteThenPoll performs Delete then polls until it's completed

func (RoutesClient) Get

func (c RoutesClient) Get(ctx context.Context, id RouteId) (result GetOperationResponse, err error)

Get ...

func (RoutesClient) List

func (c RoutesClient) List(ctx context.Context, id RouteTableId) (result ListOperationResponse, err error)

List ...

func (RoutesClient) ListComplete

func (c RoutesClient) ListComplete(ctx context.Context, id RouteTableId) (ListCompleteResult, error)

ListComplete retrieves all the results into a single object

func (RoutesClient) ListCompleteMatchingPredicate

func (c RoutesClient) ListCompleteMatchingPredicate(ctx context.Context, id RouteTableId, predicate RouteOperationPredicate) (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