armpowerbidedicated

package module
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 24, 2023 License: MIT Imports: 14 Imported by: 2

README

Azure Power BI Dedicated Module for Go

PkgGoDev

The armpowerbidedicated module provides operations for working with Azure Power BI Dedicated.

Source code

Getting started

Prerequisites

  • an Azure subscription
  • Go 1.18 or above (You could download and install the latest version of Go from here. It will replace the existing Go on your machine. If you want to install multiple Go versions on the same machine, you could refer this doc.)

Install the package

This project uses Go modules for versioning and dependency management.

Install the Azure Power BI Dedicated module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/powerbidedicated/armpowerbidedicated

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure Power BI Dedicated. The azidentity module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more.

cred, err := azidentity.NewDefaultAzureCredential(nil)

For more information on authentication, please see the documentation for azidentity at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity.

Client Factory

Azure Power BI Dedicated module consists of one or more clients. We provide a client factory which could be used to create any client in this module.

clientFactory, err := armpowerbidedicated.NewClientFactory(<subscription ID>, cred, nil)

You can use ClientOptions in package github.com/Azure/azure-sdk-for-go/sdk/azcore/arm to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for azcore at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore.

options := arm.ClientOptions {
    ClientOptions: azcore.ClientOptions {
        Cloud: cloud.AzureChina,
    },
}
clientFactory, err := armpowerbidedicated.NewClientFactory(<subscription ID>, cred, &options)

Clients

A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory.

client := clientFactory.NewAutoScaleVCoresClient()

Fakes

The fake package contains types used for constructing in-memory fake servers used in unit tests. This allows writing tests to cover various success/error conditions without the need for connecting to a live service.

Please see https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/samples/fakes for details and examples on how to use fakes.

Provide Feedback

If you encounter bugs or have suggestions, please open an issue and assign the Power BI Dedicated label.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AutoScaleVCore

type AutoScaleVCore struct {
	// REQUIRED; Location of the PowerBI Dedicated resource.
	Location *string

	// REQUIRED; The SKU of the auto scale v-core resource.
	SKU *AutoScaleVCoreSKU

	// Properties of an auto scale v-core resource.
	Properties *AutoScaleVCoreProperties

	// Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData

	// Key-value pairs of additional resource provisioning properties.
	Tags map[string]*string

	// READ-ONLY; An identifier that represents the PowerBI Dedicated resource.
	ID *string

	// READ-ONLY; The name of the PowerBI Dedicated resource.
	Name *string

	// READ-ONLY; The type of the PowerBI Dedicated resource.
	Type *string
}

AutoScaleVCore - Represents an instance of an auto scale v-core resource.

func (AutoScaleVCore) MarshalJSON

func (a AutoScaleVCore) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AutoScaleVCore.

func (*AutoScaleVCore) UnmarshalJSON added in v1.1.0

func (a *AutoScaleVCore) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AutoScaleVCore.

type AutoScaleVCoreListResult

type AutoScaleVCoreListResult struct {
	// REQUIRED; An array of auto scale v-core resources.
	Value []*AutoScaleVCore
}

AutoScaleVCoreListResult - An array of auto scale v-core resources.

func (AutoScaleVCoreListResult) MarshalJSON

func (a AutoScaleVCoreListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AutoScaleVCoreListResult.

func (*AutoScaleVCoreListResult) UnmarshalJSON added in v1.1.0

func (a *AutoScaleVCoreListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AutoScaleVCoreListResult.

type AutoScaleVCoreMutableProperties

type AutoScaleVCoreMutableProperties struct {
	// The maximum capacity of an auto scale v-core resource.
	CapacityLimit *int32
}

AutoScaleVCoreMutableProperties - An object that represents a set of mutable auto scale v-core resource properties.

func (AutoScaleVCoreMutableProperties) MarshalJSON added in v1.1.0

func (a AutoScaleVCoreMutableProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AutoScaleVCoreMutableProperties.

func (*AutoScaleVCoreMutableProperties) UnmarshalJSON added in v1.1.0

func (a *AutoScaleVCoreMutableProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AutoScaleVCoreMutableProperties.

type AutoScaleVCoreProperties

type AutoScaleVCoreProperties struct {
	// The maximum capacity of an auto scale v-core resource.
	CapacityLimit *int32

	// The object ID of the capacity resource associated with the auto scale v-core resource.
	CapacityObjectID *string

	// READ-ONLY; The current deployment state of an auto scale v-core resource. The provisioningState is to indicate states for
	// resource provisioning.
	ProvisioningState *VCoreProvisioningState
}

AutoScaleVCoreProperties - Properties of an auto scale v-core resource.

func (AutoScaleVCoreProperties) MarshalJSON added in v1.1.0

func (a AutoScaleVCoreProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AutoScaleVCoreProperties.

func (*AutoScaleVCoreProperties) UnmarshalJSON added in v1.1.0

func (a *AutoScaleVCoreProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AutoScaleVCoreProperties.

type AutoScaleVCoreSKU

type AutoScaleVCoreSKU struct {
	// REQUIRED; Name of the SKU level.
	Name *string

	// The capacity of an auto scale v-core resource.
	Capacity *int32

	// The name of the Azure pricing tier to which the SKU applies.
	Tier *VCoreSKUTier
}

AutoScaleVCoreSKU - Represents the SKU name and Azure pricing tier for auto scale v-core resource.

func (AutoScaleVCoreSKU) MarshalJSON added in v1.1.0

func (a AutoScaleVCoreSKU) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AutoScaleVCoreSKU.

func (*AutoScaleVCoreSKU) UnmarshalJSON added in v1.1.0

func (a *AutoScaleVCoreSKU) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AutoScaleVCoreSKU.

type AutoScaleVCoreUpdateParameters

type AutoScaleVCoreUpdateParameters struct {
	// Properties of the update operation request.
	Properties *AutoScaleVCoreMutableProperties

	// The SKU of the auto scale v-core resource.
	SKU *AutoScaleVCoreSKU

	// Key-value pairs of additional provisioning properties.
	Tags map[string]*string
}

AutoScaleVCoreUpdateParameters - Update request specification

func (AutoScaleVCoreUpdateParameters) MarshalJSON

func (a AutoScaleVCoreUpdateParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AutoScaleVCoreUpdateParameters.

func (*AutoScaleVCoreUpdateParameters) UnmarshalJSON added in v1.1.0

func (a *AutoScaleVCoreUpdateParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AutoScaleVCoreUpdateParameters.

type AutoScaleVCoresClient

type AutoScaleVCoresClient struct {
	// contains filtered or unexported fields
}

AutoScaleVCoresClient contains the methods for the AutoScaleVCores group. Don't use this type directly, use NewAutoScaleVCoresClient() instead.

func NewAutoScaleVCoresClient

func NewAutoScaleVCoresClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AutoScaleVCoresClient, error)

NewAutoScaleVCoresClient creates a new instance of AutoScaleVCoresClient with the specified values.

  • subscriptionID - A unique identifier for a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*AutoScaleVCoresClient) Create

func (client *AutoScaleVCoresClient) Create(ctx context.Context, resourceGroupName string, vcoreName string, vCoreParameters AutoScaleVCore, options *AutoScaleVCoresClientCreateOptions) (AutoScaleVCoresClientCreateResponse, error)

Create - Provisions the specified auto scale v-core based on the configuration specified in the request. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-01-01

  • resourceGroupName - The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90.
  • vcoreName - The name of the auto scale v-core. It must be a minimum of 3 characters, and a maximum of 63.
  • vCoreParameters - Contains the information used to provision the auto scale v-core.
  • options - AutoScaleVCoresClientCreateOptions contains the optional parameters for the AutoScaleVCoresClient.Create method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/createAutoScaleVCore.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/powerbidedicated/armpowerbidedicated"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armpowerbidedicated.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAutoScaleVCoresClient().Create(ctx, "TestRG", "testvcore", armpowerbidedicated.AutoScaleVCore{
		Location: to.Ptr("West US"),
		Tags: map[string]*string{
			"testKey": to.Ptr("testValue"),
		},
		Properties: &armpowerbidedicated.AutoScaleVCoreProperties{
			CapacityLimit:    to.Ptr[int32](10),
			CapacityObjectID: to.Ptr("a28f00bd-5330-4572-88f1-fa883e074785"),
		},
		SKU: &armpowerbidedicated.AutoScaleVCoreSKU{
			Name:     to.Ptr("AutoScale"),
			Capacity: to.Ptr[int32](0),
			Tier:     to.Ptr(armpowerbidedicated.VCoreSKUTierAutoScale),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AutoScaleVCore = armpowerbidedicated.AutoScaleVCore{
	// 	Name: to.Ptr("testvcore"),
	// 	Type: to.Ptr("Microsoft.PowerBIDedicated/autoScaleVCores"),
	// 	ID: to.Ptr("/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG/providers/Microsoft.PowerBIDedicated/autoScaleVCores/testvcore"),
	// 	Location: to.Ptr("West US"),
	// 	SystemData: &armpowerbidedicated.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-01T00:00:19.123Z"); return t}()),
	// 		CreatedBy: to.Ptr("app1"),
	// 		CreatedByType: to.Ptr(armpowerbidedicated.IdentityTypeApplication),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-01T00:00:19.123Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("app1"),
	// 		LastModifiedByType: to.Ptr(armpowerbidedicated.IdentityTypeApplication),
	// 	},
	// 	Tags: map[string]*string{
	// 		"testKey": to.Ptr("testValue"),
	// 	},
	// 	Properties: &armpowerbidedicated.AutoScaleVCoreProperties{
	// 		CapacityLimit: to.Ptr[int32](10),
	// 		CapacityObjectID: to.Ptr("a28f00bd-5330-4572-88f1-fa883e074785"),
	// 		ProvisioningState: to.Ptr(armpowerbidedicated.VCoreProvisioningStateSucceeded),
	// 	},
	// 	SKU: &armpowerbidedicated.AutoScaleVCoreSKU{
	// 		Name: to.Ptr("AutoScale"),
	// 		Capacity: to.Ptr[int32](0),
	// 		Tier: to.Ptr(armpowerbidedicated.VCoreSKUTierAutoScale),
	// 	},
	// }
}
Output:

func (*AutoScaleVCoresClient) Delete

Delete - Deletes the specified auto scale v-core. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-01-01

  • resourceGroupName - The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90.
  • vcoreName - The name of the auto scale v-core. It must be a minimum of 3 characters, and a maximum of 63.
  • options - AutoScaleVCoresClientDeleteOptions contains the optional parameters for the AutoScaleVCoresClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/deleteAutoScaleVCore.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/powerbidedicated/armpowerbidedicated"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armpowerbidedicated.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewAutoScaleVCoresClient().Delete(ctx, "TestRG", "testvcore", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*AutoScaleVCoresClient) Get

Get - Gets details about the specified auto scale v-core. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-01-01

  • resourceGroupName - The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90.
  • vcoreName - The name of the auto scale v-core. It must be a minimum of 3 characters, and a maximum of 63.
  • options - AutoScaleVCoresClientGetOptions contains the optional parameters for the AutoScaleVCoresClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/getAutoScaleVCore.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/powerbidedicated/armpowerbidedicated"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armpowerbidedicated.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAutoScaleVCoresClient().Get(ctx, "TestRG", "testvcore", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AutoScaleVCore = armpowerbidedicated.AutoScaleVCore{
	// 	Name: to.Ptr("testvcore"),
	// 	Type: to.Ptr("Microsoft.PowerBIDedicated/autoScaleVCores"),
	// 	ID: to.Ptr("/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG/providers/Microsoft.PowerBIDedicated/autoScaleVCores/testvcore"),
	// 	Location: to.Ptr("West US"),
	// 	SystemData: &armpowerbidedicated.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-01T00:00:19.123Z"); return t}()),
	// 		CreatedBy: to.Ptr("app1"),
	// 		CreatedByType: to.Ptr(armpowerbidedicated.IdentityTypeApplication),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-01T00:00:19.123Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("app1"),
	// 		LastModifiedByType: to.Ptr(armpowerbidedicated.IdentityTypeApplication),
	// 	},
	// 	Tags: map[string]*string{
	// 	},
	// 	Properties: &armpowerbidedicated.AutoScaleVCoreProperties{
	// 		CapacityLimit: to.Ptr[int32](10),
	// 		CapacityObjectID: to.Ptr("a28f00bd-5330-4572-88f1-fa883e074785"),
	// 		ProvisioningState: to.Ptr(armpowerbidedicated.VCoreProvisioningStateSucceeded),
	// 	},
	// 	SKU: &armpowerbidedicated.AutoScaleVCoreSKU{
	// 		Name: to.Ptr("AutoScale"),
	// 		Capacity: to.Ptr[int32](0),
	// 		Tier: to.Ptr(armpowerbidedicated.VCoreSKUTierAutoScale),
	// 	},
	// }
}
Output:

func (*AutoScaleVCoresClient) NewListByResourceGroupPager added in v0.4.0

NewListByResourceGroupPager - Gets all the auto scale v-cores for the given resource group.

Generated from API version 2021-01-01

  • resourceGroupName - The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90.
  • options - AutoScaleVCoresClientListByResourceGroupOptions contains the optional parameters for the AutoScaleVCoresClient.NewListByResourceGroupPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/listAutoScaleVCoresInResourceGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/powerbidedicated/armpowerbidedicated"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armpowerbidedicated.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAutoScaleVCoresClient().NewListByResourceGroupPager("TestRG", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.AutoScaleVCoreListResult = armpowerbidedicated.AutoScaleVCoreListResult{
		// 	Value: []*armpowerbidedicated.AutoScaleVCore{
		// 		{
		// 			Name: to.Ptr("testvcore1"),
		// 			Type: to.Ptr("Microsoft.PowerBIDedicated/autoScaleVCores"),
		// 			ID: to.Ptr("/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG/providers/Microsoft.PowerBIDedicated/autoScaleVCores/testvcore1"),
		// 			Location: to.Ptr("West US"),
		// 			Tags: map[string]*string{
		// 				"testKey": to.Ptr("testValue"),
		// 			},
		// 			Properties: &armpowerbidedicated.AutoScaleVCoreProperties{
		// 				CapacityLimit: to.Ptr[int32](10),
		// 				CapacityObjectID: to.Ptr("a28f00bd-5330-4572-88f1-fa883e074785"),
		// 				ProvisioningState: to.Ptr(armpowerbidedicated.VCoreProvisioningStateSucceeded),
		// 			},
		// 			SKU: &armpowerbidedicated.AutoScaleVCoreSKU{
		// 				Name: to.Ptr("AutoScale"),
		// 				Capacity: to.Ptr[int32](5),
		// 				Tier: to.Ptr(armpowerbidedicated.VCoreSKUTierAutoScale),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("testvcore2"),
		// 			Type: to.Ptr("Microsoft.PowerBIDedicated/autoScaleVCores"),
		// 			ID: to.Ptr("/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG/providers/Microsoft.PowerBIDedicated/autoScaleVCores/testvcore2"),
		// 			Location: to.Ptr("West US"),
		// 			Tags: map[string]*string{
		// 				"testKey": to.Ptr("testValue"),
		// 			},
		// 			Properties: &armpowerbidedicated.AutoScaleVCoreProperties{
		// 				CapacityLimit: to.Ptr[int32](10),
		// 				CapacityObjectID: to.Ptr("f59f226b-a313-4266-8768-a45961c2edbb"),
		// 				ProvisioningState: to.Ptr(armpowerbidedicated.VCoreProvisioningStateSucceeded),
		// 			},
		// 			SKU: &armpowerbidedicated.AutoScaleVCoreSKU{
		// 				Name: to.Ptr("AutoScale"),
		// 				Capacity: to.Ptr[int32](0),
		// 				Tier: to.Ptr(armpowerbidedicated.VCoreSKUTierAutoScale),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*AutoScaleVCoresClient) NewListBySubscriptionPager added in v0.4.0

NewListBySubscriptionPager - Lists all the auto scale v-cores for the given subscription.

Generated from API version 2021-01-01

  • options - AutoScaleVCoresClientListBySubscriptionOptions contains the optional parameters for the AutoScaleVCoresClient.NewListBySubscriptionPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/listAutoScaleVCoresInSubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/powerbidedicated/armpowerbidedicated"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armpowerbidedicated.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAutoScaleVCoresClient().NewListBySubscriptionPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.AutoScaleVCoreListResult = armpowerbidedicated.AutoScaleVCoreListResult{
		// 	Value: []*armpowerbidedicated.AutoScaleVCore{
		// 		{
		// 			Name: to.Ptr("testvcore1"),
		// 			Type: to.Ptr("Microsoft.PowerBIDedicated/autoScaleVCores"),
		// 			ID: to.Ptr("/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG1/providers/Microsoft.PowerBIDedicated/autoScaleVCores/testvcore1"),
		// 			Location: to.Ptr("West US"),
		// 			Tags: map[string]*string{
		// 				"testKey": to.Ptr("testValue"),
		// 			},
		// 			Properties: &armpowerbidedicated.AutoScaleVCoreProperties{
		// 				CapacityLimit: to.Ptr[int32](10),
		// 				CapacityObjectID: to.Ptr("a28f00bd-5330-4572-88f1-fa883e074785"),
		// 				ProvisioningState: to.Ptr(armpowerbidedicated.VCoreProvisioningStateSucceeded),
		// 			},
		// 			SKU: &armpowerbidedicated.AutoScaleVCoreSKU{
		// 				Name: to.Ptr("AutoScale"),
		// 				Capacity: to.Ptr[int32](5),
		// 				Tier: to.Ptr(armpowerbidedicated.VCoreSKUTierAutoScale),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("testvcore2"),
		// 			Type: to.Ptr("Microsoft.PowerBIDedicated/autoScaleVCores"),
		// 			ID: to.Ptr("/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG2/providers/Microsoft.PowerBIDedicated/autoScaleVCores/testvcore2"),
		// 			Location: to.Ptr("West US"),
		// 			Tags: map[string]*string{
		// 				"testKey": to.Ptr("testValue"),
		// 			},
		// 			Properties: &armpowerbidedicated.AutoScaleVCoreProperties{
		// 				CapacityLimit: to.Ptr[int32](10),
		// 				CapacityObjectID: to.Ptr("f59f226b-a313-4266-8768-a45961c2edbb"),
		// 				ProvisioningState: to.Ptr(armpowerbidedicated.VCoreProvisioningStateSucceeded),
		// 			},
		// 			SKU: &armpowerbidedicated.AutoScaleVCoreSKU{
		// 				Name: to.Ptr("AutoScale"),
		// 				Capacity: to.Ptr[int32](0),
		// 				Tier: to.Ptr(armpowerbidedicated.VCoreSKUTierAutoScale),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*AutoScaleVCoresClient) Update

func (client *AutoScaleVCoresClient) Update(ctx context.Context, resourceGroupName string, vcoreName string, vCoreUpdateParameters AutoScaleVCoreUpdateParameters, options *AutoScaleVCoresClientUpdateOptions) (AutoScaleVCoresClientUpdateResponse, error)

Update - Updates the current state of the specified auto scale v-core. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-01-01

  • resourceGroupName - The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90.
  • vcoreName - The name of the auto scale v-core. It must be a minimum of 3 characters, and a maximum of 63.
  • vCoreUpdateParameters - Request object that contains the updated information for the auto scale v-core.
  • options - AutoScaleVCoresClientUpdateOptions contains the optional parameters for the AutoScaleVCoresClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/updateAutoScaleVCore.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/powerbidedicated/armpowerbidedicated"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armpowerbidedicated.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAutoScaleVCoresClient().Update(ctx, "TestRG", "testvcore", armpowerbidedicated.AutoScaleVCoreUpdateParameters{
		Properties: &armpowerbidedicated.AutoScaleVCoreMutableProperties{
			CapacityLimit: to.Ptr[int32](20),
		},
		SKU: &armpowerbidedicated.AutoScaleVCoreSKU{
			Name:     to.Ptr("AutoScale"),
			Capacity: to.Ptr[int32](0),
			Tier:     to.Ptr(armpowerbidedicated.VCoreSKUTierAutoScale),
		},
		Tags: map[string]*string{
			"testKey": to.Ptr("testValue"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AutoScaleVCore = armpowerbidedicated.AutoScaleVCore{
	// 	Name: to.Ptr("testvcore"),
	// 	Type: to.Ptr("Microsoft.PowerBIDedicated/autoScaleVCores"),
	// 	ID: to.Ptr("/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG/providers/Microsoft.PowerBIDedicated/autoScaleVCores/testvcore"),
	// 	Location: to.Ptr("West US"),
	// 	SystemData: &armpowerbidedicated.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-01T00:00:19.123Z"); return t}()),
	// 		CreatedBy: to.Ptr("app1"),
	// 		CreatedByType: to.Ptr(armpowerbidedicated.IdentityTypeApplication),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-01T00:00:19.123Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("app1"),
	// 		LastModifiedByType: to.Ptr(armpowerbidedicated.IdentityTypeApplication),
	// 	},
	// 	Tags: map[string]*string{
	// 		"testKey": to.Ptr("testValue"),
	// 	},
	// 	Properties: &armpowerbidedicated.AutoScaleVCoreProperties{
	// 		CapacityLimit: to.Ptr[int32](20),
	// 		CapacityObjectID: to.Ptr("a28f00bd-5330-4572-88f1-fa883e074785"),
	// 		ProvisioningState: to.Ptr(armpowerbidedicated.VCoreProvisioningStateSucceeded),
	// 	},
	// 	SKU: &armpowerbidedicated.AutoScaleVCoreSKU{
	// 		Name: to.Ptr("AutoScale"),
	// 		Capacity: to.Ptr[int32](0),
	// 		Tier: to.Ptr(armpowerbidedicated.VCoreSKUTierAutoScale),
	// 	},
	// }
}
Output:

type AutoScaleVCoresClientCreateOptions added in v0.2.0

type AutoScaleVCoresClientCreateOptions struct {
}

AutoScaleVCoresClientCreateOptions contains the optional parameters for the AutoScaleVCoresClient.Create method.

type AutoScaleVCoresClientCreateResponse added in v0.2.0

type AutoScaleVCoresClientCreateResponse struct {
	// Represents an instance of an auto scale v-core resource.
	AutoScaleVCore
}

AutoScaleVCoresClientCreateResponse contains the response from method AutoScaleVCoresClient.Create.

type AutoScaleVCoresClientDeleteOptions added in v0.2.0

type AutoScaleVCoresClientDeleteOptions struct {
}

AutoScaleVCoresClientDeleteOptions contains the optional parameters for the AutoScaleVCoresClient.Delete method.

type AutoScaleVCoresClientDeleteResponse added in v0.2.0

type AutoScaleVCoresClientDeleteResponse struct {
}

AutoScaleVCoresClientDeleteResponse contains the response from method AutoScaleVCoresClient.Delete.

type AutoScaleVCoresClientGetOptions added in v0.2.0

type AutoScaleVCoresClientGetOptions struct {
}

AutoScaleVCoresClientGetOptions contains the optional parameters for the AutoScaleVCoresClient.Get method.

type AutoScaleVCoresClientGetResponse added in v0.2.0

type AutoScaleVCoresClientGetResponse struct {
	// Represents an instance of an auto scale v-core resource.
	AutoScaleVCore
}

AutoScaleVCoresClientGetResponse contains the response from method AutoScaleVCoresClient.Get.

type AutoScaleVCoresClientListByResourceGroupOptions added in v0.2.0

type AutoScaleVCoresClientListByResourceGroupOptions struct {
}

AutoScaleVCoresClientListByResourceGroupOptions contains the optional parameters for the AutoScaleVCoresClient.NewListByResourceGroupPager method.

type AutoScaleVCoresClientListByResourceGroupResponse added in v0.2.0

type AutoScaleVCoresClientListByResourceGroupResponse struct {
	// An array of auto scale v-core resources.
	AutoScaleVCoreListResult
}

AutoScaleVCoresClientListByResourceGroupResponse contains the response from method AutoScaleVCoresClient.NewListByResourceGroupPager.

type AutoScaleVCoresClientListBySubscriptionOptions added in v0.2.0

type AutoScaleVCoresClientListBySubscriptionOptions struct {
}

AutoScaleVCoresClientListBySubscriptionOptions contains the optional parameters for the AutoScaleVCoresClient.NewListBySubscriptionPager method.

type AutoScaleVCoresClientListBySubscriptionResponse added in v0.2.0

type AutoScaleVCoresClientListBySubscriptionResponse struct {
	// An array of auto scale v-core resources.
	AutoScaleVCoreListResult
}

AutoScaleVCoresClientListBySubscriptionResponse contains the response from method AutoScaleVCoresClient.NewListBySubscriptionPager.

type AutoScaleVCoresClientUpdateOptions added in v0.2.0

type AutoScaleVCoresClientUpdateOptions struct {
}

AutoScaleVCoresClientUpdateOptions contains the optional parameters for the AutoScaleVCoresClient.Update method.

type AutoScaleVCoresClientUpdateResponse added in v0.2.0

type AutoScaleVCoresClientUpdateResponse struct {
	// Represents an instance of an auto scale v-core resource.
	AutoScaleVCore
}

AutoScaleVCoresClientUpdateResponse contains the response from method AutoScaleVCoresClient.Update.

type CapacitiesClient

type CapacitiesClient struct {
	// contains filtered or unexported fields
}

CapacitiesClient contains the methods for the Capacities group. Don't use this type directly, use NewCapacitiesClient() instead.

func NewCapacitiesClient

func NewCapacitiesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CapacitiesClient, error)

NewCapacitiesClient creates a new instance of CapacitiesClient with the specified values.

  • subscriptionID - A unique identifier for a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*CapacitiesClient) BeginCreate

func (client *CapacitiesClient) BeginCreate(ctx context.Context, resourceGroupName string, dedicatedCapacityName string, capacityParameters DedicatedCapacity, options *CapacitiesClientBeginCreateOptions) (*runtime.Poller[CapacitiesClientCreateResponse], error)

BeginCreate - Provisions the specified Dedicated capacity based on the configuration specified in the request. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-01-01

  • resourceGroupName - The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90.
  • dedicatedCapacityName - The name of the Dedicated capacity. It must be a minimum of 3 characters, and a maximum of 63.
  • capacityParameters - Contains the information used to provision the Dedicated capacity.
  • options - CapacitiesClientBeginCreateOptions contains the optional parameters for the CapacitiesClient.BeginCreate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/createCapacity.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/powerbidedicated/armpowerbidedicated"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armpowerbidedicated.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewCapacitiesClient().BeginCreate(ctx, "TestRG", "azsdktest", armpowerbidedicated.DedicatedCapacity{
		Location: to.Ptr("West US"),
		Tags: map[string]*string{
			"testKey": to.Ptr("testValue"),
		},
		Properties: &armpowerbidedicated.DedicatedCapacityProperties{
			Administration: &armpowerbidedicated.DedicatedCapacityAdministrators{
				Members: []*string{
					to.Ptr("azsdktest@microsoft.com"),
					to.Ptr("azsdktest2@microsoft.com")},
			},
		},
		SKU: &armpowerbidedicated.CapacitySKU{
			Name: to.Ptr("A1"),
			Tier: to.Ptr(armpowerbidedicated.CapacitySKUTierPBIEAzure),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.DedicatedCapacity = armpowerbidedicated.DedicatedCapacity{
	// 	Name: to.Ptr("azsdktest"),
	// 	ID: to.Ptr("/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG/providers/Microsoft.PowerBIDedicated/capacities/azsdktest"),
	// 	Location: to.Ptr("West US"),
	// 	SystemData: &armpowerbidedicated.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-01T00:00:19.123Z"); return t}()),
	// 		CreatedBy: to.Ptr("user1"),
	// 		CreatedByType: to.Ptr(armpowerbidedicated.IdentityTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-01T00:00:19.123Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("user2"),
	// 		LastModifiedByType: to.Ptr(armpowerbidedicated.IdentityTypeUser),
	// 	},
	// 	Tags: map[string]*string{
	// 		"testKey": to.Ptr("testValue"),
	// 	},
	// 	Properties: &armpowerbidedicated.DedicatedCapacityProperties{
	// 		Administration: &armpowerbidedicated.DedicatedCapacityAdministrators{
	// 			Members: []*string{
	// 				to.Ptr("azsdktest@microsoft.com"),
	// 				to.Ptr("azsdktest2@microsoft.com")},
	// 			},
	// 			ProvisioningState: to.Ptr(armpowerbidedicated.CapacityProvisioningStateSucceeded),
	// 			State: to.Ptr(armpowerbidedicated.StateProvisioning),
	// 		},
	// 		SKU: &armpowerbidedicated.CapacitySKU{
	// 			Name: to.Ptr("A1"),
	// 			Tier: to.Ptr(armpowerbidedicated.CapacitySKUTierPBIEAzure),
	// 		},
	// 	}
}
Output:

func (*CapacitiesClient) BeginDelete

func (client *CapacitiesClient) BeginDelete(ctx context.Context, resourceGroupName string, dedicatedCapacityName string, options *CapacitiesClientBeginDeleteOptions) (*runtime.Poller[CapacitiesClientDeleteResponse], error)

BeginDelete - Deletes the specified Dedicated capacity. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-01-01

  • resourceGroupName - The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90.
  • dedicatedCapacityName - The name of the Dedicated capacity. It must be at least 3 characters in length, and no more than 63.
  • options - CapacitiesClientBeginDeleteOptions contains the optional parameters for the CapacitiesClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/deleteCapacity.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/powerbidedicated/armpowerbidedicated"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armpowerbidedicated.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewCapacitiesClient().BeginDelete(ctx, "TestRG", "azsdktest", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*CapacitiesClient) BeginResume

func (client *CapacitiesClient) BeginResume(ctx context.Context, resourceGroupName string, dedicatedCapacityName string, options *CapacitiesClientBeginResumeOptions) (*runtime.Poller[CapacitiesClientResumeResponse], error)

BeginResume - Resumes operation of the specified Dedicated capacity instance. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-01-01

  • resourceGroupName - The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90.
  • dedicatedCapacityName - The name of the Dedicated capacity. It must be at least 3 characters in length, and no more than 63.
  • options - CapacitiesClientBeginResumeOptions contains the optional parameters for the CapacitiesClient.BeginResume method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/resumeCapacity.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/powerbidedicated/armpowerbidedicated"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armpowerbidedicated.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewCapacitiesClient().BeginResume(ctx, "TestRG", "azsdktest", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*CapacitiesClient) BeginSuspend

func (client *CapacitiesClient) BeginSuspend(ctx context.Context, resourceGroupName string, dedicatedCapacityName string, options *CapacitiesClientBeginSuspendOptions) (*runtime.Poller[CapacitiesClientSuspendResponse], error)

BeginSuspend - Suspends operation of the specified dedicated capacity instance. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-01-01

  • resourceGroupName - The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90.
  • dedicatedCapacityName - The name of the Dedicated capacity. It must be at least 3 characters in length, and no more than 63.
  • options - CapacitiesClientBeginSuspendOptions contains the optional parameters for the CapacitiesClient.BeginSuspend method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/suspendCapacity.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/powerbidedicated/armpowerbidedicated"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armpowerbidedicated.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewCapacitiesClient().BeginSuspend(ctx, "TestRG", "azsdktest", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*CapacitiesClient) BeginUpdate

func (client *CapacitiesClient) BeginUpdate(ctx context.Context, resourceGroupName string, dedicatedCapacityName string, capacityUpdateParameters DedicatedCapacityUpdateParameters, options *CapacitiesClientBeginUpdateOptions) (*runtime.Poller[CapacitiesClientUpdateResponse], error)

BeginUpdate - Updates the current state of the specified Dedicated capacity. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-01-01

  • resourceGroupName - The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90.
  • dedicatedCapacityName - The name of the Dedicated capacity. It must be at least 3 characters in length, and no more than 63.
  • capacityUpdateParameters - Request object that contains the updated information for the capacity.
  • options - CapacitiesClientBeginUpdateOptions contains the optional parameters for the CapacitiesClient.BeginUpdate method.
Example (UpdateCapacityParameters)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/updateCapacity.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/powerbidedicated/armpowerbidedicated"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armpowerbidedicated.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewCapacitiesClient().BeginUpdate(ctx, "TestRG", "azsdktest", armpowerbidedicated.DedicatedCapacityUpdateParameters{
		Properties: &armpowerbidedicated.DedicatedCapacityMutableProperties{
			Administration: &armpowerbidedicated.DedicatedCapacityAdministrators{
				Members: []*string{
					to.Ptr("azsdktest@microsoft.com"),
					to.Ptr("azsdktest2@microsoft.com")},
			},
		},
		SKU: &armpowerbidedicated.CapacitySKU{
			Name: to.Ptr("A1"),
			Tier: to.Ptr(armpowerbidedicated.CapacitySKUTierPBIEAzure),
		},
		Tags: map[string]*string{
			"testKey": to.Ptr("testValue"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.DedicatedCapacity = armpowerbidedicated.DedicatedCapacity{
	// 	Name: to.Ptr("azsdktest"),
	// 	ID: to.Ptr("/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG/providers/Microsoft.PowerBIDedicated/capacities/azsdktest"),
	// 	Location: to.Ptr("West US"),
	// 	SystemData: &armpowerbidedicated.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-01T00:00:19.123Z"); return t}()),
	// 		CreatedBy: to.Ptr("user1"),
	// 		CreatedByType: to.Ptr(armpowerbidedicated.IdentityTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-01T00:00:19.123Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("user2"),
	// 		LastModifiedByType: to.Ptr(armpowerbidedicated.IdentityTypeUser),
	// 	},
	// 	Tags: map[string]*string{
	// 		"testKey": to.Ptr("testValue"),
	// 	},
	// 	Properties: &armpowerbidedicated.DedicatedCapacityProperties{
	// 		Administration: &armpowerbidedicated.DedicatedCapacityAdministrators{
	// 			Members: []*string{
	// 				to.Ptr("azsdktest@microsoft.com"),
	// 				to.Ptr("azsdktest2@microsoft.com")},
	// 			},
	// 			ProvisioningState: to.Ptr(armpowerbidedicated.CapacityProvisioningStateSucceeded),
	// 			State: to.Ptr(armpowerbidedicated.StateProvisioning),
	// 		},
	// 		SKU: &armpowerbidedicated.CapacitySKU{
	// 			Name: to.Ptr("A1"),
	// 			Tier: to.Ptr(armpowerbidedicated.CapacitySKUTierPBIEAzure),
	// 		},
	// 	}
}
Output:

Example (UpdateCapacityToGeneration2)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/updateToGen2.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/powerbidedicated/armpowerbidedicated"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armpowerbidedicated.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewCapacitiesClient().BeginUpdate(ctx, "TestRG", "azsdktest", armpowerbidedicated.DedicatedCapacityUpdateParameters{
		Properties: &armpowerbidedicated.DedicatedCapacityMutableProperties{
			Mode: to.Ptr(armpowerbidedicated.ModeGen2),
		},
		SKU: &armpowerbidedicated.CapacitySKU{
			Name: to.Ptr("A1"),
			Tier: to.Ptr(armpowerbidedicated.CapacitySKUTierPBIEAzure),
		},
		Tags: map[string]*string{
			"testKey": to.Ptr("testValue"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.DedicatedCapacity = armpowerbidedicated.DedicatedCapacity{
	// 	Name: to.Ptr("azsdktest"),
	// 	ID: to.Ptr("/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG/providers/Microsoft.PowerBIDedicated/capacities/azsdktest"),
	// 	Location: to.Ptr("West US"),
	// 	SystemData: &armpowerbidedicated.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-01T00:00:19.123Z"); return t}()),
	// 		CreatedBy: to.Ptr("user1"),
	// 		CreatedByType: to.Ptr(armpowerbidedicated.IdentityTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-01T00:00:19.123Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("user2"),
	// 		LastModifiedByType: to.Ptr(armpowerbidedicated.IdentityTypeUser),
	// 	},
	// 	Tags: map[string]*string{
	// 		"testKey": to.Ptr("testValue"),
	// 	},
	// 	Properties: &armpowerbidedicated.DedicatedCapacityProperties{
	// 		Administration: &armpowerbidedicated.DedicatedCapacityAdministrators{
	// 			Members: []*string{
	// 				to.Ptr("azsdktest@microsoft.com"),
	// 				to.Ptr("azsdktest2@microsoft.com")},
	// 			},
	// 			Mode: to.Ptr(armpowerbidedicated.ModeGen2),
	// 			ProvisioningState: to.Ptr(armpowerbidedicated.CapacityProvisioningStateSucceeded),
	// 			State: to.Ptr(armpowerbidedicated.StateProvisioning),
	// 		},
	// 		SKU: &armpowerbidedicated.CapacitySKU{
	// 			Name: to.Ptr("A1"),
	// 			Tier: to.Ptr(armpowerbidedicated.CapacitySKUTierPBIEAzure),
	// 		},
	// 	}
}
Output:

func (*CapacitiesClient) CheckNameAvailability

CheckNameAvailability - Check the name availability in the target location. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-01-01

  • location - The region name which the operation will lookup into.
  • capacityParameters - The name of the capacity.
  • options - CapacitiesClientCheckNameAvailabilityOptions contains the optional parameters for the CapacitiesClient.CheckNameAvailability method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/checkNameAvailability.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/powerbidedicated/armpowerbidedicated"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armpowerbidedicated.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewCapacitiesClient().CheckNameAvailability(ctx, "West US", armpowerbidedicated.CheckCapacityNameAvailabilityParameters{
		Name: to.Ptr("azsdktest"),
		Type: to.Ptr("Microsoft.PowerBIDedicated/capacities"),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.CheckCapacityNameAvailabilityResult = armpowerbidedicated.CheckCapacityNameAvailabilityResult{
	// 	NameAvailable: to.Ptr(true),
	// }
}
Output:

func (*CapacitiesClient) GetDetails

func (client *CapacitiesClient) GetDetails(ctx context.Context, resourceGroupName string, dedicatedCapacityName string, options *CapacitiesClientGetDetailsOptions) (CapacitiesClientGetDetailsResponse, error)

GetDetails - Gets details about the specified dedicated capacity. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-01-01

  • resourceGroupName - The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90.
  • dedicatedCapacityName - The name of the dedicated capacity. It must be a minimum of 3 characters, and a maximum of 63.
  • options - CapacitiesClientGetDetailsOptions contains the optional parameters for the CapacitiesClient.GetDetails method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/getCapacity.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/powerbidedicated/armpowerbidedicated"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armpowerbidedicated.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewCapacitiesClient().GetDetails(ctx, "TestRG", "azsdktest", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.DedicatedCapacity = armpowerbidedicated.DedicatedCapacity{
	// 	Name: to.Ptr("azsdktest"),
	// 	ID: to.Ptr("/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG/providers/Microsoft.PowerBIDedicated/capacities/azsdktest"),
	// 	Location: to.Ptr("West US"),
	// 	SystemData: &armpowerbidedicated.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-01T00:00:19.123Z"); return t}()),
	// 		CreatedBy: to.Ptr("user1"),
	// 		CreatedByType: to.Ptr(armpowerbidedicated.IdentityTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-01T00:00:19.123Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("user2"),
	// 		LastModifiedByType: to.Ptr(armpowerbidedicated.IdentityTypeUser),
	// 	},
	// 	Tags: map[string]*string{
	// 	},
	// 	Properties: &armpowerbidedicated.DedicatedCapacityProperties{
	// 		Administration: &armpowerbidedicated.DedicatedCapacityAdministrators{
	// 			Members: []*string{
	// 				to.Ptr("azsdktest@microsoft.com")},
	// 			},
	// 			ProvisioningState: to.Ptr(armpowerbidedicated.CapacityProvisioningStateSucceeded),
	// 			State: to.Ptr(armpowerbidedicated.StateProvisioning),
	// 		},
	// 		SKU: &armpowerbidedicated.CapacitySKU{
	// 			Name: to.Ptr("A1"),
	// 			Tier: to.Ptr(armpowerbidedicated.CapacitySKUTierPBIEAzure),
	// 		},
	// 	}
}
Output:

func (*CapacitiesClient) ListSKUs

ListSKUs - Lists eligible SKUs for PowerBI Dedicated resource provider. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-01-01

  • options - CapacitiesClientListSKUsOptions contains the optional parameters for the CapacitiesClient.ListSKUs method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/listSKUsForNew.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/powerbidedicated/armpowerbidedicated"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armpowerbidedicated.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewCapacitiesClient().ListSKUs(ctx, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.SKUEnumerationForNewResourceResult = armpowerbidedicated.SKUEnumerationForNewResourceResult{
	// 	Value: []*armpowerbidedicated.CapacitySKU{
	// 		{
	// 			Name: to.Ptr("A1"),
	// 		},
	// 		{
	// 			Name: to.Ptr("A2"),
	// 		},
	// 		{
	// 			Name: to.Ptr("A3"),
	// 		},
	// 		{
	// 			Name: to.Ptr("A4"),
	// 		},
	// 		{
	// 			Name: to.Ptr("A5"),
	// 		},
	// 		{
	// 			Name: to.Ptr("A6"),
	// 	}},
	// }
}
Output:

func (*CapacitiesClient) ListSKUsForCapacity

func (client *CapacitiesClient) ListSKUsForCapacity(ctx context.Context, resourceGroupName string, dedicatedCapacityName string, options *CapacitiesClientListSKUsForCapacityOptions) (CapacitiesClientListSKUsForCapacityResponse, error)

ListSKUsForCapacity - Lists eligible SKUs for a PowerBI Dedicated resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-01-01

  • resourceGroupName - The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90.
  • dedicatedCapacityName - The name of the Dedicated capacity. It must be at least 3 characters in length, and no more than 63.
  • options - CapacitiesClientListSKUsForCapacityOptions contains the optional parameters for the CapacitiesClient.ListSKUsForCapacity method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/listSKUsForExisting.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/powerbidedicated/armpowerbidedicated"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armpowerbidedicated.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewCapacitiesClient().ListSKUsForCapacity(ctx, "TestRG", "azsdktest", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.SKUEnumerationForExistingResourceResult = armpowerbidedicated.SKUEnumerationForExistingResourceResult{
	// 	Value: []*armpowerbidedicated.SKUDetailsForExistingResource{
	// 		{
	// 			SKU: &armpowerbidedicated.CapacitySKU{
	// 				Name: to.Ptr("A2"),
	// 				Tier: to.Ptr(armpowerbidedicated.CapacitySKUTierPBIEAzure),
	// 			},
	// 		},
	// 		{
	// 			SKU: &armpowerbidedicated.CapacitySKU{
	// 				Name: to.Ptr("A3"),
	// 				Tier: to.Ptr(armpowerbidedicated.CapacitySKUTierPBIEAzure),
	// 			},
	// 		},
	// 		{
	// 			SKU: &armpowerbidedicated.CapacitySKU{
	// 				Name: to.Ptr("A4"),
	// 				Tier: to.Ptr(armpowerbidedicated.CapacitySKUTierPBIEAzure),
	// 			},
	// 		},
	// 		{
	// 			SKU: &armpowerbidedicated.CapacitySKU{
	// 				Name: to.Ptr("A5"),
	// 				Tier: to.Ptr(armpowerbidedicated.CapacitySKUTierPBIEAzure),
	// 			},
	// 		},
	// 		{
	// 			SKU: &armpowerbidedicated.CapacitySKU{
	// 				Name: to.Ptr("A6"),
	// 				Tier: to.Ptr(armpowerbidedicated.CapacitySKUTierPBIEAzure),
	// 			},
	// 	}},
	// }
}
Output:

func (*CapacitiesClient) NewListByResourceGroupPager added in v0.4.0

func (client *CapacitiesClient) NewListByResourceGroupPager(resourceGroupName string, options *CapacitiesClientListByResourceGroupOptions) *runtime.Pager[CapacitiesClientListByResourceGroupResponse]

NewListByResourceGroupPager - Gets all the Dedicated capacities for the given resource group.

Generated from API version 2021-01-01

  • resourceGroupName - The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90.
  • options - CapacitiesClientListByResourceGroupOptions contains the optional parameters for the CapacitiesClient.NewListByResourceGroupPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/listCapacitiesInResourceGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/powerbidedicated/armpowerbidedicated"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armpowerbidedicated.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewCapacitiesClient().NewListByResourceGroupPager("TestRG", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.DedicatedCapacities = armpowerbidedicated.DedicatedCapacities{
		// 	Value: []*armpowerbidedicated.DedicatedCapacity{
		// 		{
		// 			Name: to.Ptr("azsdktest"),
		// 			ID: to.Ptr("/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG/providers/Microsoft.PowerBIDedicated/capacities/azsdktest"),
		// 			Location: to.Ptr("West US"),
		// 			Tags: map[string]*string{
		// 				"testKey": to.Ptr("testValue"),
		// 			},
		// 			Properties: &armpowerbidedicated.DedicatedCapacityProperties{
		// 				Administration: &armpowerbidedicated.DedicatedCapacityAdministrators{
		// 					Members: []*string{
		// 						to.Ptr("azsdktest@microsoft.com")},
		// 					},
		// 					ProvisioningState: to.Ptr(armpowerbidedicated.CapacityProvisioningStateSucceeded),
		// 					State: to.Ptr(armpowerbidedicated.StateProvisioning),
		// 				},
		// 				SKU: &armpowerbidedicated.CapacitySKU{
		// 					Name: to.Ptr("A1"),
		// 					Tier: to.Ptr(armpowerbidedicated.CapacitySKUTierPBIEAzure),
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("azsdktest2"),
		// 				ID: to.Ptr("/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG/providers/Microsoft.PowerBIDedicated/capacities/azsdktest"),
		// 				Location: to.Ptr("West US"),
		// 				Tags: map[string]*string{
		// 					"testKey": to.Ptr("testValue"),
		// 				},
		// 				Properties: &armpowerbidedicated.DedicatedCapacityProperties{
		// 					Administration: &armpowerbidedicated.DedicatedCapacityAdministrators{
		// 						Members: []*string{
		// 							to.Ptr("azsdktest@microsoft.com")},
		// 						},
		// 						ProvisioningState: to.Ptr(armpowerbidedicated.CapacityProvisioningStateSucceeded),
		// 						State: to.Ptr(armpowerbidedicated.StateProvisioning),
		// 					},
		// 					SKU: &armpowerbidedicated.CapacitySKU{
		// 						Name: to.Ptr("A2"),
		// 						Tier: to.Ptr(armpowerbidedicated.CapacitySKUTierPBIEAzure),
		// 					},
		// 			}},
		// 		}
	}
}
Output:

func (*CapacitiesClient) NewListPager added in v0.4.0

NewListPager - Lists all the Dedicated capacities for the given subscription.

Generated from API version 2021-01-01

  • options - CapacitiesClientListOptions contains the optional parameters for the CapacitiesClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/listCapacitiesInSubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/powerbidedicated/armpowerbidedicated"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armpowerbidedicated.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewCapacitiesClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.DedicatedCapacities = armpowerbidedicated.DedicatedCapacities{
		// 	Value: []*armpowerbidedicated.DedicatedCapacity{
		// 		{
		// 			Name: to.Ptr("azsdktest"),
		// 			ID: to.Ptr("/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/providers/Microsoft.PowerBIDedicated/capacities/azsdktest"),
		// 			Location: to.Ptr("West US"),
		// 			Tags: map[string]*string{
		// 				"testKey": to.Ptr("testValue"),
		// 			},
		// 			Properties: &armpowerbidedicated.DedicatedCapacityProperties{
		// 				Administration: &armpowerbidedicated.DedicatedCapacityAdministrators{
		// 					Members: []*string{
		// 						to.Ptr("azsdktest@microsoft.com")},
		// 					},
		// 					ProvisioningState: to.Ptr(armpowerbidedicated.CapacityProvisioningStateSucceeded),
		// 					State: to.Ptr(armpowerbidedicated.StateProvisioning),
		// 				},
		// 				SKU: &armpowerbidedicated.CapacitySKU{
		// 					Name: to.Ptr("A1"),
		// 					Tier: to.Ptr(armpowerbidedicated.CapacitySKUTierPBIEAzure),
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("azsdktest2"),
		// 				ID: to.Ptr("/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/providers/Microsoft.PowerBIDedicated/capacities/azsdktest"),
		// 				Location: to.Ptr("West US"),
		// 				Tags: map[string]*string{
		// 					"testKey": to.Ptr("testValue"),
		// 				},
		// 				Properties: &armpowerbidedicated.DedicatedCapacityProperties{
		// 					Administration: &armpowerbidedicated.DedicatedCapacityAdministrators{
		// 						Members: []*string{
		// 							to.Ptr("azsdktest@microsoft.com")},
		// 						},
		// 						ProvisioningState: to.Ptr(armpowerbidedicated.CapacityProvisioningStateSucceeded),
		// 						State: to.Ptr(armpowerbidedicated.StateProvisioning),
		// 					},
		// 					SKU: &armpowerbidedicated.CapacitySKU{
		// 						Name: to.Ptr("A2"),
		// 						Tier: to.Ptr(armpowerbidedicated.CapacitySKUTierPBIEAzure),
		// 					},
		// 			}},
		// 		}
	}
}
Output:

type CapacitiesClientBeginCreateOptions added in v0.2.0

type CapacitiesClientBeginCreateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

CapacitiesClientBeginCreateOptions contains the optional parameters for the CapacitiesClient.BeginCreate method.

type CapacitiesClientBeginDeleteOptions added in v0.2.0

type CapacitiesClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

CapacitiesClientBeginDeleteOptions contains the optional parameters for the CapacitiesClient.BeginDelete method.

type CapacitiesClientBeginResumeOptions added in v0.2.0

type CapacitiesClientBeginResumeOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

CapacitiesClientBeginResumeOptions contains the optional parameters for the CapacitiesClient.BeginResume method.

type CapacitiesClientBeginSuspendOptions added in v0.2.0

type CapacitiesClientBeginSuspendOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

CapacitiesClientBeginSuspendOptions contains the optional parameters for the CapacitiesClient.BeginSuspend method.

type CapacitiesClientBeginUpdateOptions added in v0.2.0

type CapacitiesClientBeginUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

CapacitiesClientBeginUpdateOptions contains the optional parameters for the CapacitiesClient.BeginUpdate method.

type CapacitiesClientCheckNameAvailabilityOptions added in v0.2.0

type CapacitiesClientCheckNameAvailabilityOptions struct {
}

CapacitiesClientCheckNameAvailabilityOptions contains the optional parameters for the CapacitiesClient.CheckNameAvailability method.

type CapacitiesClientCheckNameAvailabilityResponse added in v0.2.0

type CapacitiesClientCheckNameAvailabilityResponse struct {
	// The checking result of capacity name availability.
	CheckCapacityNameAvailabilityResult
}

CapacitiesClientCheckNameAvailabilityResponse contains the response from method CapacitiesClient.CheckNameAvailability.

type CapacitiesClientCreateResponse added in v0.2.0

type CapacitiesClientCreateResponse struct {
	// Represents an instance of a Dedicated Capacity resource.
	DedicatedCapacity
}

CapacitiesClientCreateResponse contains the response from method CapacitiesClient.BeginCreate.

type CapacitiesClientDeleteResponse added in v0.2.0

type CapacitiesClientDeleteResponse struct {
}

CapacitiesClientDeleteResponse contains the response from method CapacitiesClient.BeginDelete.

type CapacitiesClientGetDetailsOptions added in v0.2.0

type CapacitiesClientGetDetailsOptions struct {
}

CapacitiesClientGetDetailsOptions contains the optional parameters for the CapacitiesClient.GetDetails method.

type CapacitiesClientGetDetailsResponse added in v0.2.0

type CapacitiesClientGetDetailsResponse struct {
	// Represents an instance of a Dedicated Capacity resource.
	DedicatedCapacity
}

CapacitiesClientGetDetailsResponse contains the response from method CapacitiesClient.GetDetails.

type CapacitiesClientListByResourceGroupOptions added in v0.2.0

type CapacitiesClientListByResourceGroupOptions struct {
}

CapacitiesClientListByResourceGroupOptions contains the optional parameters for the CapacitiesClient.NewListByResourceGroupPager method.

type CapacitiesClientListByResourceGroupResponse added in v0.2.0

type CapacitiesClientListByResourceGroupResponse struct {
	// An array of Dedicated capacities resources.
	DedicatedCapacities
}

CapacitiesClientListByResourceGroupResponse contains the response from method CapacitiesClient.NewListByResourceGroupPager.

type CapacitiesClientListOptions added in v0.2.0

type CapacitiesClientListOptions struct {
}

CapacitiesClientListOptions contains the optional parameters for the CapacitiesClient.NewListPager method.

type CapacitiesClientListResponse added in v0.2.0

type CapacitiesClientListResponse struct {
	// An array of Dedicated capacities resources.
	DedicatedCapacities
}

CapacitiesClientListResponse contains the response from method CapacitiesClient.NewListPager.

type CapacitiesClientListSKUsForCapacityOptions added in v0.2.0

type CapacitiesClientListSKUsForCapacityOptions struct {
}

CapacitiesClientListSKUsForCapacityOptions contains the optional parameters for the CapacitiesClient.ListSKUsForCapacity method.

type CapacitiesClientListSKUsForCapacityResponse added in v0.2.0

type CapacitiesClientListSKUsForCapacityResponse struct {
	// An object that represents enumerating SKUs for existing resources
	SKUEnumerationForExistingResourceResult
}

CapacitiesClientListSKUsForCapacityResponse contains the response from method CapacitiesClient.ListSKUsForCapacity.

type CapacitiesClientListSKUsOptions added in v0.2.0

type CapacitiesClientListSKUsOptions struct {
}

CapacitiesClientListSKUsOptions contains the optional parameters for the CapacitiesClient.ListSKUs method.

type CapacitiesClientListSKUsResponse added in v0.2.0

type CapacitiesClientListSKUsResponse struct {
	// An object that represents enumerating SKUs for new resources
	SKUEnumerationForNewResourceResult
}

CapacitiesClientListSKUsResponse contains the response from method CapacitiesClient.ListSKUs.

type CapacitiesClientResumeResponse added in v0.2.0

type CapacitiesClientResumeResponse struct {
}

CapacitiesClientResumeResponse contains the response from method CapacitiesClient.BeginResume.

type CapacitiesClientSuspendResponse added in v0.2.0

type CapacitiesClientSuspendResponse struct {
}

CapacitiesClientSuspendResponse contains the response from method CapacitiesClient.BeginSuspend.

type CapacitiesClientUpdateResponse added in v0.2.0

type CapacitiesClientUpdateResponse struct {
	// Represents an instance of a Dedicated Capacity resource.
	DedicatedCapacity
}

CapacitiesClientUpdateResponse contains the response from method CapacitiesClient.BeginUpdate.

type CapacityProvisioningState

type CapacityProvisioningState string

CapacityProvisioningState - The current deployment state of PowerBI Dedicated resource. The provisioningState is to indicate states for resource provisioning.

const (
	CapacityProvisioningStateDeleting     CapacityProvisioningState = "Deleting"
	CapacityProvisioningStateFailed       CapacityProvisioningState = "Failed"
	CapacityProvisioningStatePaused       CapacityProvisioningState = "Paused"
	CapacityProvisioningStatePausing      CapacityProvisioningState = "Pausing"
	CapacityProvisioningStatePreparing    CapacityProvisioningState = "Preparing"
	CapacityProvisioningStateProvisioning CapacityProvisioningState = "Provisioning"
	CapacityProvisioningStateResuming     CapacityProvisioningState = "Resuming"
	CapacityProvisioningStateScaling      CapacityProvisioningState = "Scaling"
	CapacityProvisioningStateSucceeded    CapacityProvisioningState = "Succeeded"
	CapacityProvisioningStateSuspended    CapacityProvisioningState = "Suspended"
	CapacityProvisioningStateSuspending   CapacityProvisioningState = "Suspending"
	CapacityProvisioningStateUpdating     CapacityProvisioningState = "Updating"
)

func PossibleCapacityProvisioningStateValues

func PossibleCapacityProvisioningStateValues() []CapacityProvisioningState

PossibleCapacityProvisioningStateValues returns the possible values for the CapacityProvisioningState const type.

type CapacitySKU

type CapacitySKU struct {
	// REQUIRED; Name of the SKU level.
	Name *string

	// The capacity of the SKU.
	Capacity *int32

	// The name of the Azure pricing tier to which the SKU applies.
	Tier *CapacitySKUTier
}

CapacitySKU - Represents the SKU name and Azure pricing tier for PowerBI Dedicated capacity resource.

func (CapacitySKU) MarshalJSON added in v1.1.0

func (c CapacitySKU) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CapacitySKU.

func (*CapacitySKU) UnmarshalJSON added in v1.1.0

func (c *CapacitySKU) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CapacitySKU.

type CapacitySKUTier

type CapacitySKUTier string

CapacitySKUTier - The name of the Azure pricing tier to which the SKU applies.

const (
	CapacitySKUTierAutoPremiumHost CapacitySKUTier = "AutoPremiumHost"
	CapacitySKUTierPBIEAzure       CapacitySKUTier = "PBIE_Azure"
	CapacitySKUTierPremium         CapacitySKUTier = "Premium"
)

func PossibleCapacitySKUTierValues

func PossibleCapacitySKUTierValues() []CapacitySKUTier

PossibleCapacitySKUTierValues returns the possible values for the CapacitySKUTier const type.

type CheckCapacityNameAvailabilityParameters

type CheckCapacityNameAvailabilityParameters struct {
	// Name for checking availability.
	Name *string

	// The resource type of PowerBI dedicated.
	Type *string
}

CheckCapacityNameAvailabilityParameters - Details of capacity name request body.

func (CheckCapacityNameAvailabilityParameters) MarshalJSON added in v1.1.0

func (c CheckCapacityNameAvailabilityParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CheckCapacityNameAvailabilityParameters.

func (*CheckCapacityNameAvailabilityParameters) UnmarshalJSON added in v1.1.0

func (c *CheckCapacityNameAvailabilityParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CheckCapacityNameAvailabilityParameters.

type CheckCapacityNameAvailabilityResult

type CheckCapacityNameAvailabilityResult struct {
	// The detailed message of the request unavailability.
	Message *string

	// Indicator of availability of the capacity name.
	NameAvailable *bool

	// The reason of unavailability.
	Reason *string
}

CheckCapacityNameAvailabilityResult - The checking result of capacity name availability.

func (CheckCapacityNameAvailabilityResult) MarshalJSON added in v1.1.0

func (c CheckCapacityNameAvailabilityResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CheckCapacityNameAvailabilityResult.

func (*CheckCapacityNameAvailabilityResult) UnmarshalJSON added in v1.1.0

func (c *CheckCapacityNameAvailabilityResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CheckCapacityNameAvailabilityResult.

type ClientFactory added in v1.1.0

type ClientFactory struct {
	// contains filtered or unexported fields
}

ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.

func NewClientFactory added in v1.1.0

func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)

NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.

  • subscriptionID - A unique identifier for a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ClientFactory) NewAutoScaleVCoresClient added in v1.1.0

func (c *ClientFactory) NewAutoScaleVCoresClient() *AutoScaleVCoresClient

NewAutoScaleVCoresClient creates a new instance of AutoScaleVCoresClient.

func (*ClientFactory) NewCapacitiesClient added in v1.1.0

func (c *ClientFactory) NewCapacitiesClient() *CapacitiesClient

NewCapacitiesClient creates a new instance of CapacitiesClient.

func (*ClientFactory) NewOperationsClient added in v1.1.0

func (c *ClientFactory) NewOperationsClient() *OperationsClient

NewOperationsClient creates a new instance of OperationsClient.

type DedicatedCapacities

type DedicatedCapacities struct {
	// REQUIRED; An array of Dedicated capacities resources.
	Value []*DedicatedCapacity
}

DedicatedCapacities - An array of Dedicated capacities resources.

func (DedicatedCapacities) MarshalJSON

func (d DedicatedCapacities) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DedicatedCapacities.

func (*DedicatedCapacities) UnmarshalJSON added in v1.1.0

func (d *DedicatedCapacities) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DedicatedCapacities.

type DedicatedCapacity

type DedicatedCapacity struct {
	// REQUIRED; Location of the PowerBI Dedicated resource.
	Location *string

	// REQUIRED; The SKU of the PowerBI Dedicated capacity resource.
	SKU *CapacitySKU

	// Properties of the provision operation request.
	Properties *DedicatedCapacityProperties

	// Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData

	// Key-value pairs of additional resource provisioning properties.
	Tags map[string]*string

	// READ-ONLY; An identifier that represents the PowerBI Dedicated resource.
	ID *string

	// READ-ONLY; The name of the PowerBI Dedicated resource.
	Name *string

	// READ-ONLY; The type of the PowerBI Dedicated resource.
	Type *string
}

DedicatedCapacity - Represents an instance of a Dedicated Capacity resource.

func (DedicatedCapacity) MarshalJSON

func (d DedicatedCapacity) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DedicatedCapacity.

func (*DedicatedCapacity) UnmarshalJSON added in v1.1.0

func (d *DedicatedCapacity) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DedicatedCapacity.

type DedicatedCapacityAdministrators

type DedicatedCapacityAdministrators struct {
	// An array of administrator user identities.
	Members []*string
}

DedicatedCapacityAdministrators - An array of administrator user identities

func (DedicatedCapacityAdministrators) MarshalJSON

func (d DedicatedCapacityAdministrators) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DedicatedCapacityAdministrators.

func (*DedicatedCapacityAdministrators) UnmarshalJSON added in v1.1.0

func (d *DedicatedCapacityAdministrators) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DedicatedCapacityAdministrators.

type DedicatedCapacityMutableProperties

type DedicatedCapacityMutableProperties struct {
	// A collection of Dedicated capacity administrators
	Administration *DedicatedCapacityAdministrators

	// Specifies the generation of the Power BI Embedded capacity. If no value is specified, the default value 'Gen2' is used.
	// Learn More
	// [https://docs.microsoft.com/power-bi/developer/embedded/power-bi-embedded-generation-2]
	Mode *Mode

	// READ-ONLY; Capacity name
	FriendlyName *string

	// READ-ONLY; Tenant ID for the capacity. Used for creating Pro Plus capacity.
	TenantID *string
}

DedicatedCapacityMutableProperties - An object that represents a set of mutable Dedicated capacity resource properties.

func (DedicatedCapacityMutableProperties) MarshalJSON added in v1.1.0

func (d DedicatedCapacityMutableProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DedicatedCapacityMutableProperties.

func (*DedicatedCapacityMutableProperties) UnmarshalJSON added in v1.1.0

func (d *DedicatedCapacityMutableProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DedicatedCapacityMutableProperties.

type DedicatedCapacityProperties

type DedicatedCapacityProperties struct {
	// A collection of Dedicated capacity administrators
	Administration *DedicatedCapacityAdministrators

	// Specifies the generation of the Power BI Embedded capacity. If no value is specified, the default value 'Gen2' is used.
	// Learn More
	// [https://docs.microsoft.com/power-bi/developer/embedded/power-bi-embedded-generation-2]
	Mode *Mode

	// READ-ONLY; Capacity name
	FriendlyName *string

	// READ-ONLY; The current deployment state of PowerBI Dedicated resource. The provisioningState is to indicate states for
	// resource provisioning.
	ProvisioningState *CapacityProvisioningState

	// READ-ONLY; The current state of PowerBI Dedicated resource. The state is to indicate more states outside of resource provisioning.
	State *State

	// READ-ONLY; Tenant ID for the capacity. Used for creating Pro Plus capacity.
	TenantID *string
}

DedicatedCapacityProperties - Properties of Dedicated Capacity resource.

func (DedicatedCapacityProperties) MarshalJSON added in v1.1.0

func (d DedicatedCapacityProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DedicatedCapacityProperties.

func (*DedicatedCapacityProperties) UnmarshalJSON added in v1.1.0

func (d *DedicatedCapacityProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DedicatedCapacityProperties.

type DedicatedCapacityUpdateParameters

type DedicatedCapacityUpdateParameters struct {
	// Properties of the provision operation request.
	Properties *DedicatedCapacityMutableProperties

	// The SKU of the Dedicated capacity resource.
	SKU *CapacitySKU

	// Key-value pairs of additional provisioning properties.
	Tags map[string]*string
}

DedicatedCapacityUpdateParameters - Provision request specification

func (DedicatedCapacityUpdateParameters) MarshalJSON

func (d DedicatedCapacityUpdateParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DedicatedCapacityUpdateParameters.

func (*DedicatedCapacityUpdateParameters) UnmarshalJSON added in v1.1.0

func (d *DedicatedCapacityUpdateParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DedicatedCapacityUpdateParameters.

type ErrorResponse

type ErrorResponse struct {
	// The error object
	Error *ErrorResponseError
}

ErrorResponse - Describes the format of Error response.

func (ErrorResponse) MarshalJSON added in v1.1.0

func (e ErrorResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ErrorResponse.

func (*ErrorResponse) UnmarshalJSON added in v1.1.0

func (e *ErrorResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse.

type ErrorResponseError

type ErrorResponseError struct {
	// Error code
	Code *string

	// Error message indicating why the operation failed.
	Message *string
}

ErrorResponseError - The error object

func (ErrorResponseError) MarshalJSON added in v1.1.0

func (e ErrorResponseError) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ErrorResponseError.

func (*ErrorResponseError) UnmarshalJSON added in v1.1.0

func (e *ErrorResponseError) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponseError.

type IdentityType

type IdentityType string

IdentityType - The type of identity that created/modified the resource.

const (
	IdentityTypeApplication     IdentityType = "Application"
	IdentityTypeKey             IdentityType = "Key"
	IdentityTypeManagedIdentity IdentityType = "ManagedIdentity"
	IdentityTypeUser            IdentityType = "User"
)

func PossibleIdentityTypeValues

func PossibleIdentityTypeValues() []IdentityType

PossibleIdentityTypeValues returns the possible values for the IdentityType const type.

type LogSpecification added in v0.2.0

type LogSpecification struct {
	// Localizable name of the log
	DisplayName *string

	// READ-ONLY; Blob duration for the log
	BlobDuration *string

	// READ-ONLY; Name of the log
	Name *string
}

LogSpecification - Log specification for exposing diagnostic logs to shoebox.

func (LogSpecification) MarshalJSON added in v1.1.0

func (l LogSpecification) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LogSpecification.

func (*LogSpecification) UnmarshalJSON added in v1.1.0

func (l *LogSpecification) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LogSpecification.

type MetricSpecification added in v0.2.0

type MetricSpecification struct {
	// For describing multi dimensional metrics
	Dimensions []*MetricSpecificationDimensionsItem

	// Localizable description of metric
	DisplayDescription *string

	// Localizable metric name
	DisplayName *string

	// READ-ONLY; Aggregation type for the metric
	AggregationType *string

	// READ-ONLY; Pattern used to filter the metric
	MetricFilterPattern *string

	// READ-ONLY; Metric name
	Name *string

	// READ-ONLY; Unit for the metric
	Unit *string
}

MetricSpecification - Metric specification for exposing performance metrics to shoebox.

func (MetricSpecification) MarshalJSON added in v0.2.0

func (m MetricSpecification) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MetricSpecification.

func (*MetricSpecification) UnmarshalJSON added in v1.1.0

func (m *MetricSpecification) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MetricSpecification.

type MetricSpecificationDimensionsItem added in v0.2.0

type MetricSpecificationDimensionsItem struct {
	// Localizable dimension of the metric
	DisplayName *string

	// READ-ONLY; Dimension of the metric
	Name *string
}

func (MetricSpecificationDimensionsItem) MarshalJSON added in v1.1.0

func (m MetricSpecificationDimensionsItem) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MetricSpecificationDimensionsItem.

func (*MetricSpecificationDimensionsItem) UnmarshalJSON added in v1.1.0

func (m *MetricSpecificationDimensionsItem) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MetricSpecificationDimensionsItem.

type Mode

type Mode string

Mode - Specifies the generation of the Power BI Embedded capacity. If no value is specified, the default value 'Gen2' is used. Learn More [https://docs.microsoft.com/power-bi/developer/embedded/power-bi-embedded-generation-2]

const (
	ModeGen1 Mode = "Gen1"
	ModeGen2 Mode = "Gen2"
)

func PossibleModeValues

func PossibleModeValues() []Mode

PossibleModeValues returns the possible values for the Mode const type.

type Operation

type Operation struct {
	// The object that represents the operation.
	Display *OperationDisplay

	// Additional properties to expose performance metrics to shoebox.
	Properties *OperationProperties

	// READ-ONLY; Operation name: {provider}/{resource}/{operation}.
	Name *string

	// READ-ONLY; Origin of the operation.
	Origin *string
}

Operation - Capacities REST API operation.

func (Operation) MarshalJSON added in v1.1.0

func (o Operation) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Operation.

func (*Operation) UnmarshalJSON added in v1.1.0

func (o *Operation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Operation.

type OperationDisplay

type OperationDisplay struct {
	// Localized description of the operation.
	Description *string

	// READ-ONLY; Operation type: create, update, delete, etc.
	Operation *string

	// READ-ONLY; Service provider: Microsoft.PowerBIDedicated.
	Provider *string

	// READ-ONLY; Resource on which the operation is performed: capacity, etc.
	Resource *string
}

OperationDisplay - The object that represents the operation.

func (OperationDisplay) MarshalJSON added in v1.1.0

func (o OperationDisplay) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationDisplay.

func (*OperationDisplay) UnmarshalJSON added in v1.1.0

func (o *OperationDisplay) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.

type OperationListResult

type OperationListResult struct {
	// READ-ONLY; URL to get the next set of operation list results if there are any.
	NextLink *string

	// READ-ONLY; List of capacities supported by the Microsoft.PowerBIDedicated resource provider.
	Value []*Operation
}

OperationListResult - Result listing capacities. It contains a list of operations and a URL link to get the next set of results.

func (OperationListResult) MarshalJSON

func (o OperationListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationListResult.

func (*OperationListResult) UnmarshalJSON added in v1.1.0

func (o *OperationListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult.

type OperationProperties added in v0.2.0

type OperationProperties struct {
	// Service specification for exposing performance metrics to shoebox.
	ServiceSpecification *ServiceSpecification
}

OperationProperties - Additional properties to expose performance metrics to shoebox.

func (OperationProperties) MarshalJSON added in v1.1.0

func (o OperationProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationProperties.

func (*OperationProperties) UnmarshalJSON added in v1.1.0

func (o *OperationProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationProperties.

type OperationsClient

type OperationsClient struct {
	// contains filtered or unexported fields
}

OperationsClient contains the methods for the Operations group. Don't use this type directly, use NewOperationsClient() instead.

func NewOperationsClient

func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error)

NewOperationsClient creates a new instance of OperationsClient with the specified values.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*OperationsClient) NewListPager added in v0.4.0

NewListPager - Lists all of the available PowerBIDedicated REST API operations.

Generated from API version 2021-01-01

  • options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/operations.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/powerbidedicated/armpowerbidedicated"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armpowerbidedicated.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewOperationsClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.OperationListResult = armpowerbidedicated.OperationListResult{
		// 	Value: []*armpowerbidedicated.Operation{
		// 		{
		// 			Name: to.Ptr("Microsoft.PowerBIDedicated/checkNameAvailability/action"),
		// 			Display: &armpowerbidedicated.OperationDisplay{
		// 				Description: to.Ptr("Checks that given Power BI Dedicated Capacity name is valid and not in use."),
		// 				Operation: to.Ptr("Capacities_CheckNameAvailability"),
		// 				Provider: to.Ptr("Microsoft.PowerBIDedicated"),
		// 				Resource: to.Ptr("checkNameAvailability"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type OperationsClientListOptions added in v0.2.0

type OperationsClientListOptions struct {
}

OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.

type OperationsClientListResponse added in v0.2.0

type OperationsClientListResponse struct {
	// Result listing capacities. It contains a list of operations and a URL link to get the next set of results.
	OperationListResult
}

OperationsClientListResponse contains the response from method OperationsClient.NewListPager.

type Resource

type Resource struct {
	// REQUIRED; Location of the PowerBI Dedicated resource.
	Location *string

	// Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData

	// Key-value pairs of additional resource provisioning properties.
	Tags map[string]*string

	// READ-ONLY; An identifier that represents the PowerBI Dedicated resource.
	ID *string

	// READ-ONLY; The name of the PowerBI Dedicated resource.
	Name *string

	// READ-ONLY; The type of the PowerBI Dedicated resource.
	Type *string
}

Resource - Represents an instance of an PowerBI Dedicated resource.

func (Resource) MarshalJSON

func (r Resource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Resource.

func (*Resource) UnmarshalJSON added in v1.1.0

func (r *Resource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Resource.

type SKUDetailsForExistingResource

type SKUDetailsForExistingResource struct {
	// The resource type
	ResourceType *string

	// The SKU in SKU details for existing resources.
	SKU *CapacitySKU
}

SKUDetailsForExistingResource - An object that represents SKU details for existing resources

func (SKUDetailsForExistingResource) MarshalJSON added in v1.1.0

func (s SKUDetailsForExistingResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SKUDetailsForExistingResource.

func (*SKUDetailsForExistingResource) UnmarshalJSON added in v1.1.0

func (s *SKUDetailsForExistingResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SKUDetailsForExistingResource.

type SKUEnumerationForExistingResourceResult

type SKUEnumerationForExistingResourceResult struct {
	// The collection of available SKUs for existing resources
	Value []*SKUDetailsForExistingResource
}

SKUEnumerationForExistingResourceResult - An object that represents enumerating SKUs for existing resources

func (SKUEnumerationForExistingResourceResult) MarshalJSON

func (s SKUEnumerationForExistingResourceResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SKUEnumerationForExistingResourceResult.

func (*SKUEnumerationForExistingResourceResult) UnmarshalJSON added in v1.1.0

func (s *SKUEnumerationForExistingResourceResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SKUEnumerationForExistingResourceResult.

type SKUEnumerationForNewResourceResult

type SKUEnumerationForNewResourceResult struct {
	// The collection of available SKUs for new resources
	Value []*CapacitySKU
}

SKUEnumerationForNewResourceResult - An object that represents enumerating SKUs for new resources

func (SKUEnumerationForNewResourceResult) MarshalJSON

func (s SKUEnumerationForNewResourceResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SKUEnumerationForNewResourceResult.

func (*SKUEnumerationForNewResourceResult) UnmarshalJSON added in v1.1.0

func (s *SKUEnumerationForNewResourceResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SKUEnumerationForNewResourceResult.

type ServiceSpecification added in v0.2.0

type ServiceSpecification struct {
	// Log specifications for exposing diagnostic logs to shoebox.
	LogSpecifications []*LogSpecification

	// Metric specifications for exposing performance metrics to shoebox.
	MetricSpecifications []*MetricSpecification
}

ServiceSpecification - Service specification for exposing performance metrics to shoebox.

func (ServiceSpecification) MarshalJSON added in v0.2.0

func (s ServiceSpecification) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ServiceSpecification.

func (*ServiceSpecification) UnmarshalJSON added in v1.1.0

func (s *ServiceSpecification) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServiceSpecification.

type State

type State string

State - The current state of PowerBI Dedicated resource. The state is to indicate more states outside of resource provisioning.

const (
	StateDeleting     State = "Deleting"
	StateFailed       State = "Failed"
	StatePaused       State = "Paused"
	StatePausing      State = "Pausing"
	StatePreparing    State = "Preparing"
	StateProvisioning State = "Provisioning"
	StateResuming     State = "Resuming"
	StateScaling      State = "Scaling"
	StateSucceeded    State = "Succeeded"
	StateSuspended    State = "Suspended"
	StateSuspending   State = "Suspending"
	StateUpdating     State = "Updating"
)

func PossibleStateValues

func PossibleStateValues() []State

PossibleStateValues returns the possible values for the State const type.

type SystemData

type SystemData struct {
	// The timestamp of resource creation (UTC)
	CreatedAt *time.Time

	// An identifier for the identity that created the resource
	CreatedBy *string

	// The type of identity that created the resource
	CreatedByType *IdentityType

	// The timestamp of resource last modification (UTC)
	LastModifiedAt *time.Time

	// An identifier for the identity that last modified the resource
	LastModifiedBy *string

	// The type of identity that last modified the resource
	LastModifiedByType *IdentityType
}

SystemData - Metadata pertaining to creation and last modification of the resource.

func (SystemData) MarshalJSON

func (s SystemData) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SystemData.

func (*SystemData) UnmarshalJSON

func (s *SystemData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.

type VCoreProvisioningState

type VCoreProvisioningState string

VCoreProvisioningState - The current deployment state of an auto scale v-core resource. The provisioningState is to indicate states for resource provisioning.

const (
	VCoreProvisioningStateSucceeded VCoreProvisioningState = "Succeeded"
)

func PossibleVCoreProvisioningStateValues

func PossibleVCoreProvisioningStateValues() []VCoreProvisioningState

PossibleVCoreProvisioningStateValues returns the possible values for the VCoreProvisioningState const type.

type VCoreSKUTier

type VCoreSKUTier string

VCoreSKUTier - The name of the Azure pricing tier to which the SKU applies.

const (
	VCoreSKUTierAutoScale VCoreSKUTier = "AutoScale"
)

func PossibleVCoreSKUTierValues

func PossibleVCoreSKUTierValues() []VCoreSKUTier

PossibleVCoreSKUTierValues returns the possible values for the VCoreSKUTier const type.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL