armfabric

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: MIT Imports: 14 Imported by: 0

README

Azure Fabric Module for Go

PkgGoDev

The armfabric module provides operations for working with Azure Fabric.

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 Fabric module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/fabric/armfabric

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure Fabric. 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 Fabric 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 := armfabric.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 := armfabric.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.NewCapacitiesClient()

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 Fabric 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 ActionType

type ActionType string

ActionType - Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.

const (
	// ActionTypeInternal - Actions are for internal-only APIs.
	ActionTypeInternal ActionType = "Internal"
)

func PossibleActionTypeValues

func PossibleActionTypeValues() []ActionType

PossibleActionTypeValues returns the possible values for the ActionType const type.

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 - The ID of the target subscription. The value must be an UUID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*CapacitiesClient) BeginCreateOrUpdate

func (client *CapacitiesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, capacityName string, resource Capacity, options *CapacitiesClientBeginCreateOrUpdateOptions) (*runtime.Poller[CapacitiesClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Create a FabricCapacity If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-11-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • capacityName - The name of the Microsoft Fabric capacity. It must be a minimum of 3 characters, and a maximum of 63.
  • resource - Resource create parameters.
  • options - CapacitiesClientBeginCreateOrUpdateOptions contains the optional parameters for the CapacitiesClient.BeginCreateOrUpdate method.
Example

Generated from example definition: D:/w/Azure/azure-sdk-for-go/sdk/resourcemanager/fabric/armfabric/TempTypeSpecFiles/Microsoft.Fabric.Management/examples/2023-11-01/FabricCapacities_CreateOrUpdate.json

package main

import (
	"context"
	"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/fabric/armfabric"
	"log"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armfabric.NewClientFactory("548B7FB7-3B2A-4F46-BB02-66473F1FC22C", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewCapacitiesClient().BeginCreateOrUpdate(ctx, "TestRG", "azsdktest", armfabric.Capacity{
		Properties: &armfabric.CapacityProperties{
			Administration: &armfabric.CapacityAdministration{
				Members: []*string{
					to.Ptr("azsdktest@microsoft.com"),
					to.Ptr("azsdktest2@microsoft.com"),
				},
			},
		},
		SKU: &armfabric.RpSKU{
			Name: to.Ptr("F2"),
			Tier: to.Ptr(armfabric.RpSKUTierFabric),
		},
		Location: to.Ptr("westcentralus"),
	}, 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 = armfabric.CapacitiesClientCreateOrUpdateResponse{
	// 	Capacity: &armfabric.Capacity{
	// 		Properties: &armfabric.CapacityProperties{
	// 			ProvisioningState: to.Ptr(armfabric.ProvisioningStateUpdating),
	// 			State: to.Ptr(armfabric.ResourceStatePreparing),
	// 			Administration: &armfabric.CapacityAdministration{
	// 				Members: []*string{
	// 					to.Ptr("azsdktest@microsoft.com"),
	// 					to.Ptr("azsdktest2@microsoft.com"),
	// 				},
	// 			},
	// 		},
	// 		SKU: &armfabric.RpSKU{
	// 			Name: to.Ptr("F2"),
	// 			Tier: to.Ptr(armfabric.RpSKUTierFabric),
	// 		},
	// 		Tags: map[string]*string{
	// 			"testKey": to.Ptr("testValue"),
	// 		},
	// 		Location: to.Ptr("westcentralus"),
	// 		ID: to.Ptr("/subscriptions/548B7FB7-3B2A-4F46-BB02-66473F1FC22C/resourceGroups/TestRG/providers/Microsoft.Fabric/capacities/azsdktest"),
	// 		Name: to.Ptr("azsdktest"),
	// 		Type: to.Ptr("Microsoft.Fabric/capacities"),
	// 	},
	// }
}
Output:

func (*CapacitiesClient) BeginDelete

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

BeginDelete - Delete a FabricCapacity If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-11-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • capacityName - The name of the Microsoft Fabric capacity. It must be a minimum of 3 characters, and a maximum of 63.
  • options - CapacitiesClientBeginDeleteOptions contains the optional parameters for the CapacitiesClient.BeginDelete method.
Example

Generated from example definition: D:/w/Azure/azure-sdk-for-go/sdk/resourcemanager/fabric/armfabric/TempTypeSpecFiles/Microsoft.Fabric.Management/examples/2023-11-01/FabricCapacities_Delete.json

package main

import (
	"context"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/fabric/armfabric"
	"log"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armfabric.NewClientFactory("548B7FB7-3B2A-4F46-BB02-66473F1FC22C", 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, capacityName string, options *CapacitiesClientBeginResumeOptions) (*runtime.Poller[CapacitiesClientResumeResponse], error)

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

Generated from API version 2023-11-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • capacityName - The name of the Microsoft Fabric capacity. It must be a minimum of 3 characters, and a maximum of 63.
  • options - CapacitiesClientBeginResumeOptions contains the optional parameters for the CapacitiesClient.BeginResume method.
Example

Generated from example definition: D:/w/Azure/azure-sdk-for-go/sdk/resourcemanager/fabric/armfabric/TempTypeSpecFiles/Microsoft.Fabric.Management/examples/2023-11-01/FabricCapacities_Resume.json

package main

import (
	"context"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/fabric/armfabric"
	"log"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armfabric.NewClientFactory("548B7FB7-3B2A-4F46-BB02-66473F1FC22C", 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)
	}
	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 = armfabric.CapacitiesClientResumeResponse{
	// }
}
Output:

func (*CapacitiesClient) BeginSuspend

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

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

Generated from API version 2023-11-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • capacityName - The name of the Microsoft Fabric capacity. It must be a minimum of 3 characters, and a maximum of 63.
  • options - CapacitiesClientBeginSuspendOptions contains the optional parameters for the CapacitiesClient.BeginSuspend method.
Example

Generated from example definition: D:/w/Azure/azure-sdk-for-go/sdk/resourcemanager/fabric/armfabric/TempTypeSpecFiles/Microsoft.Fabric.Management/examples/2023-11-01/FabricCapacities_Suspend.json

package main

import (
	"context"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/fabric/armfabric"
	"log"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armfabric.NewClientFactory("548B7FB7-3B2A-4F46-BB02-66473F1FC22C", 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)
	}
	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 = armfabric.CapacitiesClientSuspendResponse{
	// }
}
Output:

func (*CapacitiesClient) BeginUpdate

func (client *CapacitiesClient) BeginUpdate(ctx context.Context, resourceGroupName string, capacityName string, properties CapacityUpdate, options *CapacitiesClientBeginUpdateOptions) (*runtime.Poller[CapacitiesClientUpdateResponse], error)

BeginUpdate - Update a FabricCapacity If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-11-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • capacityName - The name of the Microsoft Fabric capacity. It must be a minimum of 3 characters, and a maximum of 63.
  • properties - The resource properties to be updated.
  • options - CapacitiesClientBeginUpdateOptions contains the optional parameters for the CapacitiesClient.BeginUpdate method.
Example

Generated from example definition: D:/w/Azure/azure-sdk-for-go/sdk/resourcemanager/fabric/armfabric/TempTypeSpecFiles/Microsoft.Fabric.Management/examples/2023-11-01/FabricCapacities_Update.json

package main

import (
	"context"
	"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/fabric/armfabric"
	"log"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armfabric.NewClientFactory("548B7FB7-3B2A-4F46-BB02-66473F1FC22C", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewCapacitiesClient().BeginUpdate(ctx, "TestRG", "azsdktest", armfabric.CapacityUpdate{
		SKU: &armfabric.RpSKU{
			Name: to.Ptr("F8"),
			Tier: to.Ptr(armfabric.RpSKUTierFabric),
		},
		Tags: map[string]*string{
			"testKey": to.Ptr("testValue"),
		},
		Properties: &armfabric.CapacityUpdateProperties{
			Administration: &armfabric.CapacityAdministration{
				Members: []*string{
					to.Ptr("azsdktest2@microsoft.com"),
				},
			},
		},
	}, 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 = armfabric.CapacitiesClientUpdateResponse{
	// 	Capacity: &armfabric.Capacity{
	// 		Properties: &armfabric.CapacityProperties{
	// 			ProvisioningState: to.Ptr(armfabric.ProvisioningStateUpdating),
	// 			State: to.Ptr(armfabric.ResourceStatePreparing),
	// 			Administration: &armfabric.CapacityAdministration{
	// 				Members: []*string{
	// 					to.Ptr("azsdktest2@microsoft.com"),
	// 				},
	// 			},
	// 		},
	// 		SKU: &armfabric.RpSKU{
	// 			Name: to.Ptr("F8"),
	// 			Tier: to.Ptr(armfabric.RpSKUTierFabric),
	// 		},
	// 		Tags: map[string]*string{
	// 			"testKey": to.Ptr("testValue"),
	// 		},
	// 		Location: to.Ptr("westcentralus"),
	// 		ID: to.Ptr("/subscriptions/548B7FB7-3B2A-4F46-BB02-66473F1FC22C/resourceGroups/TestRG/providers/Microsoft.Fabric/capacities/azsdktest"),
	// 		Name: to.Ptr("azsdktest"),
	// 		Type: to.Ptr("Microsoft.Fabric/capacities"),
	// 	},
	// }
}
Output:

func (*CapacitiesClient) CheckNameAvailability

CheckNameAvailability - Implements local CheckNameAvailability operations If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-11-01

  • location - The location name.
  • body - The CheckAvailability request
  • options - CapacitiesClientCheckNameAvailabilityOptions contains the optional parameters for the CapacitiesClient.CheckNameAvailability method.
Example

Generated from example definition: D:/w/Azure/azure-sdk-for-go/sdk/resourcemanager/fabric/armfabric/TempTypeSpecFiles/Microsoft.Fabric.Management/examples/2023-11-01/FabricCapacities_CheckNameAvailability.json

package main

import (
	"context"
	"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/fabric/armfabric"
	"log"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armfabric.NewClientFactory("548B7FB7-3B2A-4F46-BB02-66473F1FC22C", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewCapacitiesClient().CheckNameAvailability(ctx, "westcentralus", armfabric.CheckNameAvailabilityRequest{
		Name: to.Ptr("azsdktest"),
		Type: to.Ptr("Microsoft.Fabric/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 = armfabric.CapacitiesClientCheckNameAvailabilityResponse{
	// 	CheckNameAvailabilityResponse: &armfabric.CheckNameAvailabilityResponse{
	// 		NameAvailable: to.Ptr(true),
	// 	},
	// }
}
Output:

func (*CapacitiesClient) Get

func (client *CapacitiesClient) Get(ctx context.Context, resourceGroupName string, capacityName string, options *CapacitiesClientGetOptions) (CapacitiesClientGetResponse, error)

Get - Get a FabricCapacity If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-11-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • capacityName - The name of the Microsoft Fabric capacity. It must be a minimum of 3 characters, and a maximum of 63.
  • options - CapacitiesClientGetOptions contains the optional parameters for the CapacitiesClient.Get method.
Example

Generated from example definition: D:/w/Azure/azure-sdk-for-go/sdk/resourcemanager/fabric/armfabric/TempTypeSpecFiles/Microsoft.Fabric.Management/examples/2023-11-01/FabricCapacities_Get.json

package main

import (
	"context"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/fabric/armfabric"
	"log"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armfabric.NewClientFactory("548B7FB7-3B2A-4F46-BB02-66473F1FC22C", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewCapacitiesClient().Get(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 = armfabric.CapacitiesClientGetResponse{
	// 	Capacity: &armfabric.Capacity{
	// 		Properties: &armfabric.CapacityProperties{
	// 			ProvisioningState: to.Ptr(armfabric.ProvisioningStateSucceeded),
	// 			State: to.Ptr(armfabric.ResourceStateActive),
	// 			Administration: &armfabric.CapacityAdministration{
	// 				Members: []*string{
	// 					to.Ptr("azsdktest@microsoft.com"),
	// 					to.Ptr("azsdktest2@microsoft.com"),
	// 				},
	// 			},
	// 		},
	// 		SKU: &armfabric.RpSKU{
	// 			Name: to.Ptr("F2"),
	// 			Tier: to.Ptr(armfabric.RpSKUTierFabric),
	// 		},
	// 		Tags: map[string]*string{
	// 		},
	// 		Location: to.Ptr("West Central US"),
	// 		ID: to.Ptr("/subscriptions/548B7FB7-3B2A-4F46-BB02-66473F1FC22C/resourceGroups/TestRG/providers/Microsoft.Fabric/capacities/azsdktest"),
	// 		Name: to.Ptr("azsdktest"),
	// 		Type: to.Ptr("Microsoft.Fabric/capacities"),
	// 	},
	// }
}
Output:

func (*CapacitiesClient) NewListByResourceGroupPager

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

NewListByResourceGroupPager - List FabricCapacity resources by resource group

Generated from API version 2023-11-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • options - CapacitiesClientListByResourceGroupOptions contains the optional parameters for the CapacitiesClient.NewListByResourceGroupPager method.
Example

Generated from example definition: D:/w/Azure/azure-sdk-for-go/sdk/resourcemanager/fabric/armfabric/TempTypeSpecFiles/Microsoft.Fabric.Management/examples/2023-11-01/FabricCapacities_ListByResourceGroup.json

package main

import (
	"context"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/fabric/armfabric"
	"log"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armfabric.NewClientFactory("548B7FB7-3B2A-4F46-BB02-66473F1FC22C", 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 = armfabric.CapacitiesClientListByResourceGroupResponse{
		// 	CapacityListResult: armfabric.CapacityListResult{
		// 		Value: []*armfabric.Capacity{
		// 			{
		// 				Properties: &armfabric.CapacityProperties{
		// 					ProvisioningState: to.Ptr(armfabric.ProvisioningStateSucceeded),
		// 					State: to.Ptr(armfabric.ResourceStateActive),
		// 					Administration: &armfabric.CapacityAdministration{
		// 						Members: []*string{
		// 							to.Ptr("azsdktest@microsoft.com"),
		// 						},
		// 					},
		// 				},
		// 				SKU: &armfabric.RpSKU{
		// 					Name: to.Ptr("F2"),
		// 					Tier: to.Ptr(armfabric.RpSKUTierFabric),
		// 				},
		// 				Tags: map[string]*string{
		// 				},
		// 				Location: to.Ptr("West Central US"),
		// 				ID: to.Ptr("/subscriptions/548B7FB7-3B2A-4F46-BB02-66473F1FC22C/resourceGroups/TestRG/providers/Microsoft.Fabric/capacities/azsdktest"),
		// 				Name: to.Ptr("azsdktest"),
		// 				Type: to.Ptr("Microsoft.Fabric/capacities"),
		// 			},
		// 			{
		// 				Properties: &armfabric.CapacityProperties{
		// 					ProvisioningState: to.Ptr(armfabric.ProvisioningStateProvisioning),
		// 					State: to.Ptr(armfabric.ResourceStateProvisioning),
		// 					Administration: &armfabric.CapacityAdministration{
		// 						Members: []*string{
		// 							to.Ptr("azsdktest@microsoft.com"),
		// 						},
		// 					},
		// 				},
		// 				SKU: &armfabric.RpSKU{
		// 					Name: to.Ptr("F4"),
		// 					Tier: to.Ptr(armfabric.RpSKUTierFabric),
		// 				},
		// 				Tags: map[string]*string{
		// 					"testKey": to.Ptr("testValue"),
		// 				},
		// 				Location: to.Ptr("West Central US"),
		// 				ID: to.Ptr("/subscriptions/548B7FB7-3B2A-4F46-BB02-66473F1FC22C/resourceGroups/TestRG/providers/Microsoft.Fabric/capacities/azsdktest2"),
		// 				Name: to.Ptr("azsdktest2"),
		// 				Type: to.Ptr("Microsoft.Fabric/capacities"),
		// 			},
		// 		},
		// 	},
		// }
	}
}
Output:

func (*CapacitiesClient) NewListBySubscriptionPager

NewListBySubscriptionPager - List FabricCapacity resources by subscription ID

Generated from API version 2023-11-01

  • options - CapacitiesClientListBySubscriptionOptions contains the optional parameters for the CapacitiesClient.NewListBySubscriptionPager method.
Example

Generated from example definition: D:/w/Azure/azure-sdk-for-go/sdk/resourcemanager/fabric/armfabric/TempTypeSpecFiles/Microsoft.Fabric.Management/examples/2023-11-01/FabricCapacities_ListBySubscription.json

package main

import (
	"context"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/fabric/armfabric"
	"log"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armfabric.NewClientFactory("548B7FB7-3B2A-4F46-BB02-66473F1FC22C", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewCapacitiesClient().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 = armfabric.CapacitiesClientListBySubscriptionResponse{
		// 	CapacityListResult: armfabric.CapacityListResult{
		// 		Value: []*armfabric.Capacity{
		// 			{
		// 				Properties: &armfabric.CapacityProperties{
		// 					ProvisioningState: to.Ptr(armfabric.ProvisioningStateSucceeded),
		// 					State: to.Ptr(armfabric.ResourceStateActive),
		// 					Administration: &armfabric.CapacityAdministration{
		// 						Members: []*string{
		// 							to.Ptr("azsdktest@microsoft.com"),
		// 						},
		// 					},
		// 				},
		// 				SKU: &armfabric.RpSKU{
		// 					Name: to.Ptr("F2"),
		// 					Tier: to.Ptr(armfabric.RpSKUTierFabric),
		// 				},
		// 				Tags: map[string]*string{
		// 				},
		// 				Location: to.Ptr("West Central US"),
		// 				ID: to.Ptr("/subscriptions/548B7FB7-3B2A-4F46-BB02-66473F1FC22C/resourceGroups/TestRG/providers/Microsoft.Fabric/capacities/azsdktest"),
		// 				Name: to.Ptr("azsdktest"),
		// 				Type: to.Ptr("Microsoft.Fabric/capacities"),
		// 			},
		// 			{
		// 				Properties: &armfabric.CapacityProperties{
		// 					ProvisioningState: to.Ptr(armfabric.ProvisioningStateProvisioning),
		// 					State: to.Ptr(armfabric.ResourceStateProvisioning),
		// 					Administration: &armfabric.CapacityAdministration{
		// 						Members: []*string{
		// 							to.Ptr("azsdktest@microsoft.com"),
		// 						},
		// 					},
		// 				},
		// 				SKU: &armfabric.RpSKU{
		// 					Name: to.Ptr("F4"),
		// 					Tier: to.Ptr(armfabric.RpSKUTierFabric),
		// 				},
		// 				Tags: map[string]*string{
		// 					"testKey": to.Ptr("testValue"),
		// 				},
		// 				Location: to.Ptr("West Central US"),
		// 				ID: to.Ptr("/subscriptions/548B7FB7-3B2A-4F46-BB02-66473F1FC22C/resourceGroups/TestRG/providers/Microsoft.Fabric/capacities/azsdktest2"),
		// 				Name: to.Ptr("azsdktest2"),
		// 				Type: to.Ptr("Microsoft.Fabric/capacities"),
		// 			},
		// 		},
		// 	},
		// }
	}
}
Output:

func (*CapacitiesClient) NewListSKUsForCapacityPager

func (client *CapacitiesClient) NewListSKUsForCapacityPager(resourceGroupName string, capacityName string, options *CapacitiesClientListSKUsForCapacityOptions) *runtime.Pager[CapacitiesClientListSKUsForCapacityResponse]

NewListSKUsForCapacityPager - List eligible SKUs for a Microsoft Fabric resource

Generated from API version 2023-11-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • capacityName - The name of the capacity.
  • options - CapacitiesClientListSKUsForCapacityOptions contains the optional parameters for the CapacitiesClient.NewListSKUsForCapacityPager method.
Example

Generated from example definition: D:/w/Azure/azure-sdk-for-go/sdk/resourcemanager/fabric/armfabric/TempTypeSpecFiles/Microsoft.Fabric.Management/examples/2023-11-01/FabricCapacities_ListSkusForCapacity.json

package main

import (
	"context"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/fabric/armfabric"
	"log"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armfabric.NewClientFactory("548B7FB7-3B2A-4F46-BB02-66473F1FC22C", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewCapacitiesClient().NewListSKUsForCapacityPager("TestRG", "azsdktest", 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 = armfabric.CapacitiesClientListSKUsForCapacityResponse{
		// 	RpSKUEnumerationForExistingResourceResult: armfabric.RpSKUEnumerationForExistingResourceResult{
		// 		Value: []*armfabric.RpSKUDetailsForExistingResource{
		// 			{
		// 				ResourceType: to.Ptr("Microsoft.Fabric/capacities"),
		// 				SKU: &armfabric.RpSKU{
		// 					Name: to.Ptr("F16"),
		// 					Tier: to.Ptr(armfabric.RpSKUTierFabric),
		// 				},
		// 			},
		// 			{
		// 				ResourceType: to.Ptr("Microsoft.Fabric/capacities"),
		// 				SKU: &armfabric.RpSKU{
		// 					Name: to.Ptr("F8"),
		// 					Tier: to.Ptr(armfabric.RpSKUTierFabric),
		// 				},
		// 			},
		// 			{
		// 				ResourceType: to.Ptr("Microsoft.Fabric/capacities"),
		// 				SKU: &armfabric.RpSKU{
		// 					Name: to.Ptr("F64"),
		// 					Tier: to.Ptr(armfabric.RpSKUTierFabric),
		// 				},
		// 			},
		// 			{
		// 				ResourceType: to.Ptr("Microsoft.Fabric/capacities"),
		// 				SKU: &armfabric.RpSKU{
		// 					Name: to.Ptr("F1024"),
		// 					Tier: to.Ptr(armfabric.RpSKUTierFabric),
		// 				},
		// 			},
		// 			{
		// 				ResourceType: to.Ptr("Microsoft.Fabric/capacities"),
		// 				SKU: &armfabric.RpSKU{
		// 					Name: to.Ptr("F128"),
		// 					Tier: to.Ptr(armfabric.RpSKUTierFabric),
		// 				},
		// 			},
		// 			{
		// 				ResourceType: to.Ptr("Microsoft.Fabric/capacities"),
		// 				SKU: &armfabric.RpSKU{
		// 					Name: to.Ptr("F2"),
		// 					Tier: to.Ptr(armfabric.RpSKUTierFabric),
		// 				},
		// 			},
		// 			{
		// 				ResourceType: to.Ptr("Microsoft.Fabric/capacities"),
		// 				SKU: &armfabric.RpSKU{
		// 					Name: to.Ptr("F256"),
		// 					Tier: to.Ptr(armfabric.RpSKUTierFabric),
		// 				},
		// 			},
		// 			{
		// 				ResourceType: to.Ptr("Microsoft.Fabric/capacities"),
		// 				SKU: &armfabric.RpSKU{
		// 					Name: to.Ptr("F32"),
		// 					Tier: to.Ptr(armfabric.RpSKUTierFabric),
		// 				},
		// 			},
		// 			{
		// 				ResourceType: to.Ptr("Microsoft.Fabric/capacities"),
		// 				SKU: &armfabric.RpSKU{
		// 					Name: to.Ptr("F4"),
		// 					Tier: to.Ptr(armfabric.RpSKUTierFabric),
		// 				},
		// 			},
		// 			{
		// 				ResourceType: to.Ptr("Microsoft.Fabric/capacities"),
		// 				SKU: &armfabric.RpSKU{
		// 					Name: to.Ptr("F512"),
		// 					Tier: to.Ptr(armfabric.RpSKUTierFabric),
		// 				},
		// 			},
		// 			{
		// 				ResourceType: to.Ptr("Microsoft.Fabric/capacities"),
		// 				SKU: &armfabric.RpSKU{
		// 					Name: to.Ptr("F2048"),
		// 					Tier: to.Ptr(armfabric.RpSKUTierFabric),
		// 				},
		// 			},
		// 		},
		// 	},
		// }
	}
}
Output:

func (*CapacitiesClient) NewListSKUsPager

NewListSKUsPager - List eligible SKUs for Microsoft Fabric resource provider

Generated from API version 2023-11-01

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

Generated from example definition: D:/w/Azure/azure-sdk-for-go/sdk/resourcemanager/fabric/armfabric/TempTypeSpecFiles/Microsoft.Fabric.Management/examples/2023-11-01/FabricCapacities_ListSkus.json

package main

import (
	"context"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/fabric/armfabric"
	"log"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armfabric.NewClientFactory("548B7FB7-3B2A-4F46-BB02-66473F1FC22C", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewCapacitiesClient().NewListSKUsPager(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 = armfabric.CapacitiesClientListSKUsResponse{
		// 	RpSKUEnumerationForNewResourceResult: armfabric.RpSKUEnumerationForNewResourceResult{
		// 		Value: []*armfabric.RpSKUDetailsForNewResource{
		// 			{
		// 				Name: to.Ptr("F8"),
		// 				Locations: []*string{
		// 					to.Ptr("West Europe"),
		// 				},
		// 				ResourceType: to.Ptr("Capacities"),
		// 			},
		// 			{
		// 				Name: to.Ptr("F64"),
		// 				Locations: []*string{
		// 					to.Ptr("West Europe"),
		// 				},
		// 				ResourceType: to.Ptr("Capacities"),
		// 			},
		// 			{
		// 				Name: to.Ptr("F128"),
		// 				Locations: []*string{
		// 					to.Ptr("West Europe"),
		// 				},
		// 				ResourceType: to.Ptr("Capacities"),
		// 			},
		// 			{
		// 				Name: to.Ptr("F512"),
		// 				Locations: []*string{
		// 					to.Ptr("West Europe"),
		// 				},
		// 				ResourceType: to.Ptr("Capacities"),
		// 			},
		// 		},
		// 	},
		// }
	}
}
Output:

type CapacitiesClientBeginCreateOrUpdateOptions

type CapacitiesClientBeginCreateOrUpdateOptions struct {
	// Resumes the long-running operation from the provided token.
	ResumeToken string
}

CapacitiesClientBeginCreateOrUpdateOptions contains the optional parameters for the CapacitiesClient.BeginCreateOrUpdate method.

type CapacitiesClientBeginDeleteOptions

type CapacitiesClientBeginDeleteOptions struct {
	// Resumes the long-running operation from the provided token.
	ResumeToken string
}

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

type CapacitiesClientBeginResumeOptions

type CapacitiesClientBeginResumeOptions struct {
	// Resumes the long-running operation from the provided token.
	ResumeToken string
}

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

type CapacitiesClientBeginSuspendOptions

type CapacitiesClientBeginSuspendOptions struct {
	// Resumes the long-running operation from the provided token.
	ResumeToken string
}

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

type CapacitiesClientBeginUpdateOptions

type CapacitiesClientBeginUpdateOptions struct {
	// Resumes the long-running operation from the provided token.
	ResumeToken string
}

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

type CapacitiesClientCheckNameAvailabilityOptions

type CapacitiesClientCheckNameAvailabilityOptions struct {
}

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

type CapacitiesClientCheckNameAvailabilityResponse

type CapacitiesClientCheckNameAvailabilityResponse struct {
	// The check availability result.
	CheckNameAvailabilityResponse
}

CapacitiesClientCheckNameAvailabilityResponse contains the response from method CapacitiesClient.CheckNameAvailability.

type CapacitiesClientCreateOrUpdateResponse

type CapacitiesClientCreateOrUpdateResponse struct {
	// Fabric Capacity resource
	Capacity
}

CapacitiesClientCreateOrUpdateResponse contains the response from method CapacitiesClient.BeginCreateOrUpdate.

type CapacitiesClientDeleteResponse

type CapacitiesClientDeleteResponse struct {
}

CapacitiesClientDeleteResponse contains the response from method CapacitiesClient.BeginDelete.

type CapacitiesClientGetOptions

type CapacitiesClientGetOptions struct {
}

CapacitiesClientGetOptions contains the optional parameters for the CapacitiesClient.Get method.

type CapacitiesClientGetResponse

type CapacitiesClientGetResponse struct {
	// Fabric Capacity resource
	Capacity
}

CapacitiesClientGetResponse contains the response from method CapacitiesClient.Get.

type CapacitiesClientListByResourceGroupOptions

type CapacitiesClientListByResourceGroupOptions struct {
}

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

type CapacitiesClientListByResourceGroupResponse

type CapacitiesClientListByResourceGroupResponse struct {
	// The response of a FabricCapacity list operation.
	CapacityListResult
}

CapacitiesClientListByResourceGroupResponse contains the response from method CapacitiesClient.NewListByResourceGroupPager.

type CapacitiesClientListBySubscriptionOptions

type CapacitiesClientListBySubscriptionOptions struct {
}

CapacitiesClientListBySubscriptionOptions contains the optional parameters for the CapacitiesClient.NewListBySubscriptionPager method.

type CapacitiesClientListBySubscriptionResponse

type CapacitiesClientListBySubscriptionResponse struct {
	// The response of a FabricCapacity list operation.
	CapacityListResult
}

CapacitiesClientListBySubscriptionResponse contains the response from method CapacitiesClient.NewListBySubscriptionPager.

type CapacitiesClientListSKUsForCapacityOptions

type CapacitiesClientListSKUsForCapacityOptions struct {
}

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

type CapacitiesClientListSKUsForCapacityResponse

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

CapacitiesClientListSKUsForCapacityResponse contains the response from method CapacitiesClient.NewListSKUsForCapacityPager.

type CapacitiesClientListSKUsOptions

type CapacitiesClientListSKUsOptions struct {
}

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

type CapacitiesClientListSKUsResponse

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

CapacitiesClientListSKUsResponse contains the response from method CapacitiesClient.NewListSKUsPager.

type CapacitiesClientResumeResponse

type CapacitiesClientResumeResponse struct {
}

CapacitiesClientResumeResponse contains the response from method CapacitiesClient.BeginResume.

type CapacitiesClientSuspendResponse

type CapacitiesClientSuspendResponse struct {
}

CapacitiesClientSuspendResponse contains the response from method CapacitiesClient.BeginSuspend.

type CapacitiesClientUpdateResponse

type CapacitiesClientUpdateResponse struct {
	// Fabric Capacity resource
	Capacity
}

CapacitiesClientUpdateResponse contains the response from method CapacitiesClient.BeginUpdate.

type Capacity

type Capacity struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string

	// REQUIRED; The resource-specific properties for this resource.
	Properties *CapacityProperties

	// REQUIRED; The SKU details
	SKU *RpSKU

	// Resource tags.
	Tags map[string]*string

	// READ-ONLY; The name of the Microsoft Fabric capacity. It must be a minimum of 3 characters, and a maximum of 63.
	Name *string

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

Capacity - Fabric Capacity resource

func (Capacity) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Capacity.

func (*Capacity) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type Capacity.

type CapacityAdministration

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

CapacityAdministration - The administration properties of the Fabric capacity resource

func (CapacityAdministration) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CapacityAdministration.

func (*CapacityAdministration) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CapacityAdministration.

type CapacityListResult

type CapacityListResult struct {
	// REQUIRED; The FabricCapacity items on this page
	Value []*Capacity

	// The link to the next page of items
	NextLink *string
}

CapacityListResult - The response of a FabricCapacity list operation.

func (CapacityListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CapacityListResult.

func (*CapacityListResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CapacityListResult.

type CapacityProperties

type CapacityProperties struct {
	// REQUIRED; The capacity administration
	Administration *CapacityAdministration

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

	// READ-ONLY; The current state of Microsoft Fabric resource. The state is to indicate more states outside of resource provisioning.
	State *ResourceState
}

CapacityProperties - The Microsoft Fabric capacity properties.

func (CapacityProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CapacityProperties.

func (*CapacityProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CapacityProperties.

type CapacityUpdate

type CapacityUpdate struct {
	// The resource-specific properties for this resource.
	Properties *CapacityUpdateProperties

	// The SKU details
	SKU *RpSKU

	// Resource tags.
	Tags map[string]*string
}

CapacityUpdate - The type used for update operations of the FabricCapacity.

func (CapacityUpdate) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CapacityUpdate.

func (*CapacityUpdate) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CapacityUpdate.

type CapacityUpdateProperties

type CapacityUpdateProperties struct {
	// The capacity administration
	Administration *CapacityAdministration
}

CapacityUpdateProperties - The updatable properties of the FabricCapacity.

func (CapacityUpdateProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CapacityUpdateProperties.

func (*CapacityUpdateProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CapacityUpdateProperties.

type CheckNameAvailabilityReason

type CheckNameAvailabilityReason string

CheckNameAvailabilityReason - Possible reasons for a name not being available.

const (
	// CheckNameAvailabilityReasonAlreadyExists - Name already exists.
	CheckNameAvailabilityReasonAlreadyExists CheckNameAvailabilityReason = "AlreadyExists"
	// CheckNameAvailabilityReasonInvalid - Name is invalid.
	CheckNameAvailabilityReasonInvalid CheckNameAvailabilityReason = "Invalid"
)

func PossibleCheckNameAvailabilityReasonValues

func PossibleCheckNameAvailabilityReasonValues() []CheckNameAvailabilityReason

PossibleCheckNameAvailabilityReasonValues returns the possible values for the CheckNameAvailabilityReason const type.

type CheckNameAvailabilityRequest

type CheckNameAvailabilityRequest struct {
	// The name of the resource for which availability needs to be checked.
	Name *string

	// The resource type.
	Type *string
}

CheckNameAvailabilityRequest - The check availability request body.

func (CheckNameAvailabilityRequest) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityRequest.

func (*CheckNameAvailabilityRequest) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailabilityRequest.

type CheckNameAvailabilityResponse

type CheckNameAvailabilityResponse struct {
	// Detailed reason why the given name is not available.
	Message *string

	// Indicates if the resource name is available.
	NameAvailable *bool

	// The reason why the given name is not available.
	Reason *CheckNameAvailabilityReason
}

CheckNameAvailabilityResponse - The check availability result.

func (CheckNameAvailabilityResponse) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityResponse.

func (*CheckNameAvailabilityResponse) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailabilityResponse.

type ClientFactory

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

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 - The ID of the target subscription. The value must be an UUID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ClientFactory) NewCapacitiesClient

func (c *ClientFactory) NewCapacitiesClient() *CapacitiesClient

NewCapacitiesClient creates a new instance of CapacitiesClient.

func (*ClientFactory) NewOperationsClient

func (c *ClientFactory) NewOperationsClient() *OperationsClient

NewOperationsClient creates a new instance of OperationsClient.

type CreatedByType

type CreatedByType string

CreatedByType - The kind of entity that created the resource.

const (
	// CreatedByTypeApplication - The entity was created by an application.
	CreatedByTypeApplication CreatedByType = "Application"
	// CreatedByTypeKey - The entity was created by a key.
	CreatedByTypeKey CreatedByType = "Key"
	// CreatedByTypeManagedIdentity - The entity was created by a managed identity.
	CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity"
	// CreatedByTypeUser - The entity was created by a user.
	CreatedByTypeUser CreatedByType = "User"
)

func PossibleCreatedByTypeValues

func PossibleCreatedByTypeValues() []CreatedByType

PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.

type Operation

type Operation struct {
	// Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
	ActionType *ActionType

	// READ-ONLY; Localized display information for this particular operation.
	Display *OperationDisplay

	// READ-ONLY; Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for Azure
	// Resource Manager/control-plane operations.
	IsDataAction *bool

	// READ-ONLY; The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write",
	// "Microsoft.Compute/virtualMachines/capture/action"
	Name *string

	// READ-ONLY; The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default
	// value is "user,system"
	Origin *Origin
}

Operation - Details of a REST API operation, returned from the Resource Provider Operations API

func (Operation) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Operation.

func (*Operation) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type Operation.

type OperationDisplay

type OperationDisplay struct {
	// READ-ONLY; The short, localized friendly description of the operation; suitable for tool tips and detailed views.
	Description *string

	// READ-ONLY; The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual
	// Machine", "Restart Virtual Machine".
	Operation *string

	// READ-ONLY; The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft
	// Compute".
	Provider *string

	// READ-ONLY; The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job
	// Schedule Collections".
	Resource *string
}

OperationDisplay - Localized display information for and operation.

func (OperationDisplay) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OperationDisplay.

func (*OperationDisplay) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.

type OperationListResult

type OperationListResult struct {
	// REQUIRED; The Operation items on this page
	Value []*Operation

	// The link to the next page of items
	NextLink *string
}

OperationListResult - A list of REST API operations supported by an Azure Resource Provider. It contains an 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

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

UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult.

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

NewListPager - List the operations for the provider

Generated from API version 2023-11-01

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

Generated from example definition: D:/w/Azure/azure-sdk-for-go/sdk/resourcemanager/fabric/armfabric/TempTypeSpecFiles/Microsoft.Fabric.Management/examples/2023-11-01/Operations_List.json

package main

import (
	"context"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/fabric/armfabric"
	"log"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armfabric.NewClientFactory("<subscriptionID>", 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 = armfabric.OperationsClientListResponse{
		// 	OperationListResult: armfabric.OperationListResult{
		// 		Value: []*armfabric.Operation{
		// 			{
		// 				Name: to.Ptr("Microsoft.Fabric/capacities/read"),
		// 				Display: &armfabric.OperationDisplay{
		// 					Provider: to.Ptr("Microsoft Fabric"),
		// 					Resource: to.Ptr("capacities"),
		// 					Operation: to.Ptr("Read Fabric Capacity"),
		// 					Description: to.Ptr("Retrieves the information of the specified Fabric Capacity."),
		// 				},
		// 				Origin: to.Ptr(armfabric.OriginUserSystem),
		// 			},
		// 			{
		// 				Name: to.Ptr("Microsoft.Fabric/capacities/write"),
		// 				Display: &armfabric.OperationDisplay{
		// 					Provider: to.Ptr("Microsoft Fabric"),
		// 					Resource: to.Ptr("capacities"),
		// 					Operation: to.Ptr("Create/Update Fabric Capacity"),
		// 					Description: to.Ptr("Creates or updates the specified Fabric Capacity."),
		// 				},
		// 				Origin: to.Ptr(armfabric.OriginUserSystem),
		// 			},
		// 			{
		// 				Name: to.Ptr("Microsoft.Fabric/capacities/delete"),
		// 				Display: &armfabric.OperationDisplay{
		// 					Provider: to.Ptr("Microsoft Fabric"),
		// 					Resource: to.Ptr("capacities"),
		// 					Operation: to.Ptr("Delete the Fabric Capacity"),
		// 					Description: to.Ptr("Deletes the Fabric Capacity."),
		// 				},
		// 				Origin: to.Ptr(armfabric.OriginUserSystem),
		// 			},
		// 			{
		// 				Name: to.Ptr("Microsoft.Fabric/capacities/suspend/action"),
		// 				Display: &armfabric.OperationDisplay{
		// 					Provider: to.Ptr("Microsoft Fabric"),
		// 					Resource: to.Ptr("capacities"),
		// 					Operation: to.Ptr("Suspend the specified Fabric capacity"),
		// 					Description: to.Ptr("Suspend the specified Fabric capacity"),
		// 				},
		// 				Origin: to.Ptr(armfabric.OriginUserSystem),
		// 			},
		// 			{
		// 				Name: to.Ptr("Microsoft.Fabric/capacities/resume/action"),
		// 				Display: &armfabric.OperationDisplay{
		// 					Provider: to.Ptr("Microsoft Fabric"),
		// 					Resource: to.Ptr("capacities"),
		// 					Operation: to.Ptr("Resume the specified Fabric capacity"),
		// 					Description: to.Ptr("Resume the specified Fabric capacity"),
		// 				},
		// 				Origin: to.Ptr(armfabric.OriginUserSystem),
		// 			},
		// 		},
		// 	},
		// }
	}
}
Output:

type OperationsClientListOptions

type OperationsClientListOptions struct {
}

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

type OperationsClientListResponse

type OperationsClientListResponse struct {
	// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.
	OperationListResult
}

OperationsClientListResponse contains the response from method OperationsClient.NewListPager.

type Origin

type Origin string

Origin - The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system"

const (
	// OriginSystem - Indicates the operation is initiated by a system.
	OriginSystem Origin = "system"
	// OriginUser - Indicates the operation is initiated by a user.
	OriginUser Origin = "user"
	// OriginUserSystem - Indicates the operation is initiated by a user or system.
	OriginUserSystem Origin = "user,system"
)

func PossibleOriginValues

func PossibleOriginValues() []Origin

PossibleOriginValues returns the possible values for the Origin const type.

type ProvisioningState

type ProvisioningState string

ProvisioningState - The provisioning state of the Fabric capacity resource.

const (
	// ProvisioningStateCanceled - Resource creation was canceled.
	ProvisioningStateCanceled ProvisioningState = "Canceled"
	// ProvisioningStateDeleting - Resource is deleting
	ProvisioningStateDeleting ProvisioningState = "Deleting"
	// ProvisioningStateFailed - Resource creation failed.
	ProvisioningStateFailed ProvisioningState = "Failed"
	// ProvisioningStateProvisioning - Resource is provisioning
	ProvisioningStateProvisioning ProvisioningState = "Provisioning"
	// ProvisioningStateSucceeded - Resource has been created.
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
	// ProvisioningStateUpdating - Resource is updating
	ProvisioningStateUpdating ProvisioningState = "Updating"
)

func PossibleProvisioningStateValues

func PossibleProvisioningStateValues() []ProvisioningState

PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.

type ResourceState

type ResourceState string

ResourceState - The state of the Fabric capacity resource.

const (
	// ResourceStateActive - Resource is active
	ResourceStateActive ResourceState = "Active"
	// ResourceStateDeleting - Resource is deleting
	ResourceStateDeleting ResourceState = "Deleting"
	// ResourceStateFailed - Resource is failed
	ResourceStateFailed ResourceState = "Failed"
	// ResourceStatePaused - Resource is paused
	ResourceStatePaused ResourceState = "Paused"
	// ResourceStatePausing - Resource is pausing
	ResourceStatePausing ResourceState = "Pausing"
	// ResourceStatePreparing - Resource is preparing
	ResourceStatePreparing ResourceState = "Preparing"
	// ResourceStateProvisioning - Resource is provisioning
	ResourceStateProvisioning ResourceState = "Provisioning"
	// ResourceStateResuming - Resource is resuming
	ResourceStateResuming ResourceState = "Resuming"
	// ResourceStateScaling - Resource is scaling
	ResourceStateScaling ResourceState = "Scaling"
	// ResourceStateSuspended - Resource is suspended
	ResourceStateSuspended ResourceState = "Suspended"
	// ResourceStateSuspending - Resource is suspending
	ResourceStateSuspending ResourceState = "Suspending"
	// ResourceStateUpdating - Resource is updating
	ResourceStateUpdating ResourceState = "Updating"
)

func PossibleResourceStateValues

func PossibleResourceStateValues() []ResourceState

PossibleResourceStateValues returns the possible values for the ResourceState const type.

type RpSKU

type RpSKU struct {
	// REQUIRED; The name of the SKU level.
	Name *string

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

RpSKU - Represents the SKU name and Azure pricing tier for Microsoft Fabric capacity resource.

func (RpSKU) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type RpSKU.

func (*RpSKU) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type RpSKU.

type RpSKUDetailsForExistingResource

type RpSKUDetailsForExistingResource struct {
	// REQUIRED; The resource type
	ResourceType *string

	// REQUIRED; The SKU details
	SKU *RpSKU
}

RpSKUDetailsForExistingResource - An object that represents SKU details for existing resources

func (RpSKUDetailsForExistingResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type RpSKUDetailsForExistingResource.

func (*RpSKUDetailsForExistingResource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type RpSKUDetailsForExistingResource.

type RpSKUDetailsForNewResource

type RpSKUDetailsForNewResource struct {
	// REQUIRED; The list of available locations for the SKU
	Locations []*string

	// REQUIRED; The SKU's name
	Name *string

	// REQUIRED; The resource type
	ResourceType *string
}

RpSKUDetailsForNewResource - The SKU details

func (RpSKUDetailsForNewResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type RpSKUDetailsForNewResource.

func (*RpSKUDetailsForNewResource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type RpSKUDetailsForNewResource.

type RpSKUEnumerationForExistingResourceResult

type RpSKUEnumerationForExistingResourceResult struct {
	// REQUIRED; The SKU details
	Value []*RpSKUDetailsForExistingResource

	// Url for the next page. Null if no more pages available
	NextLink *string
}

RpSKUEnumerationForExistingResourceResult - An object that represents enumerating SKUs for existing resources

func (RpSKUEnumerationForExistingResourceResult) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type RpSKUEnumerationForExistingResourceResult.

func (*RpSKUEnumerationForExistingResourceResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type RpSKUEnumerationForExistingResourceResult.

type RpSKUEnumerationForNewResourceResult

type RpSKUEnumerationForNewResourceResult struct {
	// REQUIRED; The collection of available SKUs for new resources
	Value []*RpSKUDetailsForNewResource

	// Url for the next page. Null if no more pages available
	NextLink *string
}

RpSKUEnumerationForNewResourceResult - An object that represents enumerating SKUs for new resources.

func (RpSKUEnumerationForNewResourceResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type RpSKUEnumerationForNewResourceResult.

func (*RpSKUEnumerationForNewResourceResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type RpSKUEnumerationForNewResourceResult.

type RpSKUTier

type RpSKUTier string

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

const (
	// RpSKUTierFabric - Fabric tier
	RpSKUTierFabric RpSKUTier = "Fabric"
)

func PossibleRpSKUTierValues

func PossibleRpSKUTierValues() []RpSKUTier

PossibleRpSKUTierValues returns the possible values for the RpSKUTier const type.

type SystemData

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

	// The identity that created the resource.
	CreatedBy *string

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

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

	// The identity that last modified the resource.
	LastModifiedBy *string

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

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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