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/web/2023-01-01/resourceproviders Documentation

The resourceproviders SDK allows for interaction with the Azure Resource Manager Service web (API Version 2023-01-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/web/2023-01-01/resourceproviders"

Client Initialization

client := resourceproviders.NewResourceProvidersClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ResourceProvidersClient.CheckNameAvailability

ctx := context.TODO()
id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

payload := resourceproviders.ResourceNameAvailabilityRequest{
	// ...
}


read, err := client.CheckNameAvailability(ctx, id, payload)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: ResourceProvidersClient.GetPublishingUser

ctx := context.TODO()


read, err := client.GetPublishingUser(ctx)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: ResourceProvidersClient.GetSourceControl

ctx := context.TODO()
id := resourceproviders.NewSourceControlID("sourceControlValue")

read, err := client.GetSourceControl(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: ResourceProvidersClient.GetSubscriptionDeploymentLocations

ctx := context.TODO()
id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

read, err := client.GetSubscriptionDeploymentLocations(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: ResourceProvidersClient.GetUsagesInLocationlist

ctx := context.TODO()
id := resourceproviders.NewProviderLocationID("12345678-1234-9876-4563-123456789012", "locationValue")

// alternatively `client.GetUsagesInLocationlist(ctx, id)` can be used to do batched pagination
items, err := client.GetUsagesInLocationlistComplete(ctx, id)
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: ResourceProvidersClient.ListAseRegions

ctx := context.TODO()
id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

// alternatively `client.ListAseRegions(ctx, id)` can be used to do batched pagination
items, err := client.ListAseRegionsComplete(ctx, id)
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: ResourceProvidersClient.ListBillingMeters

ctx := context.TODO()
id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

// alternatively `client.ListBillingMeters(ctx, id, resourceproviders.DefaultListBillingMetersOperationOptions())` can be used to do batched pagination
items, err := client.ListBillingMetersComplete(ctx, id, resourceproviders.DefaultListBillingMetersOperationOptions())
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: ResourceProvidersClient.ListCustomHostNameSites

ctx := context.TODO()
id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

// alternatively `client.ListCustomHostNameSites(ctx, id, resourceproviders.DefaultListCustomHostNameSitesOperationOptions())` can be used to do batched pagination
items, err := client.ListCustomHostNameSitesComplete(ctx, id, resourceproviders.DefaultListCustomHostNameSitesOperationOptions())
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: ResourceProvidersClient.ListGeoRegions

ctx := context.TODO()
id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

// alternatively `client.ListGeoRegions(ctx, id, resourceproviders.DefaultListGeoRegionsOperationOptions())` can be used to do batched pagination
items, err := client.ListGeoRegionsComplete(ctx, id, resourceproviders.DefaultListGeoRegionsOperationOptions())
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: ResourceProvidersClient.ListPremierAddOnOffers

ctx := context.TODO()
id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

// alternatively `client.ListPremierAddOnOffers(ctx, id)` can be used to do batched pagination
items, err := client.ListPremierAddOnOffersComplete(ctx, id)
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: ResourceProvidersClient.ListSiteIdentifiersAssignedToHostName

ctx := context.TODO()
id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

payload := resourceproviders.NameIdentifier{
	// ...
}


// alternatively `client.ListSiteIdentifiersAssignedToHostName(ctx, id, payload)` can be used to do batched pagination
items, err := client.ListSiteIdentifiersAssignedToHostNameComplete(ctx, id, payload)
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: ResourceProvidersClient.ListSkus

ctx := context.TODO()
id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

read, err := client.ListSkus(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: ResourceProvidersClient.ListSourceControls

ctx := context.TODO()


// alternatively `client.ListSourceControls(ctx)` can be used to do batched pagination
items, err := client.ListSourceControlsComplete(ctx)
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: ResourceProvidersClient.Move

ctx := context.TODO()
id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group")

payload := resourceproviders.CsmMoveResourceEnvelope{
	// ...
}


read, err := client.Move(ctx, id, payload)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: ResourceProvidersClient.UpdatePublishingUser

ctx := context.TODO()

payload := resourceproviders.User{
	// ...
}


read, err := client.UpdatePublishingUser(ctx, payload)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: ResourceProvidersClient.UpdateSourceControl

ctx := context.TODO()
id := resourceproviders.NewSourceControlID("sourceControlValue")

payload := resourceproviders.SourceControl{
	// ...
}


read, err := client.UpdateSourceControl(ctx, id, payload)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: ResourceProvidersClient.Validate

ctx := context.TODO()
id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group")

payload := resourceproviders.ValidateRequest{
	// ...
}


read, err := client.Validate(ctx, id, payload)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: ResourceProvidersClient.ValidateMove

ctx := context.TODO()
id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group")

payload := resourceproviders.CsmMoveResourceEnvelope{
	// ...
}


read, err := client.ValidateMove(ctx, id, payload)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: ResourceProvidersClient.VerifyHostingEnvironmentVnet

ctx := context.TODO()
id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

payload := resourceproviders.VnetParameters{
	// ...
}


read, err := client.VerifyHostingEnvironmentVnet(ctx, id, payload)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}