appresiliency

package
v0.20241118.1115603 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: MPL-2.0 Imports: 11 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/appresiliency Documentation

The appresiliency SDK allows for interaction with Azure Resource Manager containerapps (API Version 2024-02-02-preview).

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/containerapps/2024-02-02-preview/appresiliency"

Client Initialization

client := appresiliency.NewAppResiliencyClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: AppResiliencyClient.CreateOrUpdate

ctx := context.TODO()
id := appresiliency.NewResiliencyPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "containerAppName", "resiliencyPolicyName")

payload := appresiliency.AppResiliency{
	// ...
}


read, err := client.CreateOrUpdate(ctx, id, payload)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: AppResiliencyClient.Delete

ctx := context.TODO()
id := appresiliency.NewResiliencyPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "containerAppName", "resiliencyPolicyName")

read, err := client.Delete(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: AppResiliencyClient.Get

ctx := context.TODO()
id := appresiliency.NewResiliencyPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "containerAppName", "resiliencyPolicyName")

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: AppResiliencyClient.List

ctx := context.TODO()
id := appresiliency.NewContainerAppID("12345678-1234-9876-4563-123456789012", "example-resource-group", "containerAppName")

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

Example Usage: AppResiliencyClient.Update

ctx := context.TODO()
id := appresiliency.NewResiliencyPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "containerAppName", "resiliencyPolicyName")

payload := appresiliency.AppResiliency{
	// ...
}


read, err := client.Update(ctx, id, payload)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateContainerAppID

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

ValidateContainerAppID checks that 'input' can be parsed as a Container App ID

func ValidateResiliencyPolicyID

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

ValidateResiliencyPolicyID checks that 'input' can be parsed as a Resiliency Policy ID

Types

type AppResiliency

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

type AppResiliencyClient

type AppResiliencyClient struct {
	Client *resourcemanager.Client
}

func NewAppResiliencyClientWithBaseURI

func NewAppResiliencyClientWithBaseURI(sdkApi sdkEnv.Api) (*AppResiliencyClient, error)

func (AppResiliencyClient) CreateOrUpdate

CreateOrUpdate ...

func (AppResiliencyClient) Delete

Delete ...

func (AppResiliencyClient) Get

Get ...

func (AppResiliencyClient) List

List ...

func (AppResiliencyClient) ListComplete

ListComplete retrieves all the results into a single object

func (AppResiliencyClient) ListCompleteMatchingPredicate

func (c AppResiliencyClient) ListCompleteMatchingPredicate(ctx context.Context, id ContainerAppId, predicate AppResiliencyOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (AppResiliencyClient) Update

Update ...

type AppResiliencyOperationPredicate

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

func (AppResiliencyOperationPredicate) Matches

type AppResiliencyProperties

type AppResiliencyProperties struct {
	CircuitBreakerPolicy *CircuitBreakerPolicy `json:"circuitBreakerPolicy,omitempty"`
	HTTPConnectionPool   *HTTPConnectionPool   `json:"httpConnectionPool,omitempty"`
	HTTPRetryPolicy      *HTTPRetryPolicy      `json:"httpRetryPolicy,omitempty"`
	TcpConnectionPool    *TcpConnectionPool    `json:"tcpConnectionPool,omitempty"`
	TcpRetryPolicy       *TcpRetryPolicy       `json:"tcpRetryPolicy,omitempty"`
	TimeoutPolicy        *TimeoutPolicy        `json:"timeoutPolicy,omitempty"`
}

type CircuitBreakerPolicy

type CircuitBreakerPolicy struct {
	ConsecutiveErrors  *int64 `json:"consecutiveErrors,omitempty"`
	IntervalInSeconds  *int64 `json:"intervalInSeconds,omitempty"`
	MaxEjectionPercent *int64 `json:"maxEjectionPercent,omitempty"`
}

type ContainerAppId

type ContainerAppId struct {
	SubscriptionId    string
	ResourceGroupName string
	ContainerAppName  string
}

ContainerAppId is a struct representing the Resource ID for a Container App

func NewContainerAppID

func NewContainerAppID(subscriptionId string, resourceGroupName string, containerAppName string) ContainerAppId

NewContainerAppID returns a new ContainerAppId struct

func ParseContainerAppID

func ParseContainerAppID(input string) (*ContainerAppId, error)

ParseContainerAppID parses 'input' into a ContainerAppId

func ParseContainerAppIDInsensitively

func ParseContainerAppIDInsensitively(input string) (*ContainerAppId, error)

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

func (*ContainerAppId) FromParseResult

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

func (ContainerAppId) ID

func (id ContainerAppId) ID() string

ID returns the formatted Container App ID

func (ContainerAppId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Container App ID

func (ContainerAppId) String

func (id ContainerAppId) String() string

String returns a human-readable description of this Container App ID

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *AppResiliency
}

type DeleteOperationResponse

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

type GetOperationResponse

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

type HTTPConnectionPool

type HTTPConnectionPool struct {
	HTTP1MaxPendingRequests *int64 `json:"http1MaxPendingRequests,omitempty"`
	HTTP2MaxRequests        *int64 `json:"http2MaxRequests,omitempty"`
}

type HTTPRetryPolicy

type HTTPRetryPolicy struct {
	Matches      *HTTPRetryPolicyMatches      `json:"matches,omitempty"`
	MaxRetries   *int64                       `json:"maxRetries,omitempty"`
	RetryBackOff *HTTPRetryPolicyRetryBackOff `json:"retryBackOff,omitempty"`
}

type HTTPRetryPolicyMatches

type HTTPRetryPolicyMatches struct {
	Errors          *[]string      `json:"errors,omitempty"`
	HTTPStatusCodes *[]int64       `json:"httpStatusCodes,omitempty"`
	Headers         *[]HeaderMatch `json:"headers,omitempty"`
}

type HTTPRetryPolicyRetryBackOff

type HTTPRetryPolicyRetryBackOff struct {
	InitialDelayInMilliseconds *int64 `json:"initialDelayInMilliseconds,omitempty"`
	MaxIntervalInMilliseconds  *int64 `json:"maxIntervalInMilliseconds,omitempty"`
}

type HeaderMatch

type HeaderMatch struct {
	Header *string           `json:"header,omitempty"`
	Match  *HeaderMatchMatch `json:"match,omitempty"`
}

type HeaderMatchMatch

type HeaderMatchMatch struct {
	ExactMatch  *string `json:"exactMatch,omitempty"`
	PrefixMatch *string `json:"prefixMatch,omitempty"`
	RegexMatch  *string `json:"regexMatch,omitempty"`
	SuffixMatch *string `json:"suffixMatch,omitempty"`
}

type ListCompleteResult

type ListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []AppResiliency
}

type ListCustomPager

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

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]AppResiliency
}

type ResiliencyPolicyId

type ResiliencyPolicyId struct {
	SubscriptionId       string
	ResourceGroupName    string
	ContainerAppName     string
	ResiliencyPolicyName string
}

ResiliencyPolicyId is a struct representing the Resource ID for a Resiliency Policy

func NewResiliencyPolicyID

func NewResiliencyPolicyID(subscriptionId string, resourceGroupName string, containerAppName string, resiliencyPolicyName string) ResiliencyPolicyId

NewResiliencyPolicyID returns a new ResiliencyPolicyId struct

func ParseResiliencyPolicyID

func ParseResiliencyPolicyID(input string) (*ResiliencyPolicyId, error)

ParseResiliencyPolicyID parses 'input' into a ResiliencyPolicyId

func ParseResiliencyPolicyIDInsensitively

func ParseResiliencyPolicyIDInsensitively(input string) (*ResiliencyPolicyId, error)

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

func (*ResiliencyPolicyId) FromParseResult

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

func (ResiliencyPolicyId) ID

func (id ResiliencyPolicyId) ID() string

ID returns the formatted Resiliency Policy ID

func (ResiliencyPolicyId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Resiliency Policy ID

func (ResiliencyPolicyId) String

func (id ResiliencyPolicyId) String() string

String returns a human-readable description of this Resiliency Policy ID

type TcpConnectionPool

type TcpConnectionPool struct {
	MaxConnections *int64 `json:"maxConnections,omitempty"`
}

type TcpRetryPolicy

type TcpRetryPolicy struct {
	MaxConnectAttempts *int64 `json:"maxConnectAttempts,omitempty"`
}

type TimeoutPolicy

type TimeoutPolicy struct {
	ConnectionTimeoutInSeconds *int64 `json:"connectionTimeoutInSeconds,omitempty"`
	ResponseTimeoutInSeconds   *int64 `json:"responseTimeoutInSeconds,omitempty"`
}

type UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *AppResiliency
}

Jump to

Keyboard shortcuts

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