Categorygithub.com/hashicorp/go-azure-sdk/resource-managercontainerapps2024-03-01managedenvironments
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-03-01/managedenvironments
Documentation
The managedenvironments
SDK allows for interaction with the Azure Resource Manager Service containerapps
(API Version 2024-03-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/containerapps/2024-03-01/managedenvironments"
Client Initialization
client := managedenvironments.NewManagedEnvironmentsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
Example Usage: ManagedEnvironmentsClient.CertificatesCreateOrUpdate
ctx := context.TODO()
id := managedenvironments.NewCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedEnvironmentValue", "certificateValue")
payload := managedenvironments.Certificate{
// ...
}
read, err := client.CertificatesCreateOrUpdate(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: ManagedEnvironmentsClient.CertificatesDelete
ctx := context.TODO()
id := managedenvironments.NewCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedEnvironmentValue", "certificateValue")
read, err := client.CertificatesDelete(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: ManagedEnvironmentsClient.CertificatesGet
ctx := context.TODO()
id := managedenvironments.NewCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedEnvironmentValue", "certificateValue")
read, err := client.CertificatesGet(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: ManagedEnvironmentsClient.CertificatesList
ctx := context.TODO()
id := managedenvironments.NewManagedEnvironmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedEnvironmentValue")
// alternatively `client.CertificatesList(ctx, id)` can be used to do batched pagination
items, err := client.CertificatesListComplete(ctx, id)
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: ManagedEnvironmentsClient.CertificatesUpdate
ctx := context.TODO()
id := managedenvironments.NewCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedEnvironmentValue", "certificateValue")
payload := managedenvironments.CertificatePatch{
// ...
}
read, err := client.CertificatesUpdate(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: ManagedEnvironmentsClient.CreateOrUpdate
ctx := context.TODO()
id := managedenvironments.NewManagedEnvironmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedEnvironmentValue")
payload := managedenvironments.ManagedEnvironment{
// ...
}
if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil {
// handle the error
}
Example Usage: ManagedEnvironmentsClient.Delete
ctx := context.TODO()
id := managedenvironments.NewManagedEnvironmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedEnvironmentValue")
if err := client.DeleteThenPoll(ctx, id); err != nil {
// handle the error
}
Example Usage: ManagedEnvironmentsClient.DiagnosticsGetRoot
ctx := context.TODO()
id := managedenvironments.NewManagedEnvironmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedEnvironmentValue")
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: ManagedEnvironmentsClient.Get
ctx := context.TODO()
id := managedenvironments.NewManagedEnvironmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedEnvironmentValue")
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: ManagedEnvironmentsClient.GetAuthToken
ctx := context.TODO()
id := managedenvironments.NewManagedEnvironmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedEnvironmentValue")
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: ManagedEnvironmentsClient.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: ManagedEnvironmentsClient.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: ManagedEnvironmentsClient.ListWorkloadProfileStates
ctx := context.TODO()
id := managedenvironments.NewManagedEnvironmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedEnvironmentValue")
// alternatively `client.ListWorkloadProfileStates(ctx, id)` can be used to do batched pagination
items, err := client.ListWorkloadProfileStatesComplete(ctx, id)
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: ManagedEnvironmentsClient.ManagedCertificatesCreateOrUpdate
ctx := context.TODO()
id := managedenvironments.NewManagedCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedEnvironmentValue", "managedCertificateValue")
payload := managedenvironments.ManagedCertificate{
// ...
}
if err := client.ManagedCertificatesCreateOrUpdateThenPoll(ctx, id, payload); err != nil {
// handle the error
}
Example Usage: ManagedEnvironmentsClient.ManagedCertificatesDelete
ctx := context.TODO()
id := managedenvironments.NewManagedCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedEnvironmentValue", "managedCertificateValue")
read, err := client.ManagedCertificatesDelete(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: ManagedEnvironmentsClient.ManagedCertificatesGet
ctx := context.TODO()
id := managedenvironments.NewManagedCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedEnvironmentValue", "managedCertificateValue")
read, err := client.ManagedCertificatesGet(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: ManagedEnvironmentsClient.ManagedCertificatesList
ctx := context.TODO()
id := managedenvironments.NewManagedEnvironmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedEnvironmentValue")
// alternatively `client.ManagedCertificatesList(ctx, id)` can be used to do batched pagination
items, err := client.ManagedCertificatesListComplete(ctx, id)
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: ManagedEnvironmentsClient.ManagedCertificatesUpdate
ctx := context.TODO()
id := managedenvironments.NewManagedCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedEnvironmentValue", "managedCertificateValue")
payload := managedenvironments.ManagedCertificatePatch{
// ...
}
read, err := client.ManagedCertificatesUpdate(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: ManagedEnvironmentsClient.ManagedEnvironmentDiagnosticsGetDetector
ctx := context.TODO()
id := managedenvironments.NewManagedEnvironmentDetectorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedEnvironmentValue", "detectorValue")
read, err := client.ManagedEnvironmentDiagnosticsGetDetector(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: ManagedEnvironmentsClient.ManagedEnvironmentDiagnosticsListDetectors
ctx := context.TODO()
id := managedenvironments.NewManagedEnvironmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedEnvironmentValue")
// alternatively `client.ManagedEnvironmentDiagnosticsListDetectors(ctx, id)` can be used to do batched pagination
items, err := client.ManagedEnvironmentDiagnosticsListDetectorsComplete(ctx, id)
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: ManagedEnvironmentsClient.NamespacesCheckNameAvailability
ctx := context.TODO()
id := managedenvironments.NewManagedEnvironmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedEnvironmentValue")
payload := managedenvironments.CheckNameAvailabilityRequest{
// ...
}
read, err := client.NamespacesCheckNameAvailability(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: ManagedEnvironmentsClient.Update
ctx := context.TODO()
id := managedenvironments.NewManagedEnvironmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedEnvironmentValue")
payload := managedenvironments.ManagedEnvironment{
// ...
}
if err := client.UpdateThenPoll(ctx, id, payload); err != nil {
// handle the error
}