origingroups

package
v0.20241021.1074254 Latest Latest
Warning

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

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

README

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

The origingroups 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/origingroups"

Client Initialization

client := origingroups.NewOriginGroupsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: OriginGroupsClient.Create

ctx := context.TODO()
id := origingroups.NewEndpointOriginGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileName", "endpointName", "originGroupName")

payload := origingroups.OriginGroup{
	// ...
}


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

Example Usage: OriginGroupsClient.Delete

ctx := context.TODO()
id := origingroups.NewEndpointOriginGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileName", "endpointName", "originGroupName")

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

Example Usage: OriginGroupsClient.Get

ctx := context.TODO()
id := origingroups.NewEndpointOriginGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileName", "endpointName", "originGroupName")

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

ctx := context.TODO()
id := origingroups.NewEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileName", "endpointName")

// 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: OriginGroupsClient.Update

ctx := context.TODO()
id := origingroups.NewEndpointOriginGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileName", "endpointName", "originGroupName")

payload := origingroups.OriginGroupUpdateParameters{
	// ...
}


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 PossibleValuesForHealthProbeRequestType

func PossibleValuesForHealthProbeRequestType() []string

func PossibleValuesForOriginGroupProvisioningState

func PossibleValuesForOriginGroupProvisioningState() []string

func PossibleValuesForOriginGroupResourceState

func PossibleValuesForOriginGroupResourceState() []string

func PossibleValuesForProbeProtocol

func PossibleValuesForProbeProtocol() []string

func PossibleValuesForResponseBasedDetectedErrorTypes

func PossibleValuesForResponseBasedDetectedErrorTypes() []string

func ValidateEndpointID

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

ValidateEndpointID checks that 'input' can be parsed as a Endpoint ID

func ValidateEndpointOriginGroupID

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

ValidateEndpointOriginGroupID checks that 'input' can be parsed as a Endpoint Origin Group ID

Types

type CreateOperationResponse

type CreateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *OriginGroup
}

type DeleteOperationResponse

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

type EndpointId

type EndpointId struct {
	SubscriptionId    string
	ResourceGroupName string
	ProfileName       string
	EndpointName      string
}

EndpointId is a struct representing the Resource ID for a Endpoint

func NewEndpointID

func NewEndpointID(subscriptionId string, resourceGroupName string, profileName string, endpointName string) EndpointId

NewEndpointID returns a new EndpointId struct

func ParseEndpointID

func ParseEndpointID(input string) (*EndpointId, error)

ParseEndpointID parses 'input' into a EndpointId

func ParseEndpointIDInsensitively

func ParseEndpointIDInsensitively(input string) (*EndpointId, error)

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

func (*EndpointId) FromParseResult

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

func (EndpointId) ID

func (id EndpointId) ID() string

ID returns the formatted Endpoint ID

func (EndpointId) Segments

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

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

func (EndpointId) String

func (id EndpointId) String() string

String returns a human-readable description of this Endpoint ID

type EndpointOriginGroupId

type EndpointOriginGroupId struct {
	SubscriptionId    string
	ResourceGroupName string
	ProfileName       string
	EndpointName      string
	OriginGroupName   string
}

EndpointOriginGroupId is a struct representing the Resource ID for a Endpoint Origin Group

func NewEndpointOriginGroupID

func NewEndpointOriginGroupID(subscriptionId string, resourceGroupName string, profileName string, endpointName string, originGroupName string) EndpointOriginGroupId

NewEndpointOriginGroupID returns a new EndpointOriginGroupId struct

func ParseEndpointOriginGroupID

func ParseEndpointOriginGroupID(input string) (*EndpointOriginGroupId, error)

ParseEndpointOriginGroupID parses 'input' into a EndpointOriginGroupId

func ParseEndpointOriginGroupIDInsensitively

func ParseEndpointOriginGroupIDInsensitively(input string) (*EndpointOriginGroupId, error)

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

func (*EndpointOriginGroupId) FromParseResult

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

func (EndpointOriginGroupId) ID

func (id EndpointOriginGroupId) ID() string

ID returns the formatted Endpoint Origin Group ID

func (EndpointOriginGroupId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Endpoint Origin Group ID

func (EndpointOriginGroupId) String

func (id EndpointOriginGroupId) String() string

String returns a human-readable description of this Endpoint Origin Group ID

type GetOperationResponse

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

type HTTPErrorRangeParameters

type HTTPErrorRangeParameters struct {
	Begin *int64 `json:"begin,omitempty"`
	End   *int64 `json:"end,omitempty"`
}

type HealthProbeParameters

type HealthProbeParameters struct {
	ProbeIntervalInSeconds *int64                  `json:"probeIntervalInSeconds,omitempty"`
	ProbePath              *string                 `json:"probePath,omitempty"`
	ProbeProtocol          *ProbeProtocol          `json:"probeProtocol,omitempty"`
	ProbeRequestType       *HealthProbeRequestType `json:"probeRequestType,omitempty"`
}

type HealthProbeRequestType

type HealthProbeRequestType string
const (
	HealthProbeRequestTypeGET    HealthProbeRequestType = "GET"
	HealthProbeRequestTypeHEAD   HealthProbeRequestType = "HEAD"
	HealthProbeRequestTypeNotSet HealthProbeRequestType = "NotSet"
)

func (*HealthProbeRequestType) UnmarshalJSON

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

type ListByEndpointCompleteResult

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

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        *[]OriginGroup
}

type OriginGroup

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

type OriginGroupOperationPredicate

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

func (OriginGroupOperationPredicate) Matches

type OriginGroupProperties

type OriginGroupProperties struct {
	HealthProbeSettings                                   *HealthProbeParameters                       `json:"healthProbeSettings,omitempty"`
	Origins                                               *[]ResourceReference                         `json:"origins,omitempty"`
	ProvisioningState                                     *OriginGroupProvisioningState                `json:"provisioningState,omitempty"`
	ResourceState                                         *OriginGroupResourceState                    `json:"resourceState,omitempty"`
	ResponseBasedOriginErrorDetectionSettings             *ResponseBasedOriginErrorDetectionParameters `json:"responseBasedOriginErrorDetectionSettings,omitempty"`
	TrafficRestorationTimeToHealedOrNewEndpointsInMinutes *int64                                       `json:"trafficRestorationTimeToHealedOrNewEndpointsInMinutes,omitempty"`
}

type OriginGroupProvisioningState

type OriginGroupProvisioningState string
const (
	OriginGroupProvisioningStateCreating  OriginGroupProvisioningState = "Creating"
	OriginGroupProvisioningStateDeleting  OriginGroupProvisioningState = "Deleting"
	OriginGroupProvisioningStateFailed    OriginGroupProvisioningState = "Failed"
	OriginGroupProvisioningStateSucceeded OriginGroupProvisioningState = "Succeeded"
	OriginGroupProvisioningStateUpdating  OriginGroupProvisioningState = "Updating"
)

func (*OriginGroupProvisioningState) UnmarshalJSON

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

type OriginGroupResourceState

type OriginGroupResourceState string
const (
	OriginGroupResourceStateActive   OriginGroupResourceState = "Active"
	OriginGroupResourceStateCreating OriginGroupResourceState = "Creating"
	OriginGroupResourceStateDeleting OriginGroupResourceState = "Deleting"
)

func (*OriginGroupResourceState) UnmarshalJSON

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

type OriginGroupUpdateParameters

type OriginGroupUpdateParameters struct {
	Properties *OriginGroupUpdatePropertiesParameters `json:"properties,omitempty"`
}

type OriginGroupUpdatePropertiesParameters

type OriginGroupUpdatePropertiesParameters struct {
	HealthProbeSettings                                   *HealthProbeParameters                       `json:"healthProbeSettings,omitempty"`
	Origins                                               *[]ResourceReference                         `json:"origins,omitempty"`
	ResponseBasedOriginErrorDetectionSettings             *ResponseBasedOriginErrorDetectionParameters `json:"responseBasedOriginErrorDetectionSettings,omitempty"`
	TrafficRestorationTimeToHealedOrNewEndpointsInMinutes *int64                                       `json:"trafficRestorationTimeToHealedOrNewEndpointsInMinutes,omitempty"`
}

type OriginGroupsClient

type OriginGroupsClient struct {
	Client *resourcemanager.Client
}

func NewOriginGroupsClientWithBaseURI

func NewOriginGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*OriginGroupsClient, error)

func (OriginGroupsClient) Create

Create ...

func (OriginGroupsClient) CreateThenPoll

func (c OriginGroupsClient) CreateThenPoll(ctx context.Context, id EndpointOriginGroupId, input OriginGroup) error

CreateThenPoll performs Create then polls until it's completed

func (OriginGroupsClient) Delete

Delete ...

func (OriginGroupsClient) DeleteThenPoll

func (c OriginGroupsClient) DeleteThenPoll(ctx context.Context, id EndpointOriginGroupId) error

DeleteThenPoll performs Delete then polls until it's completed

func (OriginGroupsClient) Get

Get ...

func (OriginGroupsClient) ListByEndpoint

func (c OriginGroupsClient) ListByEndpoint(ctx context.Context, id EndpointId) (result ListByEndpointOperationResponse, err error)

ListByEndpoint ...

func (OriginGroupsClient) ListByEndpointComplete

func (c OriginGroupsClient) ListByEndpointComplete(ctx context.Context, id EndpointId) (ListByEndpointCompleteResult, error)

ListByEndpointComplete retrieves all the results into a single object

func (OriginGroupsClient) ListByEndpointCompleteMatchingPredicate

func (c OriginGroupsClient) ListByEndpointCompleteMatchingPredicate(ctx context.Context, id EndpointId, predicate OriginGroupOperationPredicate) (result ListByEndpointCompleteResult, err error)

ListByEndpointCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (OriginGroupsClient) Update

Update ...

func (OriginGroupsClient) UpdateThenPoll

UpdateThenPoll performs Update then polls until it's completed

type ProbeProtocol

type ProbeProtocol string
const (
	ProbeProtocolHTTP   ProbeProtocol = "Http"
	ProbeProtocolHTTPS  ProbeProtocol = "Https"
	ProbeProtocolNotSet ProbeProtocol = "NotSet"
)

func (*ProbeProtocol) UnmarshalJSON

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

type ResourceReference

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

type ResponseBasedDetectedErrorTypes

type ResponseBasedDetectedErrorTypes string
const (
	ResponseBasedDetectedErrorTypesNone             ResponseBasedDetectedErrorTypes = "None"
	ResponseBasedDetectedErrorTypesTcpAndHTTPErrors ResponseBasedDetectedErrorTypes = "TcpAndHttpErrors"
	ResponseBasedDetectedErrorTypesTcpErrorsOnly    ResponseBasedDetectedErrorTypes = "TcpErrorsOnly"
)

func (*ResponseBasedDetectedErrorTypes) UnmarshalJSON

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

type ResponseBasedOriginErrorDetectionParameters

type ResponseBasedOriginErrorDetectionParameters struct {
	HTTPErrorRanges                          *[]HTTPErrorRangeParameters      `json:"httpErrorRanges,omitempty"`
	ResponseBasedDetectedErrorTypes          *ResponseBasedDetectedErrorTypes `json:"responseBasedDetectedErrorTypes,omitempty"`
	ResponseBasedFailoverThresholdPercentage *int64                           `json:"responseBasedFailoverThresholdPercentage,omitempty"`
}

type UpdateOperationResponse

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

Jump to

Keyboard shortcuts

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