afdorigins

package
v0.20241209.1115630 Latest Latest
Warning

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

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

README

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

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

Client Initialization

client := afdorigins.NewAFDOriginsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: AFDOriginsClient.Create

ctx := context.TODO()
id := afdorigins.NewOriginGroupOriginID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileName", "originGroupName", "originName")

payload := afdorigins.AFDOrigin{
	// ...
}


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

Example Usage: AFDOriginsClient.Delete

ctx := context.TODO()
id := afdorigins.NewOriginGroupOriginID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileName", "originGroupName", "originName")

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

Example Usage: AFDOriginsClient.Get

ctx := context.TODO()
id := afdorigins.NewOriginGroupOriginID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileName", "originGroupName", "originName")

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: AFDOriginsClient.ListByOriginGroup

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

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

Example Usage: AFDOriginsClient.Update

ctx := context.TODO()
id := afdorigins.NewOriginGroupOriginID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileName", "originGroupName", "originName")

payload := afdorigins.AFDOriginUpdateParameters{
	// ...
}


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 PossibleValuesForAfdProvisioningState

func PossibleValuesForAfdProvisioningState() []string

func PossibleValuesForDeploymentStatus

func PossibleValuesForDeploymentStatus() []string

func PossibleValuesForEnabledState

func PossibleValuesForEnabledState() []string

func PossibleValuesForSharedPrivateLinkResourceStatus

func PossibleValuesForSharedPrivateLinkResourceStatus() []string

func ValidateOriginGroupID

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

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

func ValidateOriginGroupOriginID

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

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

Types

type AFDOrigin

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

type AFDOriginOperationPredicate

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

func (AFDOriginOperationPredicate) Matches

func (p AFDOriginOperationPredicate) Matches(input AFDOrigin) bool

type AFDOriginProperties

type AFDOriginProperties struct {
	AzureOrigin                 *ResourceReference                   `json:"azureOrigin,omitempty"`
	DeploymentStatus            *DeploymentStatus                    `json:"deploymentStatus,omitempty"`
	EnabledState                *EnabledState                        `json:"enabledState,omitempty"`
	EnforceCertificateNameCheck *bool                                `json:"enforceCertificateNameCheck,omitempty"`
	HTTPPort                    *int64                               `json:"httpPort,omitempty"`
	HTTPSPort                   *int64                               `json:"httpsPort,omitempty"`
	HostName                    *string                              `json:"hostName,omitempty"`
	OriginGroupName             *string                              `json:"originGroupName,omitempty"`
	OriginHostHeader            *string                              `json:"originHostHeader,omitempty"`
	Priority                    *int64                               `json:"priority,omitempty"`
	ProvisioningState           *AfdProvisioningState                `json:"provisioningState,omitempty"`
	SharedPrivateLinkResource   *SharedPrivateLinkResourceProperties `json:"sharedPrivateLinkResource,omitempty"`
	Weight                      *int64                               `json:"weight,omitempty"`
}

type AFDOriginUpdateParameters

type AFDOriginUpdateParameters struct {
	Properties *AFDOriginUpdatePropertiesParameters `json:"properties,omitempty"`
}

type AFDOriginUpdatePropertiesParameters

type AFDOriginUpdatePropertiesParameters struct {
	AzureOrigin                 *ResourceReference                   `json:"azureOrigin,omitempty"`
	EnabledState                *EnabledState                        `json:"enabledState,omitempty"`
	EnforceCertificateNameCheck *bool                                `json:"enforceCertificateNameCheck,omitempty"`
	HTTPPort                    *int64                               `json:"httpPort,omitempty"`
	HTTPSPort                   *int64                               `json:"httpsPort,omitempty"`
	HostName                    *string                              `json:"hostName,omitempty"`
	OriginGroupName             *string                              `json:"originGroupName,omitempty"`
	OriginHostHeader            *string                              `json:"originHostHeader,omitempty"`
	Priority                    *int64                               `json:"priority,omitempty"`
	SharedPrivateLinkResource   *SharedPrivateLinkResourceProperties `json:"sharedPrivateLinkResource,omitempty"`
	Weight                      *int64                               `json:"weight,omitempty"`
}

type AFDOriginsClient

type AFDOriginsClient struct {
	Client *resourcemanager.Client
}

func NewAFDOriginsClientWithBaseURI

func NewAFDOriginsClientWithBaseURI(sdkApi sdkEnv.Api) (*AFDOriginsClient, error)

func (AFDOriginsClient) Create

Create ...

func (AFDOriginsClient) CreateThenPoll

func (c AFDOriginsClient) CreateThenPoll(ctx context.Context, id OriginGroupOriginId, input AFDOrigin) error

CreateThenPoll performs Create then polls until it's completed

func (AFDOriginsClient) Delete

Delete ...

func (AFDOriginsClient) DeleteThenPoll

func (c AFDOriginsClient) DeleteThenPoll(ctx context.Context, id OriginGroupOriginId) error

DeleteThenPoll performs Delete then polls until it's completed

func (AFDOriginsClient) Get

Get ...

func (AFDOriginsClient) ListByOriginGroup

func (c AFDOriginsClient) ListByOriginGroup(ctx context.Context, id OriginGroupId) (result ListByOriginGroupOperationResponse, err error)

ListByOriginGroup ...

func (AFDOriginsClient) ListByOriginGroupComplete

func (c AFDOriginsClient) ListByOriginGroupComplete(ctx context.Context, id OriginGroupId) (ListByOriginGroupCompleteResult, error)

ListByOriginGroupComplete retrieves all the results into a single object

func (AFDOriginsClient) ListByOriginGroupCompleteMatchingPredicate

func (c AFDOriginsClient) ListByOriginGroupCompleteMatchingPredicate(ctx context.Context, id OriginGroupId, predicate AFDOriginOperationPredicate) (result ListByOriginGroupCompleteResult, err error)

ListByOriginGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (AFDOriginsClient) Update

Update ...

func (AFDOriginsClient) UpdateThenPoll

UpdateThenPoll performs Update then polls until it's completed

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 CreateOperationResponse

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

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 GetOperationResponse

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

type ListByOriginGroupCompleteResult

type ListByOriginGroupCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []AFDOrigin
}

type ListByOriginGroupCustomPager

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

type ListByOriginGroupOperationResponse

type ListByOriginGroupOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]AFDOrigin
}

type OriginGroupId

type OriginGroupId struct {
	SubscriptionId    string
	ResourceGroupName string
	ProfileName       string
	OriginGroupName   string
}

OriginGroupId is a struct representing the Resource ID for a Origin Group

func NewOriginGroupID

func NewOriginGroupID(subscriptionId string, resourceGroupName string, profileName string, originGroupName string) OriginGroupId

NewOriginGroupID returns a new OriginGroupId struct

func ParseOriginGroupID

func ParseOriginGroupID(input string) (*OriginGroupId, error)

ParseOriginGroupID parses 'input' into a OriginGroupId

func ParseOriginGroupIDInsensitively

func ParseOriginGroupIDInsensitively(input string) (*OriginGroupId, error)

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

func (*OriginGroupId) FromParseResult

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

func (OriginGroupId) ID

func (id OriginGroupId) ID() string

ID returns the formatted Origin Group ID

func (OriginGroupId) Segments

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

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

func (OriginGroupId) String

func (id OriginGroupId) String() string

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

type OriginGroupOriginId

type OriginGroupOriginId struct {
	SubscriptionId    string
	ResourceGroupName string
	ProfileName       string
	OriginGroupName   string
	OriginName        string
}

OriginGroupOriginId is a struct representing the Resource ID for a Origin Group Origin

func NewOriginGroupOriginID

func NewOriginGroupOriginID(subscriptionId string, resourceGroupName string, profileName string, originGroupName string, originName string) OriginGroupOriginId

NewOriginGroupOriginID returns a new OriginGroupOriginId struct

func ParseOriginGroupOriginID

func ParseOriginGroupOriginID(input string) (*OriginGroupOriginId, error)

ParseOriginGroupOriginID parses 'input' into a OriginGroupOriginId

func ParseOriginGroupOriginIDInsensitively

func ParseOriginGroupOriginIDInsensitively(input string) (*OriginGroupOriginId, error)

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

func (*OriginGroupOriginId) FromParseResult

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

func (OriginGroupOriginId) ID

func (id OriginGroupOriginId) ID() string

ID returns the formatted Origin Group Origin ID

func (OriginGroupOriginId) Segments

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

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

func (OriginGroupOriginId) String

func (id OriginGroupOriginId) String() string

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

type ResourceReference

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

type SharedPrivateLinkResourceProperties

type SharedPrivateLinkResourceProperties struct {
	GroupId             *string                          `json:"groupId,omitempty"`
	PrivateLink         *ResourceReference               `json:"privateLink,omitempty"`
	PrivateLinkLocation *string                          `json:"privateLinkLocation,omitempty"`
	RequestMessage      *string                          `json:"requestMessage,omitempty"`
	Status              *SharedPrivateLinkResourceStatus `json:"status,omitempty"`
}

type SharedPrivateLinkResourceStatus

type SharedPrivateLinkResourceStatus string
const (
	SharedPrivateLinkResourceStatusApproved     SharedPrivateLinkResourceStatus = "Approved"
	SharedPrivateLinkResourceStatusDisconnected SharedPrivateLinkResourceStatus = "Disconnected"
	SharedPrivateLinkResourceStatusPending      SharedPrivateLinkResourceStatus = "Pending"
	SharedPrivateLinkResourceStatusRejected     SharedPrivateLinkResourceStatus = "Rejected"
	SharedPrivateLinkResourceStatusTimeout      SharedPrivateLinkResourceStatus = "Timeout"
)

func (*SharedPrivateLinkResourceStatus) UnmarshalJSON

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

type UpdateOperationResponse

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

Jump to

Keyboard shortcuts

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