origins

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: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-09-01/origins Documentation

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

Client Initialization

client := origins.NewOriginsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: OriginsClient.Create

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

payload := origins.Origin{
	// ...
}


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

Example Usage: OriginsClient.Delete

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

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

Example Usage: OriginsClient.Get

ctx := context.TODO()
id := origins.NewOriginID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileName", "endpointName", "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: OriginsClient.ListByEndpoint

ctx := context.TODO()
id := origins.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: OriginsClient.Update

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

payload := origins.OriginUpdateParameters{
	// ...
}


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 PossibleValuesForOriginProvisioningState

func PossibleValuesForOriginProvisioningState() []string

func PossibleValuesForOriginResourceState

func PossibleValuesForOriginResourceState() []string

func PossibleValuesForPrivateEndpointStatus

func PossibleValuesForPrivateEndpointStatus() []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 ValidateOriginID

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

ValidateOriginID checks that 'input' can be parsed as a Origin ID

Types

type CreateOperationResponse

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

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 GetOperationResponse

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

type ListByEndpointCompleteResult

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

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

type Origin

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

type OriginId

type OriginId struct {
	SubscriptionId    string
	ResourceGroupName string
	ProfileName       string
	EndpointName      string
	OriginName        string
}

OriginId is a struct representing the Resource ID for a Origin

func NewOriginID

func NewOriginID(subscriptionId string, resourceGroupName string, profileName string, endpointName string, originName string) OriginId

NewOriginID returns a new OriginId struct

func ParseOriginID

func ParseOriginID(input string) (*OriginId, error)

ParseOriginID parses 'input' into a OriginId

func ParseOriginIDInsensitively

func ParseOriginIDInsensitively(input string) (*OriginId, error)

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

func (*OriginId) FromParseResult

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

func (OriginId) ID

func (id OriginId) ID() string

ID returns the formatted Origin ID

func (OriginId) Segments

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

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

func (OriginId) String

func (id OriginId) String() string

String returns a human-readable description of this Origin ID

type OriginOperationPredicate

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

func (OriginOperationPredicate) Matches

func (p OriginOperationPredicate) Matches(input Origin) bool

type OriginProperties

type OriginProperties struct {
	Enabled                    *bool                    `json:"enabled,omitempty"`
	HTTPPort                   *int64                   `json:"httpPort,omitempty"`
	HTTPSPort                  *int64                   `json:"httpsPort,omitempty"`
	HostName                   *string                  `json:"hostName,omitempty"`
	OriginHostHeader           *string                  `json:"originHostHeader,omitempty"`
	Priority                   *int64                   `json:"priority,omitempty"`
	PrivateEndpointStatus      *PrivateEndpointStatus   `json:"privateEndpointStatus,omitempty"`
	PrivateLinkAlias           *string                  `json:"privateLinkAlias,omitempty"`
	PrivateLinkApprovalMessage *string                  `json:"privateLinkApprovalMessage,omitempty"`
	PrivateLinkLocation        *string                  `json:"privateLinkLocation,omitempty"`
	PrivateLinkResourceId      *string                  `json:"privateLinkResourceId,omitempty"`
	ProvisioningState          *OriginProvisioningState `json:"provisioningState,omitempty"`
	ResourceState              *OriginResourceState     `json:"resourceState,omitempty"`
	Weight                     *int64                   `json:"weight,omitempty"`
}

type OriginProvisioningState

type OriginProvisioningState string
const (
	OriginProvisioningStateCreating  OriginProvisioningState = "Creating"
	OriginProvisioningStateDeleting  OriginProvisioningState = "Deleting"
	OriginProvisioningStateFailed    OriginProvisioningState = "Failed"
	OriginProvisioningStateSucceeded OriginProvisioningState = "Succeeded"
	OriginProvisioningStateUpdating  OriginProvisioningState = "Updating"
)

func (*OriginProvisioningState) UnmarshalJSON

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

type OriginResourceState

type OriginResourceState string
const (
	OriginResourceStateActive   OriginResourceState = "Active"
	OriginResourceStateCreating OriginResourceState = "Creating"
	OriginResourceStateDeleting OriginResourceState = "Deleting"
)

func (*OriginResourceState) UnmarshalJSON

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

type OriginUpdateParameters

type OriginUpdateParameters struct {
	Properties *OriginUpdatePropertiesParameters `json:"properties,omitempty"`
}

type OriginUpdatePropertiesParameters

type OriginUpdatePropertiesParameters struct {
	Enabled                    *bool   `json:"enabled,omitempty"`
	HTTPPort                   *int64  `json:"httpPort,omitempty"`
	HTTPSPort                  *int64  `json:"httpsPort,omitempty"`
	HostName                   *string `json:"hostName,omitempty"`
	OriginHostHeader           *string `json:"originHostHeader,omitempty"`
	Priority                   *int64  `json:"priority,omitempty"`
	PrivateLinkAlias           *string `json:"privateLinkAlias,omitempty"`
	PrivateLinkApprovalMessage *string `json:"privateLinkApprovalMessage,omitempty"`
	PrivateLinkLocation        *string `json:"privateLinkLocation,omitempty"`
	PrivateLinkResourceId      *string `json:"privateLinkResourceId,omitempty"`
	Weight                     *int64  `json:"weight,omitempty"`
}

type OriginsClient

type OriginsClient struct {
	Client *resourcemanager.Client
}

func NewOriginsClientWithBaseURI

func NewOriginsClientWithBaseURI(sdkApi sdkEnv.Api) (*OriginsClient, error)

func (OriginsClient) Create

func (c OriginsClient) Create(ctx context.Context, id OriginId, input Origin) (result CreateOperationResponse, err error)

Create ...

func (OriginsClient) CreateThenPoll

func (c OriginsClient) CreateThenPoll(ctx context.Context, id OriginId, input Origin) error

CreateThenPoll performs Create then polls until it's completed

func (OriginsClient) Delete

func (c OriginsClient) Delete(ctx context.Context, id OriginId) (result DeleteOperationResponse, err error)

Delete ...

func (OriginsClient) DeleteThenPoll

func (c OriginsClient) DeleteThenPoll(ctx context.Context, id OriginId) error

DeleteThenPoll performs Delete then polls until it's completed

func (OriginsClient) Get

func (c OriginsClient) Get(ctx context.Context, id OriginId) (result GetOperationResponse, err error)

Get ...

func (OriginsClient) ListByEndpoint

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

ListByEndpoint ...

func (OriginsClient) ListByEndpointComplete

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

ListByEndpointComplete retrieves all the results into a single object

func (OriginsClient) ListByEndpointCompleteMatchingPredicate

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

ListByEndpointCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (OriginsClient) Update

Update ...

func (OriginsClient) UpdateThenPoll

func (c OriginsClient) UpdateThenPoll(ctx context.Context, id OriginId, input OriginUpdateParameters) error

UpdateThenPoll performs Update then polls until it's completed

type PrivateEndpointStatus

type PrivateEndpointStatus string
const (
	PrivateEndpointStatusApproved     PrivateEndpointStatus = "Approved"
	PrivateEndpointStatusDisconnected PrivateEndpointStatus = "Disconnected"
	PrivateEndpointStatusPending      PrivateEndpointStatus = "Pending"
	PrivateEndpointStatusRejected     PrivateEndpointStatus = "Rejected"
	PrivateEndpointStatusTimeout      PrivateEndpointStatus = "Timeout"
)

func (*PrivateEndpointStatus) UnmarshalJSON

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

type UpdateOperationResponse

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

Jump to

Keyboard shortcuts

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