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 ¶
- func PossibleValuesForOriginProvisioningState() []string
- func PossibleValuesForOriginResourceState() []string
- func PossibleValuesForPrivateEndpointStatus() []string
- func ValidateEndpointID(input interface{}, key string) (warnings []string, errors []error)
- func ValidateOriginID(input interface{}, key string) (warnings []string, errors []error)
- type CreateOperationResponse
- type DeleteOperationResponse
- type EndpointId
- type GetOperationResponse
- type ListByEndpointCompleteResult
- type ListByEndpointCustomPager
- type ListByEndpointOperationResponse
- type Origin
- type OriginId
- type OriginOperationPredicate
- type OriginProperties
- type OriginProvisioningState
- type OriginResourceState
- type OriginUpdateParameters
- type OriginUpdatePropertiesParameters
- type OriginsClient
- func (c OriginsClient) Create(ctx context.Context, id OriginId, input Origin) (result CreateOperationResponse, err error)
- func (c OriginsClient) CreateThenPoll(ctx context.Context, id OriginId, input Origin) error
- func (c OriginsClient) Delete(ctx context.Context, id OriginId) (result DeleteOperationResponse, err error)
- func (c OriginsClient) DeleteThenPoll(ctx context.Context, id OriginId) error
- func (c OriginsClient) Get(ctx context.Context, id OriginId) (result GetOperationResponse, err error)
- func (c OriginsClient) ListByEndpoint(ctx context.Context, id EndpointId) (result ListByEndpointOperationResponse, err error)
- func (c OriginsClient) ListByEndpointComplete(ctx context.Context, id EndpointId) (ListByEndpointCompleteResult, error)
- func (c OriginsClient) ListByEndpointCompleteMatchingPredicate(ctx context.Context, id EndpointId, predicate OriginOperationPredicate) (result ListByEndpointCompleteResult, err error)
- func (c OriginsClient) Update(ctx context.Context, id OriginId, input OriginUpdateParameters) (result UpdateOperationResponse, err error)
- func (c OriginsClient) UpdateThenPoll(ctx context.Context, id OriginId, input OriginUpdateParameters) error
- type PrivateEndpointStatus
- type UpdateOperationResponse
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 ¶
ValidateEndpointID checks that 'input' can be parsed as a Endpoint ID
func ValidateOriginID ¶
ValidateOriginID checks that 'input' can be parsed as a Origin ID
Types ¶
type CreateOperationResponse ¶
type DeleteOperationResponse ¶
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) 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 ListByEndpointCustomPager ¶
func (*ListByEndpointCustomPager) NextPageLink ¶
func (p *ListByEndpointCustomPager) NextPageLink() *odata.Link
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 ¶
ParseOriginID parses 'input' into a OriginId
func ParseOriginIDInsensitively ¶
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) Segments ¶
func (id OriginId) Segments() []resourceids.Segment
Segments returns a slice of Resource ID Segments which comprise this Origin ID
type OriginOperationPredicate ¶
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 ¶
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 ¶
func (c OriginsClient) Update(ctx context.Context, id OriginId, input OriginUpdateParameters) (result UpdateOperationResponse, err error)
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