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/2023-05-01/certificates
Documentation
The certificates
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/certificates"
Client Initialization
client := certificates.NewCertificatesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
Example Usage: CertificatesClient.ConnectedEnvironmentsCertificatesCreateOrUpdate
ctx := context.TODO()
id := certificates.NewConnectedEnvironmentCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "connectedEnvironmentValue", "certificateValue")
payload := certificates.Certificate{
// ...
}
read, err := client.ConnectedEnvironmentsCertificatesCreateOrUpdate(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: CertificatesClient.ConnectedEnvironmentsCertificatesDelete
ctx := context.TODO()
id := certificates.NewConnectedEnvironmentCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "connectedEnvironmentValue", "certificateValue")
read, err := client.ConnectedEnvironmentsCertificatesDelete(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: CertificatesClient.ConnectedEnvironmentsCertificatesGet
ctx := context.TODO()
id := certificates.NewConnectedEnvironmentCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "connectedEnvironmentValue", "certificateValue")
read, err := client.ConnectedEnvironmentsCertificatesGet(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: CertificatesClient.ConnectedEnvironmentsCertificatesList
ctx := context.TODO()
id := certificates.NewConnectedEnvironmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "connectedEnvironmentValue")
// alternatively `client.ConnectedEnvironmentsCertificatesList(ctx, id)` can be used to do batched pagination
items, err := client.ConnectedEnvironmentsCertificatesListComplete(ctx, id)
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: CertificatesClient.ConnectedEnvironmentsCertificatesUpdate
ctx := context.TODO()
id := certificates.NewConnectedEnvironmentCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "connectedEnvironmentValue", "certificateValue")
payload := certificates.CertificatePatch{
// ...
}
read, err := client.ConnectedEnvironmentsCertificatesUpdate(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: CertificatesClient.CreateOrUpdate
ctx := context.TODO()
id := certificates.NewCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedEnvironmentValue", "certificateValue")
payload := certificates.Certificate{
// ...
}
read, err := client.CreateOrUpdate(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: CertificatesClient.Delete
ctx := context.TODO()
id := certificates.NewCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedEnvironmentValue", "certificateValue")
read, err := client.Delete(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: CertificatesClient.Get
ctx := context.TODO()
id := certificates.NewCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedEnvironmentValue", "certificateValue")
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: CertificatesClient.List
ctx := context.TODO()
id := certificates.NewManagedEnvironmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedEnvironmentValue")
// alternatively `client.List(ctx, id)` can be used to do batched pagination
items, err := client.ListComplete(ctx, id)
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: CertificatesClient.Update
ctx := context.TODO()
id := certificates.NewCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedEnvironmentValue", "certificateValue")
payload := certificates.CertificatePatch{
// ...
}
read, err := client.Update(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}