containerappsrevisions

package
v0.20231214.1094851 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: MPL-2.0 Imports: 12 Imported by: 1

README

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

The containerappsrevisions SDK allows for interaction with the Azure Resource Manager Service web (API Version 2023-01-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/web/2023-01-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.NewProviderContainerAppID("12345678-1234-9876-4563-123456789012", "example-resource-group", "containerAppValue")

// alternatively `client.ListRevisions(ctx, id)` can be used to do batched pagination
items, err := client.ListRevisionsComplete(ctx, id)
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 ValidateProviderContainerAppID

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

ValidateProviderContainerAppID checks that 'input' can be parsed as a Provider 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 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"`
	Resources *ContainerResources `json:"resources,omitempty"`
}

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 ProviderContainerAppId, 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"`
	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 Dapr

type Dapr struct {
	AppId      *string          `json:"appId,omitempty"`
	AppPort    *int64           `json:"appPort,omitempty"`
	Components *[]DaprComponent `json:"components,omitempty"`
	Enabled    *bool            `json:"enabled,omitempty"`
}

type DaprComponent

type DaprComponent struct {
	Metadata *[]DaprMetadata `json:"metadata,omitempty"`
	Name     *string         `json:"name,omitempty"`
	Type     *string         `json:"type,omitempty"`
	Version  *string         `json:"version,omitempty"`
}

type DaprMetadata

type DaprMetadata struct {
	Name      *string `json:"name,omitempty"`
	SecretRef *string `json:"secretRef,omitempty"`
	Value     *string `json:"value,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 {
	Items []Revision
}

type ListRevisionsOperationResponse

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

type ProviderContainerAppId

type ProviderContainerAppId struct {
	SubscriptionId    string
	ResourceGroupName string
	ContainerAppName  string
}

ProviderContainerAppId is a struct representing the Resource ID for a Provider Container App

func NewProviderContainerAppID

func NewProviderContainerAppID(subscriptionId string, resourceGroupName string, containerAppName string) ProviderContainerAppId

NewProviderContainerAppID returns a new ProviderContainerAppId struct

func ParseProviderContainerAppID

func ParseProviderContainerAppID(input string) (*ProviderContainerAppId, error)

ParseProviderContainerAppID parses 'input' into a ProviderContainerAppId

func ParseProviderContainerAppIDInsensitively

func ParseProviderContainerAppIDInsensitively(input string) (*ProviderContainerAppId, error)

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

func (*ProviderContainerAppId) FromParseResult added in v0.20231127.1171502

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

func (ProviderContainerAppId) ID

ID returns the formatted Provider Container App ID

func (ProviderContainerAppId) Segments

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

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

func (ProviderContainerAppId) String

func (id ProviderContainerAppId) String() string

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

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"`
	Kind       *string             `json:"kind,omitempty"`
	Location   string              `json:"location"`
	Name       *string             `json:"name,omitempty"`
	Properties *RevisionProperties `json:"properties,omitempty"`
	Tags       *map[string]string  `json:"tags,omitempty"`
	Type       *string             `json:"type,omitempty"`
}

type RevisionHealthState

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

func (*RevisionHealthState) UnmarshalJSON

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 added in v0.20231127.1171502

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
	Kind     *string
	Location *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"`
	ProvisioningError *string                    `json:"provisioningError,omitempty"`
	ProvisioningState *RevisionProvisioningState `json:"provisioningState,omitempty"`
	Replicas          *int64                     `json:"replicas,omitempty"`
	Template          *Template                  `json:"template,omitempty"`
	TrafficWeight     *int64                     `json:"trafficWeight,omitempty"`
}

func (*RevisionProperties) GetCreatedTimeAsTime

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

func (*RevisionProperties) SetCreatedTimeAsTime

func (o *RevisionProperties) SetCreatedTimeAsTime(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

func (s *RevisionProvisioningState) 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"`
}

type ScaleRuleAuth

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

type Template

type Template struct {
	Containers     *[]Container `json:"containers,omitempty"`
	Dapr           *Dapr        `json:"dapr,omitempty"`
	RevisionSuffix *string      `json:"revisionSuffix,omitempty"`
	Scale          *Scale       `json:"scale,omitempty"`
}

Jump to

Keyboard shortcuts

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