routes

package
v0.20241023.1122425 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/routes Documentation

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

Client Initialization

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

Example Usage: RoutesClient.Create

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

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


if err := client.CreateThenPoll(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", "profileName", "afdEndpointName", "routeName")

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", "profileName", "afdEndpointName", "routeName")

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.ListByEndpoint

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

// alternatively `client.ListByEndpoint(ctx, id)` can be used to do batched pagination
items, err := client.ListByEndpointComplete(ctx, id)
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: RoutesClient.Update

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

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


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForAFDEndpointProtocols

func PossibleValuesForAFDEndpointProtocols() []string

func PossibleValuesForAfdProvisioningState

func PossibleValuesForAfdProvisioningState() []string

func PossibleValuesForAfdQueryStringCachingBehavior

func PossibleValuesForAfdQueryStringCachingBehavior() []string

func PossibleValuesForDeploymentStatus

func PossibleValuesForDeploymentStatus() []string

func PossibleValuesForEnabledState

func PossibleValuesForEnabledState() []string

func PossibleValuesForForwardingProtocol

func PossibleValuesForForwardingProtocol() []string

func PossibleValuesForHTTPSRedirect

func PossibleValuesForHTTPSRedirect() []string

func PossibleValuesForLinkToDefaultDomain

func PossibleValuesForLinkToDefaultDomain() []string

func ValidateAfdEndpointID

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

ValidateAfdEndpointID checks that 'input' can be parsed as a Afd Endpoint ID

func ValidateRouteID

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

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

Types

type AFDEndpointProtocols

type AFDEndpointProtocols string
const (
	AFDEndpointProtocolsHTTP  AFDEndpointProtocols = "Http"
	AFDEndpointProtocolsHTTPS AFDEndpointProtocols = "Https"
)

func (*AFDEndpointProtocols) UnmarshalJSON

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

type ActivatedResourceReference

type ActivatedResourceReference struct {
	Id       *string `json:"id,omitempty"`
	IsActive *bool   `json:"isActive,omitempty"`
}

type AfdEndpointId

type AfdEndpointId struct {
	SubscriptionId    string
	ResourceGroupName string
	ProfileName       string
	AfdEndpointName   string
}

AfdEndpointId is a struct representing the Resource ID for a Afd Endpoint

func NewAfdEndpointID

func NewAfdEndpointID(subscriptionId string, resourceGroupName string, profileName string, afdEndpointName string) AfdEndpointId

NewAfdEndpointID returns a new AfdEndpointId struct

func ParseAfdEndpointID

func ParseAfdEndpointID(input string) (*AfdEndpointId, error)

ParseAfdEndpointID parses 'input' into a AfdEndpointId

func ParseAfdEndpointIDInsensitively

func ParseAfdEndpointIDInsensitively(input string) (*AfdEndpointId, error)

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

func (*AfdEndpointId) FromParseResult

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

func (AfdEndpointId) ID

func (id AfdEndpointId) ID() string

ID returns the formatted Afd Endpoint ID

func (AfdEndpointId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Afd Endpoint ID

func (AfdEndpointId) String

func (id AfdEndpointId) String() string

String returns a human-readable description of this Afd Endpoint ID

type AfdProvisioningState

type AfdProvisioningState string
const (
	AfdProvisioningStateCreating  AfdProvisioningState = "Creating"
	AfdProvisioningStateDeleting  AfdProvisioningState = "Deleting"
	AfdProvisioningStateFailed    AfdProvisioningState = "Failed"
	AfdProvisioningStateSucceeded AfdProvisioningState = "Succeeded"
	AfdProvisioningStateUpdating  AfdProvisioningState = "Updating"
)

func (*AfdProvisioningState) UnmarshalJSON

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

type AfdQueryStringCachingBehavior

type AfdQueryStringCachingBehavior string
const (
	AfdQueryStringCachingBehaviorIgnoreQueryString            AfdQueryStringCachingBehavior = "IgnoreQueryString"
	AfdQueryStringCachingBehaviorIgnoreSpecifiedQueryStrings  AfdQueryStringCachingBehavior = "IgnoreSpecifiedQueryStrings"
	AfdQueryStringCachingBehaviorIncludeSpecifiedQueryStrings AfdQueryStringCachingBehavior = "IncludeSpecifiedQueryStrings"
	AfdQueryStringCachingBehaviorUseQueryString               AfdQueryStringCachingBehavior = "UseQueryString"
)

func (*AfdQueryStringCachingBehavior) UnmarshalJSON

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

type AfdRouteCacheConfiguration

type AfdRouteCacheConfiguration struct {
	CompressionSettings        *CompressionSettings           `json:"compressionSettings,omitempty"`
	QueryParameters            *string                        `json:"queryParameters,omitempty"`
	QueryStringCachingBehavior *AfdQueryStringCachingBehavior `json:"queryStringCachingBehavior,omitempty"`
}

type CompressionSettings

type CompressionSettings struct {
	ContentTypesToCompress *[]string `json:"contentTypesToCompress,omitempty"`
	IsCompressionEnabled   *bool     `json:"isCompressionEnabled,omitempty"`
}

type CreateOperationResponse

type CreateOperationResponse 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 DeploymentStatus

type DeploymentStatus string
const (
	DeploymentStatusFailed     DeploymentStatus = "Failed"
	DeploymentStatusInProgress DeploymentStatus = "InProgress"
	DeploymentStatusNotStarted DeploymentStatus = "NotStarted"
	DeploymentStatusSucceeded  DeploymentStatus = "Succeeded"
)

func (*DeploymentStatus) UnmarshalJSON

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

type EnabledState

type EnabledState string
const (
	EnabledStateDisabled EnabledState = "Disabled"
	EnabledStateEnabled  EnabledState = "Enabled"
)

func (*EnabledState) UnmarshalJSON

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

type ForwardingProtocol

type ForwardingProtocol string
const (
	ForwardingProtocolHTTPOnly     ForwardingProtocol = "HttpOnly"
	ForwardingProtocolHTTPSOnly    ForwardingProtocol = "HttpsOnly"
	ForwardingProtocolMatchRequest ForwardingProtocol = "MatchRequest"
)

func (*ForwardingProtocol) UnmarshalJSON

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

type GetOperationResponse

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

type HTTPSRedirect

type HTTPSRedirect string
const (
	HTTPSRedirectDisabled HTTPSRedirect = "Disabled"
	HTTPSRedirectEnabled  HTTPSRedirect = "Enabled"
)

func (*HTTPSRedirect) UnmarshalJSON

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

type LinkToDefaultDomain

type LinkToDefaultDomain string
const (
	LinkToDefaultDomainDisabled LinkToDefaultDomain = "Disabled"
	LinkToDefaultDomainEnabled  LinkToDefaultDomain = "Enabled"
)

func (*LinkToDefaultDomain) UnmarshalJSON

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

type ListByEndpointCompleteResult

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

type ListByEndpointCustomPager

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

type ListByEndpointOperationResponse

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

type ResourceReference

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

type Route

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

type RouteId

type RouteId struct {
	SubscriptionId    string
	ResourceGroupName string
	ProfileName       string
	AfdEndpointName   string
	RouteName         string
}

RouteId is a struct representing the Resource ID for a Route

func NewRouteID

func NewRouteID(subscriptionId string, resourceGroupName string, profileName string, afdEndpointName 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 RouteOperationPredicate

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

func (RouteOperationPredicate) Matches

func (p RouteOperationPredicate) Matches(input Route) bool

type RouteProperties

type RouteProperties struct {
	CacheConfiguration  *AfdRouteCacheConfiguration   `json:"cacheConfiguration,omitempty"`
	CustomDomains       *[]ActivatedResourceReference `json:"customDomains,omitempty"`
	DeploymentStatus    *DeploymentStatus             `json:"deploymentStatus,omitempty"`
	EnabledState        *EnabledState                 `json:"enabledState,omitempty"`
	EndpointName        *string                       `json:"endpointName,omitempty"`
	ForwardingProtocol  *ForwardingProtocol           `json:"forwardingProtocol,omitempty"`
	HTTPSRedirect       *HTTPSRedirect                `json:"httpsRedirect,omitempty"`
	LinkToDefaultDomain *LinkToDefaultDomain          `json:"linkToDefaultDomain,omitempty"`
	OriginGroup         *ResourceReference            `json:"originGroup,omitempty"`
	OriginPath          *string                       `json:"originPath,omitempty"`
	PatternsToMatch     *[]string                     `json:"patternsToMatch,omitempty"`
	ProvisioningState   *AfdProvisioningState         `json:"provisioningState,omitempty"`
	RuleSets            *[]ResourceReference          `json:"ruleSets,omitempty"`
	SupportedProtocols  *[]AFDEndpointProtocols       `json:"supportedProtocols,omitempty"`
}

type RouteUpdateParameters

type RouteUpdateParameters struct {
	Properties *RouteUpdatePropertiesParameters `json:"properties,omitempty"`
}

type RouteUpdatePropertiesParameters

type RouteUpdatePropertiesParameters struct {
	CacheConfiguration  *AfdRouteCacheConfiguration   `json:"cacheConfiguration,omitempty"`
	CustomDomains       *[]ActivatedResourceReference `json:"customDomains,omitempty"`
	EnabledState        *EnabledState                 `json:"enabledState,omitempty"`
	EndpointName        *string                       `json:"endpointName,omitempty"`
	ForwardingProtocol  *ForwardingProtocol           `json:"forwardingProtocol,omitempty"`
	HTTPSRedirect       *HTTPSRedirect                `json:"httpsRedirect,omitempty"`
	LinkToDefaultDomain *LinkToDefaultDomain          `json:"linkToDefaultDomain,omitempty"`
	OriginGroup         *ResourceReference            `json:"originGroup,omitempty"`
	OriginPath          *string                       `json:"originPath,omitempty"`
	PatternsToMatch     *[]string                     `json:"patternsToMatch,omitempty"`
	RuleSets            *[]ResourceReference          `json:"ruleSets,omitempty"`
	SupportedProtocols  *[]AFDEndpointProtocols       `json:"supportedProtocols,omitempty"`
}

type RoutesClient

type RoutesClient struct {
	Client *resourcemanager.Client
}

func NewRoutesClientWithBaseURI

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

func (RoutesClient) Create

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

Create ...

func (RoutesClient) CreateThenPoll

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

CreateThenPoll performs Create 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) ListByEndpoint

func (c RoutesClient) ListByEndpoint(ctx context.Context, id AfdEndpointId) (result ListByEndpointOperationResponse, err error)

ListByEndpoint ...

func (RoutesClient) ListByEndpointComplete

func (c RoutesClient) ListByEndpointComplete(ctx context.Context, id AfdEndpointId) (ListByEndpointCompleteResult, error)

ListByEndpointComplete retrieves all the results into a single object

func (RoutesClient) ListByEndpointCompleteMatchingPredicate

func (c RoutesClient) ListByEndpointCompleteMatchingPredicate(ctx context.Context, id AfdEndpointId, predicate RouteOperationPredicate) (result ListByEndpointCompleteResult, err error)

ListByEndpointCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (RoutesClient) Update

Update ...

func (RoutesClient) UpdateThenPoll

func (c RoutesClient) UpdateThenPoll(ctx context.Context, id RouteId, input RouteUpdateParameters) error

UpdateThenPoll performs Update then polls until it's completed

type UpdateOperationResponse

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

Jump to

Keyboard shortcuts

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