constellation/cli/internal/azure/client/applicationinsight.go
Malte Poll 081dfb5037 Upgrade Azure SDK
Signed-off-by: Malte Poll <mp@edgeless.systems>
2022-08-05 10:35:38 +02:00

27 lines
676 B
Go

package client
import (
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights"
"golang.org/x/net/context"
)
func (c *Client) CreateApplicationInsight(ctx context.Context) error {
properties := armapplicationinsights.Component{
Kind: to.Ptr("web"),
Location: to.Ptr(c.location),
Properties: &armapplicationinsights.ComponentProperties{
ApplicationType: to.Ptr(armapplicationinsights.ApplicationTypeWeb),
},
}
_, err := c.applicationInsightsAPI.CreateOrUpdate(
ctx,
c.resourceGroup,
"constellation-insights-"+c.uid,
properties,
nil,
)
return err
}