containerappsrevisions

package
v0.20240404.1103618 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/containerappsrevisions Documentation

The containerappsrevisions SDK allows for interaction with the Azure Resource Manager Service containerapps (API Version 2023-05-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/containerapps/2023-05-01/containerappsrevisions"

Client Initialization

client := containerappsrevisions.NewContainerAppsRevisionsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ContainerAppsRevisionsClient.ActivateRevision

ctx := context.TODO()
id := containerappsrevisions.NewRevisionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "containerAppValue", "revisionValue")

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

Example Usage: ContainerAppsRevisionsClient.DeactivateRevision

ctx := context.TODO()
id := containerappsrevisions.NewRevisionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "containerAppValue", "revisionValue")

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

Example Usage: ContainerAppsRevisionsClient.GetRevision

ctx := context.TODO()
id := containerappsrevisions.NewRevisionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "containerAppValue", "revisionValue")

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

Example Usage: ContainerAppsRevisionsClient.ListRevisions

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

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

Example Usage: ContainerAppsRevisionsClient.RestartRevision

ctx := context.TODO()
id := containerappsrevisions.NewRevisionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "containerAppValue", "revisionValue")

read, err := client.RestartRevision(ctx, id)
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 PossibleValuesForRevisionHealthState

func PossibleValuesForRevisionHealthState() []string

func PossibleValuesForRevisionProvisioningState

func PossibleValuesForRevisionProvisioningState() []string

func PossibleValuesForRevisionRunningState

func PossibleValuesForRevisionRunningState() []string

func PossibleValuesForScheme

func PossibleValuesForScheme() []string

func PossibleValuesForStorageType

func PossibleValuesForStorageType() []string

func PossibleValuesForType

func PossibleValuesForType() []string

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 ValidateRevisionID

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

ValidateRevisionID checks that 'input' can be parsed as a Revision ID

Types

type ActivateRevisionOperationResponse

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

type BaseContainer

type BaseContainer struct {
	Args         *[]string           `json:"args,omitempty"`
	Command      *[]string           `json:"command,omitempty"`
	Env          *[]EnvironmentVar   `json:"env,omitempty"`
	Image        *string             `json:"image,omitempty"`
	Name         *string             `json:"name,omitempty"`
	Resources    *ContainerResources `json:"resources,omitempty"`
	VolumeMounts *[]VolumeMount      `json:"volumeMounts,omitempty"`
}

type Container

type Container struct {
	Args         *[]string            `json:"args,omitempty"`
	Command      *[]string            `json:"command,omitempty"`
	Env          *[]EnvironmentVar    `json:"env,omitempty"`
	Image        *string              `json:"image,omitempty"`
	Name         *string              `json:"name,omitempty"`
	Probes       *[]ContainerAppProbe `json:"probes,omitempty"`
	Resources    *ContainerResources  `json:"resources,omitempty"`
	VolumeMounts *[]VolumeMount       `json:"volumeMounts,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 ContainerAppProbe

type ContainerAppProbe struct {
	FailureThreshold              *int64                      `json:"failureThreshold,omitempty"`
	HTTPGet                       *ContainerAppProbeHTTPGet   `json:"httpGet,omitempty"`
	InitialDelaySeconds           *int64                      `json:"initialDelaySeconds,omitempty"`
	PeriodSeconds                 *int64                      `json:"periodSeconds,omitempty"`
	SuccessThreshold              *int64                      `json:"successThreshold,omitempty"`
	TcpSocket                     *ContainerAppProbeTcpSocket `json:"tcpSocket,omitempty"`
	TerminationGracePeriodSeconds *int64                      `json:"terminationGracePeriodSeconds,omitempty"`
	TimeoutSeconds                *int64                      `json:"timeoutSeconds,omitempty"`
	Type                          *Type                       `json:"type,omitempty"`
}

type ContainerAppProbeHTTPGet

type ContainerAppProbeHTTPGet struct {
	HTTPHeaders *[]ContainerAppProbeHTTPGetHTTPHeadersInlined `json:"httpHeaders,omitempty"`
	Host        *string                                       `json:"host,omitempty"`
	Path        *string                                       `json:"path,omitempty"`
	Port        int64                                         `json:"port"`
	Scheme      *Scheme                                       `json:"scheme,omitempty"`
}

type ContainerAppProbeHTTPGetHTTPHeadersInlined

type ContainerAppProbeHTTPGetHTTPHeadersInlined struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type ContainerAppProbeTcpSocket

type ContainerAppProbeTcpSocket struct {
	Host *string `json:"host,omitempty"`
	Port int64   `json:"port"`
}

type ContainerAppsRevisionsClient

type ContainerAppsRevisionsClient struct {
	Client *resourcemanager.Client
}

func NewContainerAppsRevisionsClientWithBaseURI

func NewContainerAppsRevisionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ContainerAppsRevisionsClient, error)

func (ContainerAppsRevisionsClient) ActivateRevision

ActivateRevision ...

func (ContainerAppsRevisionsClient) DeactivateRevision

DeactivateRevision ...

func (ContainerAppsRevisionsClient) GetRevision

GetRevision ...

func (ContainerAppsRevisionsClient) ListRevisions

ListRevisions ...

func (ContainerAppsRevisionsClient) ListRevisionsComplete

ListRevisionsComplete retrieves all the results into a single object

func (ContainerAppsRevisionsClient) ListRevisionsCompleteMatchingPredicate

func (c ContainerAppsRevisionsClient) ListRevisionsCompleteMatchingPredicate(ctx context.Context, id ContainerAppId, options ListRevisionsOperationOptions, predicate RevisionOperationPredicate) (result ListRevisionsCompleteResult, err error)

ListRevisionsCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ContainerAppsRevisionsClient) RestartRevision

RestartRevision ...

type ContainerResources

type ContainerResources struct {
	Cpu              *float64 `json:"cpu,omitempty"`
	EphemeralStorage *string  `json:"ephemeralStorage,omitempty"`
	Memory           *string  `json:"memory,omitempty"`
}

type CustomScaleRule

type CustomScaleRule struct {
	Auth     *[]ScaleRuleAuth   `json:"auth,omitempty"`
	Metadata *map[string]string `json:"metadata,omitempty"`
	Type     *string            `json:"type,omitempty"`
}

type DeactivateRevisionOperationResponse

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

type EnvironmentVar

type EnvironmentVar struct {
	Name      *string `json:"name,omitempty"`
	SecretRef *string `json:"secretRef,omitempty"`
	Value     *string `json:"value,omitempty"`
}

type GetRevisionOperationResponse

type GetRevisionOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Revision
}

type HTTPScaleRule

type HTTPScaleRule struct {
	Auth     *[]ScaleRuleAuth   `json:"auth,omitempty"`
	Metadata *map[string]string `json:"metadata,omitempty"`
}

type ListRevisionsCompleteResult

type ListRevisionsCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Revision
}

type ListRevisionsOperationOptions

type ListRevisionsOperationOptions struct {
	Filter *string
}

func DefaultListRevisionsOperationOptions

func DefaultListRevisionsOperationOptions() ListRevisionsOperationOptions

func (ListRevisionsOperationOptions) ToHeaders added in v0.20240212.1141705

func (ListRevisionsOperationOptions) ToOData added in v0.20240212.1141705

func (ListRevisionsOperationOptions) ToQuery added in v0.20240212.1141705

type ListRevisionsOperationResponse

type ListRevisionsOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Revision
}

type QueueScaleRule

type QueueScaleRule struct {
	Auth        *[]ScaleRuleAuth `json:"auth,omitempty"`
	QueueLength *int64           `json:"queueLength,omitempty"`
	QueueName   *string          `json:"queueName,omitempty"`
}

type RestartRevisionOperationResponse

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

type Revision

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

type RevisionHealthState

type RevisionHealthState string
const (
	RevisionHealthStateHealthy   RevisionHealthState = "Healthy"
	RevisionHealthStateNone      RevisionHealthState = "None"
	RevisionHealthStateUnhealthy RevisionHealthState = "Unhealthy"
)

func (*RevisionHealthState) UnmarshalJSON added in v0.20240212.1141705

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

type RevisionId

type RevisionId struct {
	SubscriptionId    string
	ResourceGroupName string
	ContainerAppName  string
	RevisionName      string
}

RevisionId is a struct representing the Resource ID for a Revision

func NewRevisionID

func NewRevisionID(subscriptionId string, resourceGroupName string, containerAppName string, revisionName string) RevisionId

NewRevisionID returns a new RevisionId struct

func ParseRevisionID

func ParseRevisionID(input string) (*RevisionId, error)

ParseRevisionID parses 'input' into a RevisionId

func ParseRevisionIDInsensitively

func ParseRevisionIDInsensitively(input string) (*RevisionId, error)

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

func (*RevisionId) FromParseResult

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

func (RevisionId) ID

func (id RevisionId) ID() string

ID returns the formatted Revision ID

func (RevisionId) Segments

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

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

func (RevisionId) String

func (id RevisionId) String() string

String returns a human-readable description of this Revision ID

type RevisionOperationPredicate

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

func (RevisionOperationPredicate) Matches

func (p RevisionOperationPredicate) Matches(input Revision) bool

type RevisionProperties

type RevisionProperties struct {
	Active            *bool                      `json:"active,omitempty"`
	CreatedTime       *string                    `json:"createdTime,omitempty"`
	Fqdn              *string                    `json:"fqdn,omitempty"`
	HealthState       *RevisionHealthState       `json:"healthState,omitempty"`
	LastActiveTime    *string                    `json:"lastActiveTime,omitempty"`
	ProvisioningError *string                    `json:"provisioningError,omitempty"`
	ProvisioningState *RevisionProvisioningState `json:"provisioningState,omitempty"`
	Replicas          *int64                     `json:"replicas,omitempty"`
	RunningState      *RevisionRunningState      `json:"runningState,omitempty"`
	Template          *Template                  `json:"template,omitempty"`
	TrafficWeight     *int64                     `json:"trafficWeight,omitempty"`
}

func (*RevisionProperties) GetCreatedTimeAsTime

func (o *RevisionProperties) GetCreatedTimeAsTime() (*time.Time, error)

func (*RevisionProperties) GetLastActiveTimeAsTime

func (o *RevisionProperties) GetLastActiveTimeAsTime() (*time.Time, error)

func (*RevisionProperties) SetCreatedTimeAsTime

func (o *RevisionProperties) SetCreatedTimeAsTime(input time.Time)

func (*RevisionProperties) SetLastActiveTimeAsTime

func (o *RevisionProperties) SetLastActiveTimeAsTime(input time.Time)

type RevisionProvisioningState

type RevisionProvisioningState string
const (
	RevisionProvisioningStateDeprovisioned  RevisionProvisioningState = "Deprovisioned"
	RevisionProvisioningStateDeprovisioning RevisionProvisioningState = "Deprovisioning"
	RevisionProvisioningStateFailed         RevisionProvisioningState = "Failed"
	RevisionProvisioningStateProvisioned    RevisionProvisioningState = "Provisioned"
	RevisionProvisioningStateProvisioning   RevisionProvisioningState = "Provisioning"
)

func (*RevisionProvisioningState) UnmarshalJSON added in v0.20240212.1141705

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

type RevisionRunningState

type RevisionRunningState string
const (
	RevisionRunningStateDegraded   RevisionRunningState = "Degraded"
	RevisionRunningStateFailed     RevisionRunningState = "Failed"
	RevisionRunningStateProcessing RevisionRunningState = "Processing"
	RevisionRunningStateRunning    RevisionRunningState = "Running"
	RevisionRunningStateStopped    RevisionRunningState = "Stopped"
	RevisionRunningStateUnknown    RevisionRunningState = "Unknown"
)

func (*RevisionRunningState) UnmarshalJSON added in v0.20240212.1141705

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

type Scale

type Scale struct {
	MaxReplicas *int64       `json:"maxReplicas,omitempty"`
	MinReplicas *int64       `json:"minReplicas,omitempty"`
	Rules       *[]ScaleRule `json:"rules,omitempty"`
}

type ScaleRule

type ScaleRule struct {
	AzureQueue *QueueScaleRule  `json:"azureQueue,omitempty"`
	Custom     *CustomScaleRule `json:"custom,omitempty"`
	HTTP       *HTTPScaleRule   `json:"http,omitempty"`
	Name       *string          `json:"name,omitempty"`
	Tcp        *TcpScaleRule    `json:"tcp,omitempty"`
}

type ScaleRuleAuth

type ScaleRuleAuth struct {
	SecretRef        *string `json:"secretRef,omitempty"`
	TriggerParameter *string `json:"triggerParameter,omitempty"`
}

type Scheme

type Scheme string
const (
	SchemeHTTP  Scheme = "HTTP"
	SchemeHTTPS Scheme = "HTTPS"
)

func (*Scheme) UnmarshalJSON added in v0.20240212.1141705

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

type SecretVolumeItem

type SecretVolumeItem struct {
	Path      *string `json:"path,omitempty"`
	SecretRef *string `json:"secretRef,omitempty"`
}

type ServiceBind

type ServiceBind struct {
	Name      *string `json:"name,omitempty"`
	ServiceId *string `json:"serviceId,omitempty"`
}

type StorageType

type StorageType string
const (
	StorageTypeAzureFile StorageType = "AzureFile"
	StorageTypeEmptyDir  StorageType = "EmptyDir"
	StorageTypeSecret    StorageType = "Secret"
)

func (*StorageType) UnmarshalJSON added in v0.20240212.1141705

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

type TcpScaleRule

type TcpScaleRule struct {
	Auth     *[]ScaleRuleAuth   `json:"auth,omitempty"`
	Metadata *map[string]string `json:"metadata,omitempty"`
}

type Template

type Template struct {
	Containers                    *[]Container     `json:"containers,omitempty"`
	InitContainers                *[]BaseContainer `json:"initContainers,omitempty"`
	RevisionSuffix                *string          `json:"revisionSuffix,omitempty"`
	Scale                         *Scale           `json:"scale,omitempty"`
	ServiceBinds                  *[]ServiceBind   `json:"serviceBinds,omitempty"`
	TerminationGracePeriodSeconds *int64           `json:"terminationGracePeriodSeconds,omitempty"`
	Volumes                       *[]Volume        `json:"volumes,omitempty"`
}

type Type

type Type string
const (
	TypeLiveness  Type = "Liveness"
	TypeReadiness Type = "Readiness"
	TypeStartup   Type = "Startup"
)

func (*Type) UnmarshalJSON added in v0.20240212.1141705

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

type Volume

type Volume struct {
	MountOptions *string             `json:"mountOptions,omitempty"`
	Name         *string             `json:"name,omitempty"`
	Secrets      *[]SecretVolumeItem `json:"secrets,omitempty"`
	StorageName  *string             `json:"storageName,omitempty"`
	StorageType  *StorageType        `json:"storageType,omitempty"`
}

type VolumeMount

type VolumeMount struct {
	MountPath  *string `json:"mountPath,omitempty"`
	SubPath    *string `json:"subPath,omitempty"`
	VolumeName *string `json:"volumeName,omitempty"`
}

Jump to

Keyboard shortcuts

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