containerapps

package
v0.20241104.1140654 Latest Latest
Warning

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

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

README

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

The containerapps SDK allows for interaction with Azure Resource Manager web (API Version 2023-12-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-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/containerapps"

Client Initialization

client := containerapps.NewContainerAppsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ContainerAppsClient.CreateOrUpdate

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

payload := containerapps.ContainerApp{
	// ...
}


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

Example Usage: ContainerAppsClient.Delete

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

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

Example Usage: ContainerAppsClient.Get

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

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: ContainerAppsClient.ListByResourceGroup

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

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

Example Usage: ContainerAppsClient.ListBySubscription

ctx := context.TODO()
id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

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

Example Usage: ContainerAppsClient.ListSecrets

ctx := context.TODO()
id := containerapps.NewContainerAppID("12345678-1234-9876-4563-123456789012", "containerAppName")

read, err := client.ListSecrets(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 PossibleValuesForActiveRevisionsMode

func PossibleValuesForActiveRevisionsMode() []string

func PossibleValuesForContainerAppProvisioningState

func PossibleValuesForContainerAppProvisioningState() []string

func PossibleValuesForIngressTransportMethod

func PossibleValuesForIngressTransportMethod() []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 ValidateProviderContainerAppID

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

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

Types

type ActiveRevisionsMode

type ActiveRevisionsMode string
const (
	ActiveRevisionsModeMultiple ActiveRevisionsMode = "multiple"
	ActiveRevisionsModeSingle   ActiveRevisionsMode = "single"
)

func (*ActiveRevisionsMode) UnmarshalJSON

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

type Configuration

type Configuration struct {
	ActiveRevisionsMode *ActiveRevisionsMode   `json:"activeRevisionsMode,omitempty"`
	Ingress             *Ingress               `json:"ingress,omitempty"`
	Registries          *[]RegistryCredentials `json:"registries,omitempty"`
	Secrets             *[]Secret              `json:"secrets,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"`
	Resources *ContainerResources `json:"resources,omitempty"`
}

type ContainerApp

type ContainerApp struct {
	Id         *string                 `json:"id,omitempty"`
	Kind       *string                 `json:"kind,omitempty"`
	Location   string                  `json:"location"`
	Name       *string                 `json:"name,omitempty"`
	Properties *ContainerAppProperties `json:"properties,omitempty"`
	Tags       *map[string]string      `json:"tags,omitempty"`
	Type       *string                 `json:"type,omitempty"`
}

type ContainerAppId

type ContainerAppId struct {
	SubscriptionId   string
	ContainerAppName string
}

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

func NewContainerAppID

func NewContainerAppID(subscriptionId 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 ContainerAppOperationPredicate

type ContainerAppOperationPredicate struct {
	Id       *string
	Kind     *string
	Location *string
	Name     *string
	Type     *string
}

func (ContainerAppOperationPredicate) Matches

type ContainerAppProperties

type ContainerAppProperties struct {
	Configuration      *Configuration                 `json:"configuration,omitempty"`
	KubeEnvironmentId  *string                        `json:"kubeEnvironmentId,omitempty"`
	LatestRevisionFqdn *string                        `json:"latestRevisionFqdn,omitempty"`
	LatestRevisionName *string                        `json:"latestRevisionName,omitempty"`
	ProvisioningState  *ContainerAppProvisioningState `json:"provisioningState,omitempty"`
	Template           *Template                      `json:"template,omitempty"`
}

type ContainerAppProvisioningState

type ContainerAppProvisioningState string
const (
	ContainerAppProvisioningStateCanceled   ContainerAppProvisioningState = "Canceled"
	ContainerAppProvisioningStateFailed     ContainerAppProvisioningState = "Failed"
	ContainerAppProvisioningStateInProgress ContainerAppProvisioningState = "InProgress"
	ContainerAppProvisioningStateSucceeded  ContainerAppProvisioningState = "Succeeded"
)

func (*ContainerAppProvisioningState) UnmarshalJSON

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

type ContainerAppSecret

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

type ContainerAppsClient

type ContainerAppsClient struct {
	Client *resourcemanager.Client
}

func NewContainerAppsClientWithBaseURI

func NewContainerAppsClientWithBaseURI(sdkApi sdkEnv.Api) (*ContainerAppsClient, error)

func (ContainerAppsClient) CreateOrUpdate

CreateOrUpdate ...

func (ContainerAppsClient) CreateOrUpdateThenPoll

func (c ContainerAppsClient) CreateOrUpdateThenPoll(ctx context.Context, id ProviderContainerAppId, input ContainerApp) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (ContainerAppsClient) Delete

Delete ...

func (ContainerAppsClient) DeleteThenPoll

DeleteThenPoll performs Delete then polls until it's completed

func (ContainerAppsClient) Get

Get ...

func (ContainerAppsClient) ListByResourceGroup

ListByResourceGroup ...

func (ContainerAppsClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all the results into a single object

func (ContainerAppsClient) ListByResourceGroupCompleteMatchingPredicate

func (c ContainerAppsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate ContainerAppOperationPredicate) (result ListByResourceGroupCompleteResult, err error)

ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ContainerAppsClient) ListBySubscription

ListBySubscription ...

func (ContainerAppsClient) ListBySubscriptionComplete

ListBySubscriptionComplete retrieves all the results into a single object

func (ContainerAppsClient) ListBySubscriptionCompleteMatchingPredicate

func (c ContainerAppsClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ContainerAppOperationPredicate) (result ListBySubscriptionCompleteResult, err error)

ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ContainerAppsClient) ListSecrets

ListSecrets ...

type ContainerResources

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

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ContainerApp
}

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 DeleteOperationResponse

type DeleteOperationResponse struct {
	Poller       pollers.Poller
	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 GetOperationResponse

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

type HTTPScaleRule

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

type Ingress

type Ingress struct {
	AllowInsecure *bool                   `json:"allowInsecure,omitempty"`
	External      *bool                   `json:"external,omitempty"`
	Fqdn          *string                 `json:"fqdn,omitempty"`
	TargetPort    *int64                  `json:"targetPort,omitempty"`
	Traffic       *[]TrafficWeight        `json:"traffic,omitempty"`
	Transport     *IngressTransportMethod `json:"transport,omitempty"`
}

type IngressTransportMethod

type IngressTransportMethod string
const (
	IngressTransportMethodAuto    IngressTransportMethod = "auto"
	IngressTransportMethodHTTP    IngressTransportMethod = "http"
	IngressTransportMethodHTTPTwo IngressTransportMethod = "http2"
)

func (*IngressTransportMethod) UnmarshalJSON

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

type ListByResourceGroupCompleteResult

type ListByResourceGroupCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []ContainerApp
}

type ListByResourceGroupCustomPager added in v0.20240628.1153531

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

type ListByResourceGroupOperationResponse

type ListByResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]ContainerApp
}

type ListBySubscriptionCompleteResult

type ListBySubscriptionCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []ContainerApp
}

type ListBySubscriptionCustomPager added in v0.20240628.1153531

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

type ListBySubscriptionOperationResponse

type ListBySubscriptionOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]ContainerApp
}

type ListSecretsOperationResponse

type ListSecretsOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *SecretsCollection
}

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

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 RegistryCredentials

type RegistryCredentials struct {
	PasswordSecretRef *string `json:"passwordSecretRef,omitempty"`
	Server            *string `json:"server,omitempty"`
	Username          *string `json:"username,omitempty"`
}

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 Secret

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

type SecretsCollection

type SecretsCollection struct {
	Value []ContainerAppSecret `json:"value"`
}

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"`
}

type TrafficWeight

type TrafficWeight struct {
	LatestRevision *bool   `json:"latestRevision,omitempty"`
	RevisionName   *string `json:"revisionName,omitempty"`
	Weight         *int64  `json:"weight,omitempty"`
}

Jump to

Keyboard shortcuts

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