Categorygithub.com/hashicorp/go-azure-sdk/resource-managercontainerapps2024-02-02-previewcontainerapps
package
0.20240715.1103416
Repository: https://github.com/hashicorp/go-azure-sdk.git
Documentation: pkg.go.dev
# README
github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/containerapps
Documentation
The containerapps
SDK allows for interaction with the Azure Resource Manager Service 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-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/containerapps"
Client Initialization
client := containerapps.NewContainerAppsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
Example Usage: ContainerAppsClient.CreateOrUpdate
ctx := context.TODO()
id := containerapps.NewContainerAppID("12345678-1234-9876-4563-123456789012", "example-resource-group", "containerAppValue")
payload := containerapps.ContainerApp{
// ...
}
if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil {
// handle the error
}
Example Usage: ContainerAppsClient.Delete
ctx := context.TODO()
id := containerapps.NewContainerAppID("12345678-1234-9876-4563-123456789012", "example-resource-group", "containerAppValue")
if err := client.DeleteThenPoll(ctx, id); err != nil {
// handle the error
}
Example Usage: ContainerAppsClient.DiagnosticsGetDetector
ctx := context.TODO()
id := containerapps.NewContainerAppDetectorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "containerAppValue", "detectorValue")
read, err := client.DiagnosticsGetDetector(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: ContainerAppsClient.DiagnosticsGetRevision
ctx := context.TODO()
id := containerapps.NewRevisionsApiRevisionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "containerAppValue", "revisionValue")
read, err := client.DiagnosticsGetRevision(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: ContainerAppsClient.DiagnosticsGetRoot
ctx := context.TODO()
id := containerapps.NewContainerAppID("12345678-1234-9876-4563-123456789012", "example-resource-group", "containerAppValue")
read, err := client.DiagnosticsGetRoot(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: ContainerAppsClient.DiagnosticsListDetectors
ctx := context.TODO()
id := containerapps.NewContainerAppID("12345678-1234-9876-4563-123456789012", "example-resource-group", "containerAppValue")
// alternatively `client.DiagnosticsListDetectors(ctx, id)` can be used to do batched pagination
items, err := client.DiagnosticsListDetectorsComplete(ctx, id)
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: ContainerAppsClient.DiagnosticsListRevisions
ctx := context.TODO()
id := containerapps.NewContainerAppID("12345678-1234-9876-4563-123456789012", "example-resource-group", "containerAppValue")
// alternatively `client.DiagnosticsListRevisions(ctx, id, containerapps.DefaultDiagnosticsListRevisionsOperationOptions())` can be used to do batched pagination
items, err := client.DiagnosticsListRevisionsComplete(ctx, id, containerapps.DefaultDiagnosticsListRevisionsOperationOptions())
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: ContainerAppsClient.Get
ctx := context.TODO()
id := containerapps.NewContainerAppID("12345678-1234-9876-4563-123456789012", "example-resource-group", "containerAppValue")
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.GetAuthToken
ctx := context.TODO()
id := containerapps.NewContainerAppID("12345678-1234-9876-4563-123456789012", "example-resource-group", "containerAppValue")
read, err := client.GetAuthToken(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.ListCustomHostNameAnalysis
ctx := context.TODO()
id := containerapps.NewContainerAppID("12345678-1234-9876-4563-123456789012", "example-resource-group", "containerAppValue")
read, err := client.ListCustomHostNameAnalysis(ctx, id, containerapps.DefaultListCustomHostNameAnalysisOperationOptions())
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: ContainerAppsClient.ListSecrets
ctx := context.TODO()
id := containerapps.NewContainerAppID("12345678-1234-9876-4563-123456789012", "example-resource-group", "containerAppValue")
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
}
Example Usage: ContainerAppsClient.Start
ctx := context.TODO()
id := containerapps.NewContainerAppID("12345678-1234-9876-4563-123456789012", "example-resource-group", "containerAppValue")
if err := client.StartThenPoll(ctx, id); err != nil {
// handle the error
}
Example Usage: ContainerAppsClient.Stop
ctx := context.TODO()
id := containerapps.NewContainerAppID("12345678-1234-9876-4563-123456789012", "example-resource-group", "containerAppValue")
if err := client.StopThenPoll(ctx, id); err != nil {
// handle the error
}
Example Usage: ContainerAppsClient.Update
ctx := context.TODO()
id := containerapps.NewContainerAppID("12345678-1234-9876-4563-123456789012", "example-resource-group", "containerAppValue")
payload := containerapps.ContainerApp{
// ...
}
if err := client.UpdateThenPoll(ctx, id, payload); err != nil {
// handle the error
}