Categorygithub.com/hashicorp/go-azure-sdk/resource-managerdeviceprovisioningservices2022-12-12iotdpsresource
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/deviceprovisioningservices/2022-12-12/iotdpsresource
Documentation
The iotdpsresource
SDK allows for interaction with the Azure Resource Manager Service deviceprovisioningservices
(API Version 2022-12-12
).
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/deviceprovisioningservices/2022-12-12/iotdpsresource"
Client Initialization
client := iotdpsresource.NewIotDpsResourceClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
Example Usage: IotDpsResourceClient.CheckProvisioningServiceNameAvailability
ctx := context.TODO()
id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012")
payload := iotdpsresource.OperationInputs{
// ...
}
read, err := client.CheckProvisioningServiceNameAvailability(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: IotDpsResourceClient.CreateOrUpdate
ctx := context.TODO()
id := commonids.NewProvisioningServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "provisioningServiceValue")
payload := iotdpsresource.ProvisioningServiceDescription{
// ...
}
if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil {
// handle the error
}
Example Usage: IotDpsResourceClient.CreateOrUpdatePrivateEndpointConnection
ctx := context.TODO()
id := iotdpsresource.NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "provisioningServiceValue", "privateEndpointConnectionValue")
payload := iotdpsresource.PrivateEndpointConnection{
// ...
}
if err := client.CreateOrUpdatePrivateEndpointConnectionThenPoll(ctx, id, payload); err != nil {
// handle the error
}
Example Usage: IotDpsResourceClient.Delete
ctx := context.TODO()
id := commonids.NewProvisioningServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "provisioningServiceValue")
if err := client.DeleteThenPoll(ctx, id); err != nil {
// handle the error
}
Example Usage: IotDpsResourceClient.DeletePrivateEndpointConnection
ctx := context.TODO()
id := iotdpsresource.NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "provisioningServiceValue", "privateEndpointConnectionValue")
if err := client.DeletePrivateEndpointConnectionThenPoll(ctx, id); err != nil {
// handle the error
}
Example Usage: IotDpsResourceClient.Get
ctx := context.TODO()
id := commonids.NewProvisioningServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "provisioningServiceValue")
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: IotDpsResourceClient.GetPrivateEndpointConnection
ctx := context.TODO()
id := iotdpsresource.NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "provisioningServiceValue", "privateEndpointConnectionValue")
read, err := client.GetPrivateEndpointConnection(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: IotDpsResourceClient.GetPrivateLinkResources
ctx := context.TODO()
id := iotdpsresource.NewPrivateLinkResourceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "provisioningServiceValue", "groupIdValue")
read, err := client.GetPrivateLinkResources(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: IotDpsResourceClient.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: IotDpsResourceClient.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: IotDpsResourceClient.ListKeys
ctx := context.TODO()
id := commonids.NewProvisioningServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "provisioningServiceValue")
// alternatively `client.ListKeys(ctx, id)` can be used to do batched pagination
items, err := client.ListKeysComplete(ctx, id)
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: IotDpsResourceClient.ListKeysForKeyName
ctx := context.TODO()
id := iotdpsresource.NewKeyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "provisioningServiceValue", "keyValue")
read, err := client.ListKeysForKeyName(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: IotDpsResourceClient.ListPrivateEndpointConnections
ctx := context.TODO()
id := commonids.NewProvisioningServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "provisioningServiceValue")
read, err := client.ListPrivateEndpointConnections(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: IotDpsResourceClient.ListPrivateLinkResources
ctx := context.TODO()
id := commonids.NewProvisioningServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "provisioningServiceValue")
read, err := client.ListPrivateLinkResources(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: IotDpsResourceClient.ListValidSkus
ctx := context.TODO()
id := commonids.NewProvisioningServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "provisioningServiceValue")
// alternatively `client.ListValidSkus(ctx, id)` can be used to do batched pagination
items, err := client.ListValidSkusComplete(ctx, id)
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: IotDpsResourceClient.Update
ctx := context.TODO()
id := commonids.NewProvisioningServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "provisioningServiceValue")
payload := iotdpsresource.TagsResource{
// ...
}
if err := client.UpdateThenPoll(ctx, id, payload); err != nil {
// handle the error
}