armdashboard

package module
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2023 License: MIT Imports: 14 Imported by: 5

README

Azure Dashboard Module for Go

PkgGoDev

The armdashboard module provides operations for working with Azure Dashboard.

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

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dashboard/armdashboard

Authorization

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

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 Dashboard 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 APIKey added in v1.0.0

type APIKey string
const (
	APIKeyDisabled APIKey = "Disabled"
	APIKeyEnabled  APIKey = "Enabled"
)

func PossibleAPIKeyValues added in v1.0.0

func PossibleAPIKeyValues() []APIKey

PossibleAPIKeyValues returns the possible values for the APIKey const type.

type ActionType

type ActionType string

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

const (
	ActionTypeInternal ActionType = "Internal"
)

func PossibleActionTypeValues

func PossibleActionTypeValues() []ActionType

PossibleActionTypeValues returns the possible values for the ActionType const type.

type AutoGeneratedDomainNameLabelScope

type AutoGeneratedDomainNameLabelScope string

AutoGeneratedDomainNameLabelScope - Scope for dns deterministic name hash calculation

const (
	AutoGeneratedDomainNameLabelScopeTenantReuse AutoGeneratedDomainNameLabelScope = "TenantReuse"
)

func PossibleAutoGeneratedDomainNameLabelScopeValues

func PossibleAutoGeneratedDomainNameLabelScopeValues() []AutoGeneratedDomainNameLabelScope

PossibleAutoGeneratedDomainNameLabelScopeValues returns the possible values for the AutoGeneratedDomainNameLabelScope const type.

type AvailablePromotion added in v1.2.0

type AvailablePromotion string
const (
	AvailablePromotionFreeTrial AvailablePromotion = "FreeTrial"
	AvailablePromotionNone      AvailablePromotion = "None"
)

func PossibleAvailablePromotionValues added in v1.2.0

func PossibleAvailablePromotionValues() []AvailablePromotion

PossibleAvailablePromotionValues returns the possible values for the AvailablePromotion const type.

type AzureMonitorWorkspaceIntegration added in v1.0.0

type AzureMonitorWorkspaceIntegration struct {
	// The resource Id of the connected Azure Monitor Workspace.
	AzureMonitorWorkspaceResourceID *string
}

AzureMonitorWorkspaceIntegration - Integrations for Azure Monitor Workspace.

func (AzureMonitorWorkspaceIntegration) MarshalJSON added in v1.0.0

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

MarshalJSON implements the json.Marshaller interface for type AzureMonitorWorkspaceIntegration.

func (*AzureMonitorWorkspaceIntegration) UnmarshalJSON added in v1.0.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AzureMonitorWorkspaceIntegration.

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

func (*ClientFactory) NewGrafanaClient added in v1.1.0

func (c *ClientFactory) NewGrafanaClient() *GrafanaClient

NewGrafanaClient creates a new instance of GrafanaClient.

func (*ClientFactory) NewManagedPrivateEndpointsClient added in v1.2.0

func (c *ClientFactory) NewManagedPrivateEndpointsClient() *ManagedPrivateEndpointsClient

NewManagedPrivateEndpointsClient creates a new instance of ManagedPrivateEndpointsClient.

func (*ClientFactory) NewOperationsClient added in v1.1.0

func (c *ClientFactory) NewOperationsClient() *OperationsClient

NewOperationsClient creates a new instance of OperationsClient.

func (*ClientFactory) NewPrivateEndpointConnectionsClient added in v1.1.0

func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient

NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient.

func (*ClientFactory) NewPrivateLinkResourcesClient added in v1.1.0

func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient

NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient.

type CreatedByType

type CreatedByType string

CreatedByType - The type of identity that created the resource.

const (
	CreatedByTypeApplication     CreatedByType = "Application"
	CreatedByTypeKey             CreatedByType = "Key"
	CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity"
	CreatedByTypeUser            CreatedByType = "User"
)

func PossibleCreatedByTypeValues

func PossibleCreatedByTypeValues() []CreatedByType

PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.

type DeterministicOutboundIP added in v1.0.0

type DeterministicOutboundIP string
const (
	DeterministicOutboundIPDisabled DeterministicOutboundIP = "Disabled"
	DeterministicOutboundIPEnabled  DeterministicOutboundIP = "Enabled"
)

func PossibleDeterministicOutboundIPValues added in v1.0.0

func PossibleDeterministicOutboundIPValues() []DeterministicOutboundIP

PossibleDeterministicOutboundIPValues returns the possible values for the DeterministicOutboundIP const type.

type EnterpriseConfigurations added in v1.2.0

type EnterpriseConfigurations struct {
	// The AutoRenew setting of the Enterprise subscription
	MarketplaceAutoRenew *MarketplaceAutoRenew

	// The Plan Id of the Azure Marketplace subscription for the Enterprise plugins
	MarketplacePlanID *string
}

EnterpriseConfigurations - Enterprise settings of a Grafana instance

func (EnterpriseConfigurations) MarshalJSON added in v1.2.0

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

MarshalJSON implements the json.Marshaller interface for type EnterpriseConfigurations.

func (*EnterpriseConfigurations) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type EnterpriseConfigurations.

type EnterpriseDetails added in v1.2.0

type EnterpriseDetails struct {
	// The allocation details of the per subscription free trial slot of the subscription.
	MarketplaceTrialQuota *MarketplaceTrialQuota

	// SaaS subscription details of a Grafana instance
	SaasSubscriptionDetails *SaasSubscriptionDetails
}

EnterpriseDetails - Enterprise details of a Grafana instance

func (EnterpriseDetails) MarshalJSON added in v1.2.0

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

MarshalJSON implements the json.Marshaller interface for type EnterpriseDetails.

func (*EnterpriseDetails) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type EnterpriseDetails.

type GrafanaAvailablePlugin added in v1.2.0

type GrafanaAvailablePlugin struct {
	// READ-ONLY; Grafana plugin display name
	Name *string

	// READ-ONLY; Grafana plugin id
	PluginID *string
}

GrafanaAvailablePlugin - Available plugins of grafana

func (GrafanaAvailablePlugin) MarshalJSON added in v1.2.0

func (g GrafanaAvailablePlugin) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GrafanaAvailablePlugin.

func (*GrafanaAvailablePlugin) UnmarshalJSON added in v1.2.0

func (g *GrafanaAvailablePlugin) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GrafanaAvailablePlugin.

type GrafanaAvailablePluginListResponse added in v1.2.0

type GrafanaAvailablePluginListResponse struct {
	NextLink *string
	Value    []*GrafanaAvailablePlugin
}

func (GrafanaAvailablePluginListResponse) MarshalJSON added in v1.2.0

func (g GrafanaAvailablePluginListResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GrafanaAvailablePluginListResponse.

func (*GrafanaAvailablePluginListResponse) UnmarshalJSON added in v1.2.0

func (g *GrafanaAvailablePluginListResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GrafanaAvailablePluginListResponse.

type GrafanaClient

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

GrafanaClient contains the methods for the Grafana group. Don't use this type directly, use NewGrafanaClient() instead.

func NewGrafanaClient

func NewGrafanaClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GrafanaClient, error)

NewGrafanaClient creates a new instance of GrafanaClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*GrafanaClient) BeginCreate

func (client *GrafanaClient) BeginCreate(ctx context.Context, resourceGroupName string, workspaceName string, requestBodyParameters ManagedGrafana, options *GrafanaClientBeginCreateOptions) (*runtime.Poller[GrafanaClientCreateResponse], error)

BeginCreate - Create or update a workspace for Grafana resource. This API is idempotent, so user can either create a new grafana or update an existing grafana. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-09-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • workspaceName - The workspace name of Azure Managed Grafana.
  • options - GrafanaClientBeginCreateOptions contains the optional parameters for the GrafanaClient.BeginCreate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/78eac0bd58633028293cb1ec1709baa200bed9e2/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2023-09-01/examples/Grafana_Create.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/dashboard/armdashboard"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdashboard.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewGrafanaClient().BeginCreate(ctx, "myResourceGroup", "myWorkspace", armdashboard.ManagedGrafana{
		Identity: &armdashboard.ManagedServiceIdentity{
			Type: to.Ptr(armdashboard.ManagedServiceIdentityTypeSystemAssigned),
		},
		Location: to.Ptr("West US"),
		Properties: &armdashboard.ManagedGrafanaProperties{
			APIKey:                  to.Ptr(armdashboard.APIKeyEnabled),
			DeterministicOutboundIP: to.Ptr(armdashboard.DeterministicOutboundIPEnabled),
			EnterpriseConfigurations: &armdashboard.EnterpriseConfigurations{
				MarketplaceAutoRenew: to.Ptr(armdashboard.MarketplaceAutoRenewEnabled),
				MarketplacePlanID:    to.Ptr("myPlanId"),
			},
			GrafanaConfigurations: &armdashboard.GrafanaConfigurations{
				SMTP: &armdashboard.SMTP{
					Enabled:        to.Ptr(true),
					FromAddress:    to.Ptr("test@sendemail.com"),
					FromName:       to.Ptr("emailsender"),
					Host:           to.Ptr("smtp.sendemail.com:587"),
					Password:       to.Ptr("<password>"),
					SkipVerify:     to.Ptr(true),
					StartTLSPolicy: to.Ptr(armdashboard.StartTLSPolicyOpportunisticStartTLS),
					User:           to.Ptr("username"),
				},
			},
			GrafanaIntegrations: &armdashboard.GrafanaIntegrations{
				AzureMonitorWorkspaceIntegrations: []*armdashboard.AzureMonitorWorkspaceIntegration{
					{
						AzureMonitorWorkspaceResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.monitor/accounts/myAzureMonitorWorkspace"),
					}},
			},
			GrafanaMajorVersion: to.Ptr("9"),
			GrafanaPlugins: map[string]*armdashboard.GrafanaPlugin{
				"sample-plugin-id": {},
			},
			PublicNetworkAccess: to.Ptr(armdashboard.PublicNetworkAccessEnabled),
			ZoneRedundancy:      to.Ptr(armdashboard.ZoneRedundancyEnabled),
		},
		SKU: &armdashboard.ResourceSKU{
			Name: to.Ptr("Standard"),
		},
		Tags: map[string]*string{
			"Environment": to.Ptr("Dev"),
		},
	}, 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.ManagedGrafana = armdashboard.ManagedGrafana{
	// 	Name: to.Ptr("myWorkspace"),
	// 	Type: to.Ptr("Microsoft.Dashboard/grafana"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/grafana/myWorkspace"),
	// 	Identity: &armdashboard.ManagedServiceIdentity{
	// 		Type: to.Ptr(armdashboard.ManagedServiceIdentityTypeSystemAssigned),
	// 	},
	// 	Location: to.Ptr("West US"),
	// 	Properties: &armdashboard.ManagedGrafanaProperties{
	// 		APIKey: to.Ptr(armdashboard.APIKeyEnabled),
	// 		AutoGeneratedDomainNameLabelScope: to.Ptr(armdashboard.AutoGeneratedDomainNameLabelScopeTenantReuse),
	// 		DeterministicOutboundIP: to.Ptr(armdashboard.DeterministicOutboundIPEnabled),
	// 		Endpoint: to.Ptr("https://myworkspace-abcdefghijklmnop.wus.grafana.azure.com"),
	// 		EnterpriseConfigurations: &armdashboard.EnterpriseConfigurations{
	// 			MarketplaceAutoRenew: to.Ptr(armdashboard.MarketplaceAutoRenewEnabled),
	// 			MarketplacePlanID: to.Ptr("myPlanId"),
	// 		},
	// 		GrafanaConfigurations: &armdashboard.GrafanaConfigurations{
	// 			SMTP: &armdashboard.SMTP{
	// 				Enabled: to.Ptr(true),
	// 				FromAddress: to.Ptr("test@sendemail.com"),
	// 				FromName: to.Ptr("emailsender"),
	// 				Host: to.Ptr("smtp.sendemail.com:587"),
	// 				SkipVerify: to.Ptr(true),
	// 				StartTLSPolicy: to.Ptr(armdashboard.StartTLSPolicyOpportunisticStartTLS),
	// 				User: to.Ptr("username"),
	// 			},
	// 		},
	// 		GrafanaIntegrations: &armdashboard.GrafanaIntegrations{
	// 			AzureMonitorWorkspaceIntegrations: []*armdashboard.AzureMonitorWorkspaceIntegration{
	// 				{
	// 					AzureMonitorWorkspaceResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.monitor/accounts/myAzureMonitorWorkspace"),
	// 			}},
	// 		},
	// 		GrafanaMajorVersion: to.Ptr("9"),
	// 		GrafanaPlugins: map[string]*armdashboard.GrafanaPlugin{
	// 			"sample-plugin-id": &armdashboard.GrafanaPlugin{
	// 				PluginID: to.Ptr("sample-plugin-id"),
	// 			},
	// 		},
	// 		GrafanaVersion: to.Ptr("9.4.5"),
	// 		OutboundIPs: []*string{
	// 			to.Ptr("192.168.0.1"),
	// 			to.Ptr("192.168.0.2")},
	// 			ProvisioningState: to.Ptr(armdashboard.ProvisioningStateSucceeded),
	// 			PublicNetworkAccess: to.Ptr(armdashboard.PublicNetworkAccessEnabled),
	// 			ZoneRedundancy: to.Ptr(armdashboard.ZoneRedundancyEnabled),
	// 		},
	// 		SKU: &armdashboard.ResourceSKU{
	// 			Name: to.Ptr("Standard"),
	// 		},
	// 		SystemData: &armdashboard.SystemData{
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-03T01:01:01.107Z"); return t}()),
	// 			CreatedBy: to.Ptr("string"),
	// 			CreatedByType: to.Ptr(armdashboard.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-04T02:03:01.197Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("string"),
	// 			LastModifiedByType: to.Ptr(armdashboard.CreatedByTypeUser),
	// 		},
	// 		Tags: map[string]*string{
	// 			"Environment": to.Ptr("Dev"),
	// 		},
	// 	}
}
Output:

func (*GrafanaClient) BeginDelete

func (client *GrafanaClient) BeginDelete(ctx context.Context, resourceGroupName string, workspaceName string, options *GrafanaClientBeginDeleteOptions) (*runtime.Poller[GrafanaClientDeleteResponse], error)

BeginDelete - Delete a workspace for Grafana resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-09-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • workspaceName - The workspace name of Azure Managed Grafana.
  • options - GrafanaClientBeginDeleteOptions contains the optional parameters for the GrafanaClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/78eac0bd58633028293cb1ec1709baa200bed9e2/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2023-09-01/examples/Grafana_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dashboard/armdashboard"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdashboard.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewGrafanaClient().BeginDelete(ctx, "myResourceGroup", "myWorkspace", 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 (*GrafanaClient) CheckEnterpriseDetails added in v1.2.0

func (client *GrafanaClient) CheckEnterpriseDetails(ctx context.Context, resourceGroupName string, workspaceName string, options *GrafanaClientCheckEnterpriseDetailsOptions) (GrafanaClientCheckEnterpriseDetailsResponse, error)

CheckEnterpriseDetails - Retrieve enterprise add-on details information If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-09-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • workspaceName - The workspace name of Azure Managed Grafana.
  • options - GrafanaClientCheckEnterpriseDetailsOptions contains the optional parameters for the GrafanaClient.CheckEnterpriseDetails method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/78eac0bd58633028293cb1ec1709baa200bed9e2/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2023-09-01/examples/EnterpriseDetails_Post.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dashboard/armdashboard"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdashboard.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewGrafanaClient().CheckEnterpriseDetails(ctx, "myResourceGroup", "myWorkspace", 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.EnterpriseDetails = armdashboard.EnterpriseDetails{
	// 	MarketplaceTrialQuota: &armdashboard.MarketplaceTrialQuota{
	// 		AvailablePromotion: to.Ptr(armdashboard.AvailablePromotionNone),
	// 		GrafanaResourceID: to.Ptr("/subscriptions/e1e3b30d-e7ec-4e25-8587-db037bcb9a4d/resourcegroups/amg-local-script-test-rg/providers/microsoft.dashboard/grafana/eus2-enterprise-1001-07"),
	// 		TrialEndAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-03T01:06:00.447Z"); return t}()),
	// 		TrialStartAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-04T01:06:00.447Z"); return t}()),
	// 	},
	// 	SaasSubscriptionDetails: &armdashboard.SaasSubscriptionDetails{
	// 		OfferID: to.Ptr("amg_test"),
	// 		PlanID: to.Ptr("amg_globalplan"),
	// 		PublisherID: to.Ptr("isvtestuklegacy"),
	// 		Term: &armdashboard.SubscriptionTerm{
	// 			EndDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-03T00:00:00.000Z"); return t}()),
	// 			StartDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-04T00:00:00.000Z"); return t}()),
	// 			TermUnit: to.Ptr("P1M"),
	// 		},
	// 	},
	// }
}
Output:

func (*GrafanaClient) FetchAvailablePlugins added in v1.2.0

func (client *GrafanaClient) FetchAvailablePlugins(ctx context.Context, resourceGroupName string, workspaceName string, options *GrafanaClientFetchAvailablePluginsOptions) (GrafanaClientFetchAvailablePluginsResponse, error)

FetchAvailablePlugins - If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-09-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • workspaceName - The workspace name of Azure Managed Grafana.
  • options - GrafanaClientFetchAvailablePluginsOptions contains the optional parameters for the GrafanaClient.FetchAvailablePlugins method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/78eac0bd58633028293cb1ec1709baa200bed9e2/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2023-09-01/examples/Grafana_FetchAvailablePlugins.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dashboard/armdashboard"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdashboard.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewGrafanaClient().FetchAvailablePlugins(ctx, "myResourceGroup", "myWorkspace", 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.GrafanaAvailablePluginListResponse = armdashboard.GrafanaAvailablePluginListResponse{
	// 	Value: []*armdashboard.GrafanaAvailablePlugin{
	// 		{
	// 			Name: to.Ptr("Plugin A"),
	// 			PluginID: to.Ptr("plugin-a"),
	// 		},
	// 		{
	// 			Name: to.Ptr("Plugin B"),
	// 			PluginID: to.Ptr("plugin-b"),
	// 	}},
	// }
}
Output:

func (*GrafanaClient) Get

func (client *GrafanaClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, options *GrafanaClientGetOptions) (GrafanaClientGetResponse, error)

Get - Get the properties of a specific workspace for Grafana resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-09-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • workspaceName - The workspace name of Azure Managed Grafana.
  • options - GrafanaClientGetOptions contains the optional parameters for the GrafanaClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/78eac0bd58633028293cb1ec1709baa200bed9e2/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2023-09-01/examples/Grafana_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dashboard/armdashboard"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdashboard.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewGrafanaClient().Get(ctx, "myResourceGroup", "myWorkspace", 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.ManagedGrafana = armdashboard.ManagedGrafana{
	// 	Name: to.Ptr("myWorkspace"),
	// 	Type: to.Ptr("Microsoft.Dashboard/grafana"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/grafana/myWorkspace"),
	// 	Location: to.Ptr("West US"),
	// 	Properties: &armdashboard.ManagedGrafanaProperties{
	// 		APIKey: to.Ptr(armdashboard.APIKeyEnabled),
	// 		AutoGeneratedDomainNameLabelScope: to.Ptr(armdashboard.AutoGeneratedDomainNameLabelScopeTenantReuse),
	// 		DeterministicOutboundIP: to.Ptr(armdashboard.DeterministicOutboundIPEnabled),
	// 		Endpoint: to.Ptr("https://myworkspace-abcdefghijklmnop.wus.grafana.azure.com"),
	// 		EnterpriseConfigurations: &armdashboard.EnterpriseConfigurations{
	// 			MarketplaceAutoRenew: to.Ptr(armdashboard.MarketplaceAutoRenewEnabled),
	// 			MarketplacePlanID: to.Ptr("myPlanId"),
	// 		},
	// 		GrafanaConfigurations: &armdashboard.GrafanaConfigurations{
	// 			SMTP: &armdashboard.SMTP{
	// 				Enabled: to.Ptr(true),
	// 				FromAddress: to.Ptr("test@sendemail.com"),
	// 				FromName: to.Ptr("emailsender"),
	// 				Host: to.Ptr("smtp.sendemail.com:587"),
	// 				SkipVerify: to.Ptr(true),
	// 				StartTLSPolicy: to.Ptr(armdashboard.StartTLSPolicyOpportunisticStartTLS),
	// 				User: to.Ptr("username"),
	// 			},
	// 		},
	// 		GrafanaIntegrations: &armdashboard.GrafanaIntegrations{
	// 			AzureMonitorWorkspaceIntegrations: []*armdashboard.AzureMonitorWorkspaceIntegration{
	// 				{
	// 					AzureMonitorWorkspaceResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.monitor/accounts/myAzureMonitorWorkspace"),
	// 			}},
	// 		},
	// 		GrafanaMajorVersion: to.Ptr("9"),
	// 		GrafanaPlugins: map[string]*armdashboard.GrafanaPlugin{
	// 			"sample-plugin-id": &armdashboard.GrafanaPlugin{
	// 				PluginID: to.Ptr("sample-plugin-id"),
	// 			},
	// 		},
	// 		GrafanaVersion: to.Ptr("9.4.5"),
	// 		OutboundIPs: []*string{
	// 			to.Ptr("192.168.0.1"),
	// 			to.Ptr("192.168.0.2")},
	// 			ProvisioningState: to.Ptr(armdashboard.ProvisioningStateSucceeded),
	// 			PublicNetworkAccess: to.Ptr(armdashboard.PublicNetworkAccessEnabled),
	// 			ZoneRedundancy: to.Ptr(armdashboard.ZoneRedundancyEnabled),
	// 		},
	// 		SKU: &armdashboard.ResourceSKU{
	// 			Name: to.Ptr("Standard"),
	// 		},
	// 		SystemData: &armdashboard.SystemData{
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-03T01:01:01.107Z"); return t}()),
	// 			CreatedBy: to.Ptr("string"),
	// 			CreatedByType: to.Ptr(armdashboard.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-04T02:03:01.197Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("string"),
	// 			LastModifiedByType: to.Ptr(armdashboard.CreatedByTypeUser),
	// 		},
	// 		Tags: map[string]*string{
	// 			"Environment": to.Ptr("Dev"),
	// 		},
	// 	}
}
Output:

func (*GrafanaClient) NewListByResourceGroupPager added in v0.2.0

func (client *GrafanaClient) NewListByResourceGroupPager(resourceGroupName string, options *GrafanaClientListByResourceGroupOptions) *runtime.Pager[GrafanaClientListByResourceGroupResponse]

NewListByResourceGroupPager - List all resources of workspaces for Grafana under the specified resource group.

Generated from API version 2023-09-01

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

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/78eac0bd58633028293cb1ec1709baa200bed9e2/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2023-09-01/examples/Grafana_ListByResourceGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dashboard/armdashboard"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdashboard.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewGrafanaClient().NewListByResourceGroupPager("myResourceGroup", 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.ManagedGrafanaListResponse = armdashboard.ManagedGrafanaListResponse{
		// 	Value: []*armdashboard.ManagedGrafana{
		// 		{
		// 			Name: to.Ptr("myWorkspace"),
		// 			Type: to.Ptr("Microsoft.Dashboard/grafana"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/grafana/myWorkspace"),
		// 			Location: to.Ptr("West US"),
		// 			Properties: &armdashboard.ManagedGrafanaProperties{
		// 				APIKey: to.Ptr(armdashboard.APIKeyEnabled),
		// 				AutoGeneratedDomainNameLabelScope: to.Ptr(armdashboard.AutoGeneratedDomainNameLabelScopeTenantReuse),
		// 				DeterministicOutboundIP: to.Ptr(armdashboard.DeterministicOutboundIPEnabled),
		// 				Endpoint: to.Ptr("https://myworkspace-abcdefghijklmnop.wus.grafana.azure.com"),
		// 				EnterpriseConfigurations: &armdashboard.EnterpriseConfigurations{
		// 					MarketplaceAutoRenew: to.Ptr(armdashboard.MarketplaceAutoRenewEnabled),
		// 					MarketplacePlanID: to.Ptr("myPlanId"),
		// 				},
		// 				GrafanaConfigurations: &armdashboard.GrafanaConfigurations{
		// 					SMTP: &armdashboard.SMTP{
		// 						Enabled: to.Ptr(true),
		// 						FromAddress: to.Ptr("test@sendemail.com"),
		// 						FromName: to.Ptr("emailsender"),
		// 						Host: to.Ptr("smtp.sendemail.com:587"),
		// 						SkipVerify: to.Ptr(true),
		// 						StartTLSPolicy: to.Ptr(armdashboard.StartTLSPolicyOpportunisticStartTLS),
		// 						User: to.Ptr("username"),
		// 					},
		// 				},
		// 				GrafanaIntegrations: &armdashboard.GrafanaIntegrations{
		// 					AzureMonitorWorkspaceIntegrations: []*armdashboard.AzureMonitorWorkspaceIntegration{
		// 						{
		// 							AzureMonitorWorkspaceResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.monitor/accounts/myAzureMonitorWorkspace"),
		// 					}},
		// 				},
		// 				GrafanaMajorVersion: to.Ptr("9"),
		// 				GrafanaPlugins: map[string]*armdashboard.GrafanaPlugin{
		// 					"sample-plugin-id": &armdashboard.GrafanaPlugin{
		// 						PluginID: to.Ptr("sample-plugin-id"),
		// 					},
		// 				},
		// 				GrafanaVersion: to.Ptr("9.4.5"),
		// 				OutboundIPs: []*string{
		// 					to.Ptr("192.168.0.1"),
		// 					to.Ptr("192.168.0.2")},
		// 					ProvisioningState: to.Ptr(armdashboard.ProvisioningStateSucceeded),
		// 					PublicNetworkAccess: to.Ptr(armdashboard.PublicNetworkAccessEnabled),
		// 					ZoneRedundancy: to.Ptr(armdashboard.ZoneRedundancyEnabled),
		// 				},
		// 				SKU: &armdashboard.ResourceSKU{
		// 					Name: to.Ptr("Standard"),
		// 				},
		// 				Tags: map[string]*string{
		// 					"Environment": to.Ptr("Dev"),
		// 				},
		// 		}},
		// 	}
	}
}
Output:

func (*GrafanaClient) NewListPager added in v0.2.0

NewListPager - List all resources of workspaces for Grafana under the specified subscription.

Generated from API version 2023-09-01

  • options - GrafanaClientListOptions contains the optional parameters for the GrafanaClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/78eac0bd58633028293cb1ec1709baa200bed9e2/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2023-09-01/examples/Grafana_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dashboard/armdashboard"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdashboard.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewGrafanaClient().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.ManagedGrafanaListResponse = armdashboard.ManagedGrafanaListResponse{
		// 	Value: []*armdashboard.ManagedGrafana{
		// 		{
		// 			Name: to.Ptr("myWorkspace"),
		// 			Type: to.Ptr("Microsoft.Dashboard/grafana"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/grafana/myWorkspace"),
		// 			Location: to.Ptr("West US"),
		// 			Properties: &armdashboard.ManagedGrafanaProperties{
		// 				APIKey: to.Ptr(armdashboard.APIKeyEnabled),
		// 				AutoGeneratedDomainNameLabelScope: to.Ptr(armdashboard.AutoGeneratedDomainNameLabelScopeTenantReuse),
		// 				DeterministicOutboundIP: to.Ptr(armdashboard.DeterministicOutboundIPEnabled),
		// 				Endpoint: to.Ptr("https://myworkspace-abcdefghijklmnop.wus.grafana.azure.com"),
		// 				EnterpriseConfigurations: &armdashboard.EnterpriseConfigurations{
		// 					MarketplaceAutoRenew: to.Ptr(armdashboard.MarketplaceAutoRenewEnabled),
		// 					MarketplacePlanID: to.Ptr("myPlanId"),
		// 				},
		// 				GrafanaConfigurations: &armdashboard.GrafanaConfigurations{
		// 					SMTP: &armdashboard.SMTP{
		// 						Enabled: to.Ptr(true),
		// 						FromAddress: to.Ptr("test@sendemail.com"),
		// 						FromName: to.Ptr("emailsender"),
		// 						Host: to.Ptr("smtp.sendemail.com:587"),
		// 						SkipVerify: to.Ptr(true),
		// 						StartTLSPolicy: to.Ptr(armdashboard.StartTLSPolicyOpportunisticStartTLS),
		// 						User: to.Ptr("username"),
		// 					},
		// 				},
		// 				GrafanaIntegrations: &armdashboard.GrafanaIntegrations{
		// 					AzureMonitorWorkspaceIntegrations: []*armdashboard.AzureMonitorWorkspaceIntegration{
		// 						{
		// 							AzureMonitorWorkspaceResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.monitor/accounts/myAzureMonitorWorkspace"),
		// 					}},
		// 				},
		// 				GrafanaMajorVersion: to.Ptr("9"),
		// 				GrafanaPlugins: map[string]*armdashboard.GrafanaPlugin{
		// 					"sample-plugin-id": &armdashboard.GrafanaPlugin{
		// 						PluginID: to.Ptr("sample-plugin-id"),
		// 					},
		// 				},
		// 				GrafanaVersion: to.Ptr("9.4.5"),
		// 				OutboundIPs: []*string{
		// 					to.Ptr("192.168.0.1"),
		// 					to.Ptr("192.168.0.2")},
		// 					ProvisioningState: to.Ptr(armdashboard.ProvisioningStateSucceeded),
		// 					PublicNetworkAccess: to.Ptr(armdashboard.PublicNetworkAccessEnabled),
		// 					ZoneRedundancy: to.Ptr(armdashboard.ZoneRedundancyEnabled),
		// 				},
		// 				SKU: &armdashboard.ResourceSKU{
		// 					Name: to.Ptr("Standard"),
		// 				},
		// 				Tags: map[string]*string{
		// 					"Environment": to.Ptr("Dev"),
		// 				},
		// 		}},
		// 	}
	}
}
Output:

func (*GrafanaClient) Update

func (client *GrafanaClient) Update(ctx context.Context, resourceGroupName string, workspaceName string, requestBodyParameters ManagedGrafanaUpdateParameters, options *GrafanaClientUpdateOptions) (GrafanaClientUpdateResponse, error)

Update - Update a workspace for Grafana resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-09-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • workspaceName - The workspace name of Azure Managed Grafana.
  • options - GrafanaClientUpdateOptions contains the optional parameters for the GrafanaClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/78eac0bd58633028293cb1ec1709baa200bed9e2/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2023-09-01/examples/Grafana_Update.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/dashboard/armdashboard"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdashboard.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewGrafanaClient().Update(ctx, "myResourceGroup", "myWorkspace", armdashboard.ManagedGrafanaUpdateParameters{
		Properties: &armdashboard.ManagedGrafanaPropertiesUpdateParameters{
			APIKey:                  to.Ptr(armdashboard.APIKeyEnabled),
			DeterministicOutboundIP: to.Ptr(armdashboard.DeterministicOutboundIPEnabled),
			EnterpriseConfigurations: &armdashboard.EnterpriseConfigurations{
				MarketplaceAutoRenew: to.Ptr(armdashboard.MarketplaceAutoRenewEnabled),
				MarketplacePlanID:    to.Ptr("myPlanId"),
			},
			GrafanaConfigurations: &armdashboard.GrafanaConfigurations{
				SMTP: &armdashboard.SMTP{
					Enabled:        to.Ptr(true),
					FromAddress:    to.Ptr("test@sendemail.com"),
					FromName:       to.Ptr("emailsender"),
					Host:           to.Ptr("smtp.sendemail.com:587"),
					Password:       to.Ptr("<password>"),
					SkipVerify:     to.Ptr(true),
					StartTLSPolicy: to.Ptr(armdashboard.StartTLSPolicyOpportunisticStartTLS),
					User:           to.Ptr("username"),
				},
			},
			GrafanaIntegrations: &armdashboard.GrafanaIntegrations{
				AzureMonitorWorkspaceIntegrations: []*armdashboard.AzureMonitorWorkspaceIntegration{
					{
						AzureMonitorWorkspaceResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.monitor/accounts/myAzureMonitorWorkspace"),
					}},
			},
			GrafanaMajorVersion: to.Ptr("9"),
			GrafanaPlugins: map[string]*armdashboard.GrafanaPlugin{
				"sample-plugin-id": {},
			},
		},
		SKU: &armdashboard.ResourceSKU{
			Name: to.Ptr("Standard"),
		},
		Tags: map[string]*string{
			"Environment": to.Ptr("Dev 2"),
		},
	}, 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.ManagedGrafana = armdashboard.ManagedGrafana{
	// 	Name: to.Ptr("myWorkspace"),
	// 	Type: to.Ptr("Microsoft.Dashboard/grafana"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/grafana/myWorkspace"),
	// 	Location: to.Ptr("West US"),
	// 	Properties: &armdashboard.ManagedGrafanaProperties{
	// 		APIKey: to.Ptr(armdashboard.APIKeyEnabled),
	// 		AutoGeneratedDomainNameLabelScope: to.Ptr(armdashboard.AutoGeneratedDomainNameLabelScopeTenantReuse),
	// 		DeterministicOutboundIP: to.Ptr(armdashboard.DeterministicOutboundIPEnabled),
	// 		Endpoint: to.Ptr("https://myworkspace-abcdefghijklmnop.wus.grafana.azure.com"),
	// 		EnterpriseConfigurations: &armdashboard.EnterpriseConfigurations{
	// 			MarketplaceAutoRenew: to.Ptr(armdashboard.MarketplaceAutoRenewEnabled),
	// 			MarketplacePlanID: to.Ptr("myPlanId"),
	// 		},
	// 		GrafanaConfigurations: &armdashboard.GrafanaConfigurations{
	// 			SMTP: &armdashboard.SMTP{
	// 				Enabled: to.Ptr(true),
	// 				FromAddress: to.Ptr("test@sendemail.com"),
	// 				FromName: to.Ptr("emailsender"),
	// 				Host: to.Ptr("smtp.sendemail.com:587"),
	// 				SkipVerify: to.Ptr(true),
	// 				StartTLSPolicy: to.Ptr(armdashboard.StartTLSPolicyOpportunisticStartTLS),
	// 				User: to.Ptr("username"),
	// 			},
	// 		},
	// 		GrafanaIntegrations: &armdashboard.GrafanaIntegrations{
	// 			AzureMonitorWorkspaceIntegrations: []*armdashboard.AzureMonitorWorkspaceIntegration{
	// 				{
	// 					AzureMonitorWorkspaceResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.monitor/accounts/myAzureMonitorWorkspace"),
	// 			}},
	// 		},
	// 		GrafanaMajorVersion: to.Ptr("9"),
	// 		GrafanaPlugins: map[string]*armdashboard.GrafanaPlugin{
	// 			"sample-plugin-id": &armdashboard.GrafanaPlugin{
	// 				PluginID: to.Ptr("sample-plugin-id"),
	// 			},
	// 		},
	// 		GrafanaVersion: to.Ptr("9.4.5"),
	// 		OutboundIPs: []*string{
	// 			to.Ptr("192.168.0.1"),
	// 			to.Ptr("192.168.0.2")},
	// 			ProvisioningState: to.Ptr(armdashboard.ProvisioningStateSucceeded),
	// 			PublicNetworkAccess: to.Ptr(armdashboard.PublicNetworkAccessEnabled),
	// 			ZoneRedundancy: to.Ptr(armdashboard.ZoneRedundancyEnabled),
	// 		},
	// 		SKU: &armdashboard.ResourceSKU{
	// 			Name: to.Ptr("Standard"),
	// 		},
	// 		Tags: map[string]*string{
	// 			"Environment": to.Ptr("Dev 2"),
	// 		},
	// 	}
}
Output:

type GrafanaClientBeginCreateOptions

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

GrafanaClientBeginCreateOptions contains the optional parameters for the GrafanaClient.BeginCreate method.

type GrafanaClientBeginDeleteOptions

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

GrafanaClientBeginDeleteOptions contains the optional parameters for the GrafanaClient.BeginDelete method.

type GrafanaClientCheckEnterpriseDetailsOptions added in v1.2.0

type GrafanaClientCheckEnterpriseDetailsOptions struct {
}

GrafanaClientCheckEnterpriseDetailsOptions contains the optional parameters for the GrafanaClient.CheckEnterpriseDetails method.

type GrafanaClientCheckEnterpriseDetailsResponse added in v1.2.0

type GrafanaClientCheckEnterpriseDetailsResponse struct {
	// Enterprise details of a Grafana instance
	EnterpriseDetails
}

GrafanaClientCheckEnterpriseDetailsResponse contains the response from method GrafanaClient.CheckEnterpriseDetails.

type GrafanaClientCreateResponse

type GrafanaClientCreateResponse struct {
	// The grafana resource type.
	ManagedGrafana
}

GrafanaClientCreateResponse contains the response from method GrafanaClient.BeginCreate.

type GrafanaClientDeleteResponse

type GrafanaClientDeleteResponse struct {
}

GrafanaClientDeleteResponse contains the response from method GrafanaClient.BeginDelete.

type GrafanaClientFetchAvailablePluginsOptions added in v1.2.0

type GrafanaClientFetchAvailablePluginsOptions struct {
}

GrafanaClientFetchAvailablePluginsOptions contains the optional parameters for the GrafanaClient.FetchAvailablePlugins method.

type GrafanaClientFetchAvailablePluginsResponse added in v1.2.0

type GrafanaClientFetchAvailablePluginsResponse struct {
	GrafanaAvailablePluginListResponse
}

GrafanaClientFetchAvailablePluginsResponse contains the response from method GrafanaClient.FetchAvailablePlugins.

type GrafanaClientGetOptions

type GrafanaClientGetOptions struct {
}

GrafanaClientGetOptions contains the optional parameters for the GrafanaClient.Get method.

type GrafanaClientGetResponse

type GrafanaClientGetResponse struct {
	// The grafana resource type.
	ManagedGrafana
}

GrafanaClientGetResponse contains the response from method GrafanaClient.Get.

type GrafanaClientListByResourceGroupOptions

type GrafanaClientListByResourceGroupOptions struct {
}

GrafanaClientListByResourceGroupOptions contains the optional parameters for the GrafanaClient.NewListByResourceGroupPager method.

type GrafanaClientListByResourceGroupResponse

type GrafanaClientListByResourceGroupResponse struct {
	ManagedGrafanaListResponse
}

GrafanaClientListByResourceGroupResponse contains the response from method GrafanaClient.NewListByResourceGroupPager.

type GrafanaClientListOptions

type GrafanaClientListOptions struct {
}

GrafanaClientListOptions contains the optional parameters for the GrafanaClient.NewListPager method.

type GrafanaClientListResponse

type GrafanaClientListResponse struct {
	ManagedGrafanaListResponse
}

GrafanaClientListResponse contains the response from method GrafanaClient.NewListPager.

type GrafanaClientUpdateOptions

type GrafanaClientUpdateOptions struct {
}

GrafanaClientUpdateOptions contains the optional parameters for the GrafanaClient.Update method.

type GrafanaClientUpdateResponse

type GrafanaClientUpdateResponse struct {
	// The grafana resource type.
	ManagedGrafana

	// AzureAsyncOperation contains the information returned from the Azure-AsyncOperation header response.
	AzureAsyncOperation *string
}

GrafanaClientUpdateResponse contains the response from method GrafanaClient.Update.

type GrafanaConfigurations added in v1.2.0

type GrafanaConfigurations struct {
	// Email server settings. https://grafana.com/docs/grafana/v9.0/setup-grafana/configure-grafana/#smtp
	SMTP *SMTP
}

GrafanaConfigurations - Server configurations of a Grafana instance

func (GrafanaConfigurations) MarshalJSON added in v1.2.0

func (g GrafanaConfigurations) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GrafanaConfigurations.

func (*GrafanaConfigurations) UnmarshalJSON added in v1.2.0

func (g *GrafanaConfigurations) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GrafanaConfigurations.

type GrafanaIntegrations added in v1.0.0

type GrafanaIntegrations struct {
	AzureMonitorWorkspaceIntegrations []*AzureMonitorWorkspaceIntegration
}

GrafanaIntegrations is a bundled observability experience (e.g. pre-configured data source, tailored Grafana dashboards, alerting defaults) for common monitoring scenarios.

func (GrafanaIntegrations) MarshalJSON added in v1.0.0

func (g GrafanaIntegrations) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GrafanaIntegrations.

func (*GrafanaIntegrations) UnmarshalJSON added in v1.0.0

func (g *GrafanaIntegrations) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GrafanaIntegrations.

type GrafanaPlugin added in v1.2.0

type GrafanaPlugin struct {
	// READ-ONLY; Grafana plugin id
	PluginID *string
}

GrafanaPlugin - Plugin of Grafana

func (GrafanaPlugin) MarshalJSON added in v1.2.0

func (g GrafanaPlugin) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GrafanaPlugin.

func (*GrafanaPlugin) UnmarshalJSON added in v1.2.0

func (g *GrafanaPlugin) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GrafanaPlugin.

type ManagedGrafana

type ManagedGrafana struct {
	// The managed identity of the grafana resource.
	Identity *ManagedServiceIdentity

	// The geo-location where the grafana resource lives
	Location *string

	// Properties specific to the grafana resource.
	Properties *ManagedGrafanaProperties

	// The Sku of the grafana resource.
	SKU *ResourceSKU

	// The tags for grafana resource.
	Tags map[string]*string

	// READ-ONLY; ARM id of the grafana resource
	ID *string

	// READ-ONLY; Name of the grafana resource.
	Name *string

	// READ-ONLY; The system meta data relating to this grafana resource.
	SystemData *SystemData

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

ManagedGrafana - The grafana resource type.

func (ManagedGrafana) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ManagedGrafana.

func (*ManagedGrafana) UnmarshalJSON added in v1.0.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ManagedGrafana.

type ManagedGrafanaListResponse

type ManagedGrafanaListResponse struct {
	NextLink *string
	Value    []*ManagedGrafana
}

func (ManagedGrafanaListResponse) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ManagedGrafanaListResponse.

func (*ManagedGrafanaListResponse) UnmarshalJSON added in v1.0.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ManagedGrafanaListResponse.

type ManagedGrafanaProperties

type ManagedGrafanaProperties struct {
	// The api key setting of the Grafana instance.
	APIKey *APIKey

	// Scope for dns deterministic name hash calculation.
	AutoGeneratedDomainNameLabelScope *AutoGeneratedDomainNameLabelScope

	// Whether a Grafana instance uses deterministic outbound IPs.
	DeterministicOutboundIP *DeterministicOutboundIP

	// Enterprise settings of a Grafana instance
	EnterpriseConfigurations *EnterpriseConfigurations

	// Server configurations of a Grafana instance
	GrafanaConfigurations *GrafanaConfigurations

	// GrafanaIntegrations is a bundled observability experience (e.g. pre-configured data source, tailored Grafana dashboards,
	// alerting defaults) for common monitoring scenarios.
	GrafanaIntegrations *GrafanaIntegrations

	// The major Grafana software version to target.
	GrafanaMajorVersion *string

	// Installed plugin list of the Grafana instance. Key is plugin id, value is plugin definition.
	GrafanaPlugins map[string]*GrafanaPlugin

	// Indicate the state for enable or disable traffic over the public interface.
	PublicNetworkAccess *PublicNetworkAccess

	// The zone redundancy setting of the Grafana instance.
	ZoneRedundancy *ZoneRedundancy

	// READ-ONLY; The endpoint of the Grafana instance.
	Endpoint *string

	// READ-ONLY; The Grafana software version.
	GrafanaVersion *string

	// READ-ONLY; List of outbound IPs if deterministicOutboundIP is enabled.
	OutboundIPs []*string

	// READ-ONLY; The private endpoint connections of the Grafana instance.
	PrivateEndpointConnections []*PrivateEndpointConnection

	// READ-ONLY; Provisioning state of the resource.
	ProvisioningState *ProvisioningState
}

ManagedGrafanaProperties - Properties specific to the grafana resource.

func (ManagedGrafanaProperties) MarshalJSON added in v1.0.0

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

MarshalJSON implements the json.Marshaller interface for type ManagedGrafanaProperties.

func (*ManagedGrafanaProperties) UnmarshalJSON added in v1.0.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ManagedGrafanaProperties.

type ManagedGrafanaPropertiesUpdateParameters added in v1.0.0

type ManagedGrafanaPropertiesUpdateParameters struct {
	// The api key setting of the Grafana instance.
	APIKey *APIKey

	// Whether a Grafana instance uses deterministic outbound IPs.
	DeterministicOutboundIP *DeterministicOutboundIP

	// Enterprise settings of a Grafana instance
	EnterpriseConfigurations *EnterpriseConfigurations

	// Server configurations of a Grafana instance
	GrafanaConfigurations *GrafanaConfigurations

	// GrafanaIntegrations is a bundled observability experience (e.g. pre-configured data source, tailored Grafana dashboards,
	// alerting defaults) for common monitoring scenarios.
	GrafanaIntegrations *GrafanaIntegrations

	// The major Grafana software version to target.
	GrafanaMajorVersion *string

	// Update of Grafana plugin. Key is plugin id, value is plugin definition. If plugin definition is null, plugin with given
	// plugin id will be removed. Otherwise, given plugin will be installed.
	GrafanaPlugins map[string]*GrafanaPlugin

	// Indicate the state for enable or disable traffic over the public interface.
	PublicNetworkAccess *PublicNetworkAccess

	// The zone redundancy setting of the Grafana instance.
	ZoneRedundancy *ZoneRedundancy
}

ManagedGrafanaPropertiesUpdateParameters - The properties parameters for a PATCH request to a grafana resource.

func (ManagedGrafanaPropertiesUpdateParameters) MarshalJSON added in v1.0.0

MarshalJSON implements the json.Marshaller interface for type ManagedGrafanaPropertiesUpdateParameters.

func (*ManagedGrafanaPropertiesUpdateParameters) UnmarshalJSON added in v1.0.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ManagedGrafanaPropertiesUpdateParameters.

type ManagedGrafanaUpdateParameters

type ManagedGrafanaUpdateParameters struct {
	// The managed identity of the grafana resource.
	Identity *ManagedServiceIdentity

	// Properties specific to the managed grafana resource.
	Properties *ManagedGrafanaPropertiesUpdateParameters
	SKU        *ResourceSKU

	// The new tags of the grafana resource.
	Tags map[string]*string
}

ManagedGrafanaUpdateParameters - The parameters for a PATCH request to a grafana resource.

func (ManagedGrafanaUpdateParameters) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ManagedGrafanaUpdateParameters.

func (*ManagedGrafanaUpdateParameters) UnmarshalJSON added in v1.0.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ManagedGrafanaUpdateParameters.

type ManagedPrivateEndpointConnectionState added in v1.2.0

type ManagedPrivateEndpointConnectionState struct {
	// READ-ONLY; Gets or sets the reason for approval/rejection of the connection.
	Description *string

	// READ-ONLY; The approval/rejection status of managed private endpoint connection.
	Status *ManagedPrivateEndpointConnectionStatus
}

ManagedPrivateEndpointConnectionState - The state of managed private endpoint connection.

func (ManagedPrivateEndpointConnectionState) MarshalJSON added in v1.2.0

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

MarshalJSON implements the json.Marshaller interface for type ManagedPrivateEndpointConnectionState.

func (*ManagedPrivateEndpointConnectionState) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ManagedPrivateEndpointConnectionState.

type ManagedPrivateEndpointConnectionStatus added in v1.2.0

type ManagedPrivateEndpointConnectionStatus string

ManagedPrivateEndpointConnectionStatus - The approval/rejection status of managed private endpoint connection.

const (
	ManagedPrivateEndpointConnectionStatusApproved     ManagedPrivateEndpointConnectionStatus = "Approved"
	ManagedPrivateEndpointConnectionStatusDisconnected ManagedPrivateEndpointConnectionStatus = "Disconnected"
	ManagedPrivateEndpointConnectionStatusPending      ManagedPrivateEndpointConnectionStatus = "Pending"
	ManagedPrivateEndpointConnectionStatusRejected     ManagedPrivateEndpointConnectionStatus = "Rejected"
)

func PossibleManagedPrivateEndpointConnectionStatusValues added in v1.2.0

func PossibleManagedPrivateEndpointConnectionStatusValues() []ManagedPrivateEndpointConnectionStatus

PossibleManagedPrivateEndpointConnectionStatusValues returns the possible values for the ManagedPrivateEndpointConnectionStatus const type.

type ManagedPrivateEndpointModel added in v1.2.0

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

	// Resource properties.
	Properties *ManagedPrivateEndpointModelProperties

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

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

	// READ-ONLY; The name of the resource
	Name *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
}

ManagedPrivateEndpointModel - The managed private endpoint resource type.

func (ManagedPrivateEndpointModel) MarshalJSON added in v1.2.0

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

MarshalJSON implements the json.Marshaller interface for type ManagedPrivateEndpointModel.

func (*ManagedPrivateEndpointModel) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ManagedPrivateEndpointModel.

type ManagedPrivateEndpointModelListResponse added in v1.2.0

type ManagedPrivateEndpointModelListResponse struct {
	NextLink *string
	Value    []*ManagedPrivateEndpointModel
}

ManagedPrivateEndpointModelListResponse - The list of managed private endpoints of a grafana resource

func (ManagedPrivateEndpointModelListResponse) MarshalJSON added in v1.2.0

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

MarshalJSON implements the json.Marshaller interface for type ManagedPrivateEndpointModelListResponse.

func (*ManagedPrivateEndpointModelListResponse) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ManagedPrivateEndpointModelListResponse.

type ManagedPrivateEndpointModelProperties added in v1.2.0

type ManagedPrivateEndpointModelProperties struct {
	// The group Ids of the managed private endpoint.
	GroupIDs []*string

	// The ARM resource ID of the resource for which the managed private endpoint is pointing to.
	PrivateLinkResourceID *string

	// The region of the resource to which the managed private endpoint is pointing to.
	PrivateLinkResourceRegion *string

	// The URL of the data store behind the private link service. It would be the URL in the Grafana data source configuration
	// page without the protocol and port.
	PrivateLinkServiceURL *string

	// User input request message of the managed private endpoint.
	RequestMessage *string

	// READ-ONLY; The state of managed private endpoint connection.
	ConnectionState *ManagedPrivateEndpointConnectionState

	// READ-ONLY; The private IP of private endpoint after approval. This property is empty before connection is approved.
	PrivateLinkServicePrivateIP *string

	// READ-ONLY; Provisioning state of the resource.
	ProvisioningState *ProvisioningState
}

ManagedPrivateEndpointModelProperties - Properties specific to the managed private endpoint.

func (ManagedPrivateEndpointModelProperties) MarshalJSON added in v1.2.0

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

MarshalJSON implements the json.Marshaller interface for type ManagedPrivateEndpointModelProperties.

func (*ManagedPrivateEndpointModelProperties) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ManagedPrivateEndpointModelProperties.

type ManagedPrivateEndpointUpdateParameters added in v1.2.0

type ManagedPrivateEndpointUpdateParameters struct {
	// The new tags of the managed private endpoint.
	Tags map[string]*string
}

ManagedPrivateEndpointUpdateParameters - The parameters for a PATCH request to a managed private endpoint.

func (ManagedPrivateEndpointUpdateParameters) MarshalJSON added in v1.2.0

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

MarshalJSON implements the json.Marshaller interface for type ManagedPrivateEndpointUpdateParameters.

func (*ManagedPrivateEndpointUpdateParameters) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ManagedPrivateEndpointUpdateParameters.

type ManagedPrivateEndpointsClient added in v1.2.0

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

ManagedPrivateEndpointsClient contains the methods for the ManagedPrivateEndpoints group. Don't use this type directly, use NewManagedPrivateEndpointsClient() instead.

func NewManagedPrivateEndpointsClient added in v1.2.0

func NewManagedPrivateEndpointsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedPrivateEndpointsClient, error)

NewManagedPrivateEndpointsClient creates a new instance of ManagedPrivateEndpointsClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ManagedPrivateEndpointsClient) BeginCreate added in v1.2.0

func (client *ManagedPrivateEndpointsClient) BeginCreate(ctx context.Context, resourceGroupName string, workspaceName string, managedPrivateEndpointName string, requestBodyParameters ManagedPrivateEndpointModel, options *ManagedPrivateEndpointsClientBeginCreateOptions) (*runtime.Poller[ManagedPrivateEndpointsClientCreateResponse], error)

BeginCreate - Create or update a managed private endpoint for a grafana resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-09-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • workspaceName - The workspace name of Azure Managed Grafana.
  • managedPrivateEndpointName - The managed private endpoint name of Azure Managed Grafana.
  • requestBodyParameters - The managed private endpoint to be created or updated.
  • options - ManagedPrivateEndpointsClientBeginCreateOptions contains the optional parameters for the ManagedPrivateEndpointsClient.BeginCreate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/78eac0bd58633028293cb1ec1709baa200bed9e2/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2023-09-01/examples/ManagedPrivateEndpoints_Create.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/dashboard/armdashboard"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdashboard.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewManagedPrivateEndpointsClient().BeginCreate(ctx, "myResourceGroup", "myWorkspace", "myMPEName", armdashboard.ManagedPrivateEndpointModel{
		Location: to.Ptr("West US"),
		Properties: &armdashboard.ManagedPrivateEndpointModelProperties{
			GroupIDs: []*string{
				to.Ptr("grafana")},
			PrivateLinkResourceID:     to.Ptr("/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-000000000000/resourceGroups/xx-rg/providers/Microsoft.Kusto/Clusters/sampleKustoResource"),
			PrivateLinkResourceRegion: to.Ptr("West US"),
			PrivateLinkServiceURL:     to.Ptr("my-self-hosted-influxdb.westus.mydomain.com"),
			RequestMessage:            to.Ptr("Example Request Message"),
		},
	}, 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.ManagedPrivateEndpointModel = armdashboard.ManagedPrivateEndpointModel{
	// 	Name: to.Ptr("myMPEName"),
	// 	Type: to.Ptr("Microsoft.Dashboard/grafana/managedPrivateEndpoint"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/Microsoft.Dashboard/grafana/myWorkspace/managedPrivateEndpoints/myPrivateEndpointName"),
	// 	SystemData: &armdashboard.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-03T01:01:01.107Z"); return t}()),
	// 		CreatedBy: to.Ptr("string"),
	// 		CreatedByType: to.Ptr(armdashboard.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-04T02:03:01.197Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("string"),
	// 		LastModifiedByType: to.Ptr(armdashboard.CreatedByTypeUser),
	// 	},
	// 	Location: to.Ptr("West US"),
	// 	Properties: &armdashboard.ManagedPrivateEndpointModelProperties{
	// 		GroupIDs: []*string{
	// 			to.Ptr("grafana")},
	// 			PrivateLinkResourceID: to.Ptr("/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-000000000000/resourceGroups/xx-rg/providers/Microsoft.Kusto/Clusters/sampleKustoResource"),
	// 			PrivateLinkResourceRegion: to.Ptr("West US"),
	// 			PrivateLinkServiceURL: to.Ptr("my-self-hosted-influxdb.westus.mydomain.com"),
	// 			ProvisioningState: to.Ptr(armdashboard.ProvisioningStateSucceeded),
	// 			RequestMessage: to.Ptr("Example Request Message"),
	// 		},
	// 	}
}
Output:

func (*ManagedPrivateEndpointsClient) BeginDelete added in v1.2.0

func (client *ManagedPrivateEndpointsClient) BeginDelete(ctx context.Context, resourceGroupName string, workspaceName string, managedPrivateEndpointName string, options *ManagedPrivateEndpointsClientBeginDeleteOptions) (*runtime.Poller[ManagedPrivateEndpointsClientDeleteResponse], error)

BeginDelete - Delete a managed private endpoint for a grafana resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-09-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • workspaceName - The workspace name of Azure Managed Grafana.
  • managedPrivateEndpointName - The managed private endpoint name of Azure Managed Grafana.
  • options - ManagedPrivateEndpointsClientBeginDeleteOptions contains the optional parameters for the ManagedPrivateEndpointsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/78eac0bd58633028293cb1ec1709baa200bed9e2/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2023-09-01/examples/ManagedPrivateEndpoints_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dashboard/armdashboard"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdashboard.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewManagedPrivateEndpointsClient().BeginDelete(ctx, "myResourceGroup", "myWorkspace", "myMPEName", 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 (*ManagedPrivateEndpointsClient) BeginRefresh added in v1.2.0

BeginRefresh - Refresh and sync managed private endpoints of a grafana resource to latest state. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-09-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • workspaceName - The workspace name of Azure Managed Grafana.
  • options - ManagedPrivateEndpointsClientBeginRefreshOptions contains the optional parameters for the ManagedPrivateEndpointsClient.BeginRefresh method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/78eac0bd58633028293cb1ec1709baa200bed9e2/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2023-09-01/examples/ManagedPrivateEndpoints_Refresh.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dashboard/armdashboard"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdashboard.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewManagedPrivateEndpointsClient().BeginRefresh(ctx, "myResourceGroup", "myWorkspace", 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 (*ManagedPrivateEndpointsClient) BeginUpdate added in v1.2.0

func (client *ManagedPrivateEndpointsClient) BeginUpdate(ctx context.Context, resourceGroupName string, workspaceName string, managedPrivateEndpointName string, requestBodyParameters ManagedPrivateEndpointUpdateParameters, options *ManagedPrivateEndpointsClientBeginUpdateOptions) (*runtime.Poller[ManagedPrivateEndpointsClientUpdateResponse], error)

BeginUpdate - Update a managed private endpoint for an existing grafana resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-09-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • workspaceName - The workspace name of Azure Managed Grafana.
  • managedPrivateEndpointName - The managed private endpoint name of Azure Managed Grafana.
  • requestBodyParameters - Properties that can be updated to an existing managed private endpoint.
  • options - ManagedPrivateEndpointsClientBeginUpdateOptions contains the optional parameters for the ManagedPrivateEndpointsClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/78eac0bd58633028293cb1ec1709baa200bed9e2/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2023-09-01/examples/ManagedPrivateEndpoints_Patch.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/dashboard/armdashboard"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdashboard.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewManagedPrivateEndpointsClient().BeginUpdate(ctx, "myResourceGroup", "myWorkspace", "myMPEName", armdashboard.ManagedPrivateEndpointUpdateParameters{
		Tags: map[string]*string{
			"Environment": to.Ptr("Dev 2"),
		},
	}, 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.ManagedPrivateEndpointModel = armdashboard.ManagedPrivateEndpointModel{
	// 	Name: to.Ptr("myMPEName"),
	// 	Type: to.Ptr("Microsoft.Dashboard/grafana/managedPrivateEndpoint"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/Microsoft.Dashboard/grafana/myWorkspace/managedPrivateEndpoints/myPrivateEndpointName"),
	// 	SystemData: &armdashboard.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-03T01:01:01.107Z"); return t}()),
	// 		CreatedBy: to.Ptr("string"),
	// 		CreatedByType: to.Ptr(armdashboard.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-04T02:03:01.197Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("string"),
	// 		LastModifiedByType: to.Ptr(armdashboard.CreatedByTypeUser),
	// 	},
	// 	Location: to.Ptr("West US"),
	// 	Properties: &armdashboard.ManagedPrivateEndpointModelProperties{
	// 		GroupIDs: []*string{
	// 			to.Ptr("grafana")},
	// 			PrivateLinkResourceID: to.Ptr("/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-000000000000/resourceGroups/xx-rg/providers/Microsoft.Kusto/Clusters/sampleKustoResource"),
	// 			PrivateLinkResourceRegion: to.Ptr("West US"),
	// 			PrivateLinkServicePrivateIP: to.Ptr("10.0.0.5"),
	// 			PrivateLinkServiceURL: to.Ptr("my-self-hosted-influxdb.westus.mydomain.com"),
	// 			ProvisioningState: to.Ptr(armdashboard.ProvisioningStateSucceeded),
	// 			RequestMessage: to.Ptr("Example Request Message"),
	// 		},
	// 	}
}
Output:

func (*ManagedPrivateEndpointsClient) Get added in v1.2.0

func (client *ManagedPrivateEndpointsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, managedPrivateEndpointName string, options *ManagedPrivateEndpointsClientGetOptions) (ManagedPrivateEndpointsClientGetResponse, error)

Get - Get a specific managed private endpoint of a grafana resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-09-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • workspaceName - The workspace name of Azure Managed Grafana.
  • managedPrivateEndpointName - The managed private endpoint name of Azure Managed Grafana.
  • options - ManagedPrivateEndpointsClientGetOptions contains the optional parameters for the ManagedPrivateEndpointsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/78eac0bd58633028293cb1ec1709baa200bed9e2/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2023-09-01/examples/ManagedPrivateEndpoints_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dashboard/armdashboard"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdashboard.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewManagedPrivateEndpointsClient().Get(ctx, "myResourceGroup", "myWorkspace", "myMPEName", 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.ManagedPrivateEndpointModel = armdashboard.ManagedPrivateEndpointModel{
	// 	Name: to.Ptr("myMPEName"),
	// 	Type: to.Ptr("Microsoft.Dashboard/grafana/managedPrivateEndpoint"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/Microsoft.Dashboard/grafana/myWorkspace/managedPrivateEndpoints/myPrivateEndpointName"),
	// 	SystemData: &armdashboard.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-03T01:01:01.107Z"); return t}()),
	// 		CreatedBy: to.Ptr("string"),
	// 		CreatedByType: to.Ptr(armdashboard.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-04T02:03:01.197Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("string"),
	// 		LastModifiedByType: to.Ptr(armdashboard.CreatedByTypeUser),
	// 	},
	// 	Location: to.Ptr("West US"),
	// 	Properties: &armdashboard.ManagedPrivateEndpointModelProperties{
	// 		ConnectionState: &armdashboard.ManagedPrivateEndpointConnectionState{
	// 			Description: to.Ptr("Auto-Approved"),
	// 			Status: to.Ptr(armdashboard.ManagedPrivateEndpointConnectionStatusApproved),
	// 		},
	// 		GroupIDs: []*string{
	// 			to.Ptr("grafana")},
	// 			PrivateLinkResourceID: to.Ptr("/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-000000000000/resourceGroups/xx-rg/providers/Microsoft.Kusto/Clusters/sampleKustoResource"),
	// 			PrivateLinkResourceRegion: to.Ptr("West US"),
	// 			ProvisioningState: to.Ptr(armdashboard.ProvisioningStateSucceeded),
	// 			RequestMessage: to.Ptr("Example Request Message"),
	// 		},
	// 	}
}
Output:

func (*ManagedPrivateEndpointsClient) NewListPager added in v1.2.0

NewListPager - List all managed private endpoints of a grafana resource.

Generated from API version 2023-09-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • workspaceName - The workspace name of Azure Managed Grafana.
  • options - ManagedPrivateEndpointsClientListOptions contains the optional parameters for the ManagedPrivateEndpointsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/78eac0bd58633028293cb1ec1709baa200bed9e2/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2023-09-01/examples/ManagedPrivateEndpoints_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dashboard/armdashboard"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdashboard.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewManagedPrivateEndpointsClient().NewListPager("myResourceGroup", "myWorkspace", 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.ManagedPrivateEndpointModelListResponse = armdashboard.ManagedPrivateEndpointModelListResponse{
		// 	Value: []*armdashboard.ManagedPrivateEndpointModel{
		// 		{
		// 			Name: to.Ptr("myMPEName"),
		// 			Type: to.Ptr("Microsoft.Dashboard/grafana/managedPrivateEndpoint"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/Microsoft.Dashboard/grafana/myWorkspace/managedPrivateEndpoints/myPrivateEndpointName"),
		// 			Location: to.Ptr("West US"),
		// 			Properties: &armdashboard.ManagedPrivateEndpointModelProperties{
		// 				ConnectionState: &armdashboard.ManagedPrivateEndpointConnectionState{
		// 					Description: to.Ptr("Auto-Approved"),
		// 					Status: to.Ptr(armdashboard.ManagedPrivateEndpointConnectionStatusApproved),
		// 				},
		// 				GroupIDs: []*string{
		// 					to.Ptr("grafana")},
		// 					PrivateLinkResourceID: to.Ptr("/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-000000000000/resourceGroups/xx-rg/providers/Microsoft.Kusto/Clusters/sampleKustoResource1"),
		// 					PrivateLinkResourceRegion: to.Ptr("West US"),
		// 					PrivateLinkServicePrivateIP: to.Ptr("10.0.0.5"),
		// 					PrivateLinkServiceURL: to.Ptr("my-self-hosted-influxdb.westus.mydomain.com"),
		// 					ProvisioningState: to.Ptr(armdashboard.ProvisioningStateSucceeded),
		// 					RequestMessage: to.Ptr("Example Request Message"),
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("myMPEName2"),
		// 				Type: to.Ptr("Microsoft.Dashboard/grafana/managedPrivateEndpoint"),
		// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/Microsoft.Dashboard/grafana/myWorkspace/managedPrivateEndpoints/myPrivateEndpointName2"),
		// 				Location: to.Ptr("West US"),
		// 				Properties: &armdashboard.ManagedPrivateEndpointModelProperties{
		// 					ConnectionState: &armdashboard.ManagedPrivateEndpointConnectionState{
		// 						Description: to.Ptr("Example Reject Reason"),
		// 						Status: to.Ptr(armdashboard.ManagedPrivateEndpointConnectionStatusRejected),
		// 					},
		// 					GroupIDs: []*string{
		// 						to.Ptr("grafana")},
		// 						PrivateLinkResourceID: to.Ptr("/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-000000000000/resourceGroups/xx-rg/providers/Microsoft.Kusto/Clusters/sampleKustoResource2"),
		// 						PrivateLinkResourceRegion: to.Ptr("West US"),
		// 						ProvisioningState: to.Ptr(armdashboard.ProvisioningStateSucceeded),
		// 						RequestMessage: to.Ptr("Example Request Message 2"),
		// 					},
		// 			}},
		// 		}
	}
}
Output:

type ManagedPrivateEndpointsClientBeginCreateOptions added in v1.2.0

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

ManagedPrivateEndpointsClientBeginCreateOptions contains the optional parameters for the ManagedPrivateEndpointsClient.BeginCreate method.

type ManagedPrivateEndpointsClientBeginDeleteOptions added in v1.2.0

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

ManagedPrivateEndpointsClientBeginDeleteOptions contains the optional parameters for the ManagedPrivateEndpointsClient.BeginDelete method.

type ManagedPrivateEndpointsClientBeginRefreshOptions added in v1.2.0

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

ManagedPrivateEndpointsClientBeginRefreshOptions contains the optional parameters for the ManagedPrivateEndpointsClient.BeginRefresh method.

type ManagedPrivateEndpointsClientBeginUpdateOptions added in v1.2.0

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

ManagedPrivateEndpointsClientBeginUpdateOptions contains the optional parameters for the ManagedPrivateEndpointsClient.BeginUpdate method.

type ManagedPrivateEndpointsClientCreateResponse added in v1.2.0

type ManagedPrivateEndpointsClientCreateResponse struct {
	// The managed private endpoint resource type.
	ManagedPrivateEndpointModel
}

ManagedPrivateEndpointsClientCreateResponse contains the response from method ManagedPrivateEndpointsClient.BeginCreate.

type ManagedPrivateEndpointsClientDeleteResponse added in v1.2.0

type ManagedPrivateEndpointsClientDeleteResponse struct {
}

ManagedPrivateEndpointsClientDeleteResponse contains the response from method ManagedPrivateEndpointsClient.BeginDelete.

type ManagedPrivateEndpointsClientGetOptions added in v1.2.0

type ManagedPrivateEndpointsClientGetOptions struct {
}

ManagedPrivateEndpointsClientGetOptions contains the optional parameters for the ManagedPrivateEndpointsClient.Get method.

type ManagedPrivateEndpointsClientGetResponse added in v1.2.0

type ManagedPrivateEndpointsClientGetResponse struct {
	// The managed private endpoint resource type.
	ManagedPrivateEndpointModel
}

ManagedPrivateEndpointsClientGetResponse contains the response from method ManagedPrivateEndpointsClient.Get.

type ManagedPrivateEndpointsClientListOptions added in v1.2.0

type ManagedPrivateEndpointsClientListOptions struct {
}

ManagedPrivateEndpointsClientListOptions contains the optional parameters for the ManagedPrivateEndpointsClient.NewListPager method.

type ManagedPrivateEndpointsClientListResponse added in v1.2.0

type ManagedPrivateEndpointsClientListResponse struct {
	// The list of managed private endpoints of a grafana resource
	ManagedPrivateEndpointModelListResponse
}

ManagedPrivateEndpointsClientListResponse contains the response from method ManagedPrivateEndpointsClient.NewListPager.

type ManagedPrivateEndpointsClientRefreshResponse added in v1.2.0

type ManagedPrivateEndpointsClientRefreshResponse struct {
}

ManagedPrivateEndpointsClientRefreshResponse contains the response from method ManagedPrivateEndpointsClient.BeginRefresh.

type ManagedPrivateEndpointsClientUpdateResponse added in v1.2.0

type ManagedPrivateEndpointsClientUpdateResponse struct {
	// The managed private endpoint resource type.
	ManagedPrivateEndpointModel
}

ManagedPrivateEndpointsClientUpdateResponse contains the response from method ManagedPrivateEndpointsClient.BeginUpdate.

type ManagedServiceIdentity added in v1.0.0

type ManagedServiceIdentity struct {
	// REQUIRED; Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).
	Type *ManagedServiceIdentityType

	// The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM
	// resource ids in the form:
	// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.
	// The dictionary values can be empty objects ({}) in
	// requests.
	UserAssignedIdentities map[string]*UserAssignedIdentity

	// READ-ONLY; The service principal ID of the system assigned identity. This property will only be provided for a system assigned
	// identity.
	PrincipalID *string

	// READ-ONLY; The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity.
	TenantID *string
}

ManagedServiceIdentity - Managed service identity (system assigned and/or user assigned identities)

func (ManagedServiceIdentity) MarshalJSON added in v1.0.0

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

MarshalJSON implements the json.Marshaller interface for type ManagedServiceIdentity.

func (*ManagedServiceIdentity) UnmarshalJSON added in v1.0.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ManagedServiceIdentity.

type ManagedServiceIdentityType added in v1.0.0

type ManagedServiceIdentityType string

ManagedServiceIdentityType - Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).

const (
	ManagedServiceIdentityTypeNone                       ManagedServiceIdentityType = "None"
	ManagedServiceIdentityTypeSystemAssigned             ManagedServiceIdentityType = "SystemAssigned"
	ManagedServiceIdentityTypeSystemAssignedUserAssigned ManagedServiceIdentityType = "SystemAssigned,UserAssigned"
	ManagedServiceIdentityTypeUserAssigned               ManagedServiceIdentityType = "UserAssigned"
)

func PossibleManagedServiceIdentityTypeValues added in v1.0.0

func PossibleManagedServiceIdentityTypeValues() []ManagedServiceIdentityType

PossibleManagedServiceIdentityTypeValues returns the possible values for the ManagedServiceIdentityType const type.

type MarketplaceAutoRenew added in v1.2.0

type MarketplaceAutoRenew string

MarketplaceAutoRenew - The AutoRenew setting of the Enterprise subscription

const (
	MarketplaceAutoRenewDisabled MarketplaceAutoRenew = "Disabled"
	MarketplaceAutoRenewEnabled  MarketplaceAutoRenew = "Enabled"
)

func PossibleMarketplaceAutoRenewValues added in v1.2.0

func PossibleMarketplaceAutoRenewValues() []MarketplaceAutoRenew

PossibleMarketplaceAutoRenewValues returns the possible values for the MarketplaceAutoRenew const type.

type MarketplaceTrialQuota added in v1.2.0

type MarketplaceTrialQuota struct {
	// Available enterprise promotion for the subscription
	AvailablePromotion *AvailablePromotion

	// Resource Id of the Grafana resource which is doing the trial.
	GrafanaResourceID *string

	// The date and time in UTC of when the trial ends.
	TrialEndAt *time.Time

	// The date and time in UTC of when the trial starts.
	TrialStartAt *time.Time
}

MarketplaceTrialQuota - The allocation details of the per subscription free trial slot of the subscription.

func (MarketplaceTrialQuota) MarshalJSON added in v1.2.0

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

MarshalJSON implements the json.Marshaller interface for type MarketplaceTrialQuota.

func (*MarketplaceTrialQuota) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type MarketplaceTrialQuota.

type Operation added in v1.0.0

type Operation struct {
	// Localized display information for this particular operation.
	Display *OperationDisplay

	// READ-ONLY; Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
	ActionType *ActionType

	// READ-ONLY; Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/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 added in v1.0.0

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

MarshalJSON implements the json.Marshaller interface for type Operation.

func (*Operation) UnmarshalJSON added in v1.0.0

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 this particular operation.

func (OperationDisplay) MarshalJSON added in v1.0.0

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

MarshalJSON implements the json.Marshaller interface for type OperationDisplay.

func (*OperationDisplay) UnmarshalJSON added in v1.0.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 operations supported by the resource provider
	Value []*Operation
}

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 added in v1.0.0

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 added in v0.2.0

NewListPager - List all available API operations provided by Microsoft.Dashboard.

Generated from API version 2023-09-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/78eac0bd58633028293cb1ec1709baa200bed9e2/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2023-09-01/examples/Operations_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dashboard/armdashboard"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdashboard.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 = armdashboard.OperationListResult{
		// 	Value: []*armdashboard.Operation{
		// 		{
		// 			Name: to.Ptr("Microsoft.Dashboard/grafana/write"),
		// 			ActionType: to.Ptr(armdashboard.ActionTypeInternal),
		// 			Display: &armdashboard.OperationDisplay{
		// 				Description: to.Ptr("Write grafana workspace resource"),
		// 				Operation: to.Ptr("write"),
		// 				Provider: to.Ptr("Microsoft.Dashboard"),
		// 				Resource: to.Ptr("grafana"),
		// 			},
		// 			Origin: to.Ptr(armdashboard.OriginUser),
		// 	}},
		// }
	}
}
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     Origin = "system"
	OriginUser       Origin = "user"
	OriginUserSystem Origin = "user,system"
)

func PossibleOriginValues

func PossibleOriginValues() []Origin

PossibleOriginValues returns the possible values for the Origin const type.

type PrivateEndpoint added in v1.0.0

type PrivateEndpoint struct {
	// READ-ONLY; The ARM identifier for Private Endpoint
	ID *string
}

PrivateEndpoint - The Private Endpoint resource.

func (PrivateEndpoint) MarshalJSON added in v1.0.0

func (p PrivateEndpoint) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateEndpoint.

func (*PrivateEndpoint) UnmarshalJSON added in v1.0.0

func (p *PrivateEndpoint) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpoint.

type PrivateEndpointConnection added in v1.0.0

type PrivateEndpointConnection struct {
	// Resource properties.
	Properties *PrivateEndpointConnectionProperties

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

	// READ-ONLY; The name of the resource
	Name *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
}

PrivateEndpointConnection - The Private Endpoint Connection resource.

func (PrivateEndpointConnection) MarshalJSON added in v1.0.0

func (p PrivateEndpointConnection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnection.

func (*PrivateEndpointConnection) UnmarshalJSON added in v1.0.0

func (p *PrivateEndpointConnection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnection.

type PrivateEndpointConnectionListResult added in v1.0.0

type PrivateEndpointConnectionListResult struct {
	// Array of private endpoint connections
	Value []*PrivateEndpointConnection

	// READ-ONLY; URL to get the next set of operation list results (if there are any).
	NextLink *string
}

PrivateEndpointConnectionListResult - List of private endpoint connection associated with the specified storage account

func (PrivateEndpointConnectionListResult) MarshalJSON added in v1.0.0

func (p PrivateEndpointConnectionListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionListResult.

func (*PrivateEndpointConnectionListResult) UnmarshalJSON added in v1.0.0

func (p *PrivateEndpointConnectionListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionListResult.

type PrivateEndpointConnectionProperties added in v1.0.0

type PrivateEndpointConnectionProperties struct {
	// REQUIRED; A collection of information about the state of the connection between service consumer and provider.
	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState

	// The private endpoint connection group ids.
	GroupIDs []*string

	// The resource of private end point.
	PrivateEndpoint *PrivateEndpoint

	// READ-ONLY; The provisioning state of the private endpoint connection resource.
	ProvisioningState *PrivateEndpointConnectionProvisioningState
}

PrivateEndpointConnectionProperties - Properties of the PrivateEndpointConnectProperties.

func (PrivateEndpointConnectionProperties) MarshalJSON added in v1.0.0

func (p PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionProperties.

func (*PrivateEndpointConnectionProperties) UnmarshalJSON added in v1.0.0

func (p *PrivateEndpointConnectionProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionProperties.

type PrivateEndpointConnectionProvisioningState added in v1.0.0

type PrivateEndpointConnectionProvisioningState string

PrivateEndpointConnectionProvisioningState - The current provisioning state.

const (
	PrivateEndpointConnectionProvisioningStateCreating  PrivateEndpointConnectionProvisioningState = "Creating"
	PrivateEndpointConnectionProvisioningStateDeleting  PrivateEndpointConnectionProvisioningState = "Deleting"
	PrivateEndpointConnectionProvisioningStateFailed    PrivateEndpointConnectionProvisioningState = "Failed"
	PrivateEndpointConnectionProvisioningStateSucceeded PrivateEndpointConnectionProvisioningState = "Succeeded"
)

func PossiblePrivateEndpointConnectionProvisioningStateValues added in v1.0.0

func PossiblePrivateEndpointConnectionProvisioningStateValues() []PrivateEndpointConnectionProvisioningState

PossiblePrivateEndpointConnectionProvisioningStateValues returns the possible values for the PrivateEndpointConnectionProvisioningState const type.

type PrivateEndpointConnectionsClient added in v1.0.0

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

PrivateEndpointConnectionsClient contains the methods for the PrivateEndpointConnections group. Don't use this type directly, use NewPrivateEndpointConnectionsClient() instead.

func NewPrivateEndpointConnectionsClient added in v1.0.0

func NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateEndpointConnectionsClient, error)

NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*PrivateEndpointConnectionsClient) BeginApprove added in v1.0.0

BeginApprove - Manual approve private endpoint connection If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-09-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • workspaceName - The workspace name of Azure Managed Grafana.
  • privateEndpointConnectionName - The private endpoint connection name of Azure Managed Grafana.
  • options - PrivateEndpointConnectionsClientBeginApproveOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginApprove method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/78eac0bd58633028293cb1ec1709baa200bed9e2/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2023-09-01/examples/PrivateEndpointConnections_Approve.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dashboard/armdashboard"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdashboard.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewPrivateEndpointConnectionsClient().BeginApprove(ctx, "myResourceGroup", "myWorkspace", "myConnection", armdashboard.PrivateEndpointConnection{}, 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 (*PrivateEndpointConnectionsClient) BeginDelete added in v1.0.0

func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, workspaceName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientBeginDeleteOptions) (*runtime.Poller[PrivateEndpointConnectionsClientDeleteResponse], error)

BeginDelete - Delete private endpoint connection If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-09-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • workspaceName - The workspace name of Azure Managed Grafana.
  • privateEndpointConnectionName - The private endpoint connection name of Azure Managed Grafana.
  • options - PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/78eac0bd58633028293cb1ec1709baa200bed9e2/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2023-09-01/examples/PrivateEndpointConnections_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dashboard/armdashboard"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdashboard.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewPrivateEndpointConnectionsClient().BeginDelete(ctx, "myResourceGroup", "myWorkspace", "myConnection", 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 (*PrivateEndpointConnectionsClient) Get added in v1.0.0

func (client *PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientGetOptions) (PrivateEndpointConnectionsClientGetResponse, error)

Get - Get private endpoint connections. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-09-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • workspaceName - The workspace name of Azure Managed Grafana.
  • privateEndpointConnectionName - The private endpoint connection name of Azure Managed Grafana.
  • options - PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/78eac0bd58633028293cb1ec1709baa200bed9e2/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2023-09-01/examples/PrivateEndpointConnections_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dashboard/armdashboard"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdashboard.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPrivateEndpointConnectionsClient().Get(ctx, "myResourceGroup", "myWorkspace", "myConnection", 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.PrivateEndpointConnection = armdashboard.PrivateEndpointConnection{
	// 	Name: to.Ptr("myConnection"),
	// 	Type: to.Ptr("Microsoft.Dashboard/grafana/privateEndpointConnections"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/Microsoft.Dashboard/grafana/myWorkspace/privateEndpointConnections/myConnection"),
	// 	Properties: &armdashboard.PrivateEndpointConnectionProperties{
	// 		GroupIDs: []*string{
	// 			to.Ptr("grafana")},
	// 			PrivateEndpoint: &armdashboard.PrivateEndpoint{
	// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/Microsoft.Network/privateEndpoint/myEndpoint"),
	// 			},
	// 			PrivateLinkServiceConnectionState: &armdashboard.PrivateLinkServiceConnectionState{
	// 				Description: to.Ptr("string"),
	// 				ActionsRequired: to.Ptr("None"),
	// 				Status: to.Ptr(armdashboard.PrivateEndpointServiceConnectionStatusPending),
	// 			},
	// 			ProvisioningState: to.Ptr(armdashboard.PrivateEndpointConnectionProvisioningStateSucceeded),
	// 		},
	// 	}
}
Output:

func (*PrivateEndpointConnectionsClient) NewListPager added in v1.0.0

NewListPager - Get private endpoint connection

Generated from API version 2023-09-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • workspaceName - The workspace name of Azure Managed Grafana.
  • options - PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/78eac0bd58633028293cb1ec1709baa200bed9e2/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2023-09-01/examples/PrivateEndpointConnections_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dashboard/armdashboard"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdashboard.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewPrivateEndpointConnectionsClient().NewListPager("myResourceGroup", "myWorkspace", 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.PrivateEndpointConnectionListResult = armdashboard.PrivateEndpointConnectionListResult{
		// 	Value: []*armdashboard.PrivateEndpointConnection{
		// 		{
		// 			Name: to.Ptr("myConnection"),
		// 			Type: to.Ptr("Microsoft.Dashboard/grafana/privateEndpointConnections"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/Microsoft.Dashboard/grafana/myWorkspace/privateEndpointConnections/myConnection"),
		// 			Properties: &armdashboard.PrivateEndpointConnectionProperties{
		// 				GroupIDs: []*string{
		// 					to.Ptr("grafana")},
		// 					PrivateEndpoint: &armdashboard.PrivateEndpoint{
		// 						ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/Microsoft.Network/privateEndpoint/myEndpoint"),
		// 					},
		// 					PrivateLinkServiceConnectionState: &armdashboard.PrivateLinkServiceConnectionState{
		// 						Description: to.Ptr("string"),
		// 						ActionsRequired: to.Ptr("None"),
		// 						Status: to.Ptr(armdashboard.PrivateEndpointServiceConnectionStatusPending),
		// 					},
		// 					ProvisioningState: to.Ptr(armdashboard.PrivateEndpointConnectionProvisioningStateSucceeded),
		// 				},
		// 		}},
		// 	}
	}
}
Output:

type PrivateEndpointConnectionsClientApproveResponse added in v1.0.0

type PrivateEndpointConnectionsClientApproveResponse struct {
	// The Private Endpoint Connection resource.
	PrivateEndpointConnection
}

PrivateEndpointConnectionsClientApproveResponse contains the response from method PrivateEndpointConnectionsClient.BeginApprove.

type PrivateEndpointConnectionsClientBeginApproveOptions added in v1.0.0

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

PrivateEndpointConnectionsClientBeginApproveOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginApprove method.

type PrivateEndpointConnectionsClientBeginDeleteOptions added in v1.0.0

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

PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete method.

type PrivateEndpointConnectionsClientDeleteResponse added in v1.0.0

type PrivateEndpointConnectionsClientDeleteResponse struct {
}

PrivateEndpointConnectionsClientDeleteResponse contains the response from method PrivateEndpointConnectionsClient.BeginDelete.

type PrivateEndpointConnectionsClientGetOptions added in v1.0.0

type PrivateEndpointConnectionsClientGetOptions struct {
}

PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get method.

type PrivateEndpointConnectionsClientGetResponse added in v1.0.0

type PrivateEndpointConnectionsClientGetResponse struct {
	// The Private Endpoint Connection resource.
	PrivateEndpointConnection
}

PrivateEndpointConnectionsClientGetResponse contains the response from method PrivateEndpointConnectionsClient.Get.

type PrivateEndpointConnectionsClientListOptions added in v1.0.0

type PrivateEndpointConnectionsClientListOptions struct {
}

PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListPager method.

type PrivateEndpointConnectionsClientListResponse added in v1.0.0

type PrivateEndpointConnectionsClientListResponse struct {
	// List of private endpoint connection associated with the specified storage account
	PrivateEndpointConnectionListResult
}

PrivateEndpointConnectionsClientListResponse contains the response from method PrivateEndpointConnectionsClient.NewListPager.

type PrivateEndpointServiceConnectionStatus added in v1.0.0

type PrivateEndpointServiceConnectionStatus string

PrivateEndpointServiceConnectionStatus - The private endpoint connection status.

const (
	PrivateEndpointServiceConnectionStatusApproved PrivateEndpointServiceConnectionStatus = "Approved"
	PrivateEndpointServiceConnectionStatusPending  PrivateEndpointServiceConnectionStatus = "Pending"
	PrivateEndpointServiceConnectionStatusRejected PrivateEndpointServiceConnectionStatus = "Rejected"
)

func PossiblePrivateEndpointServiceConnectionStatusValues added in v1.0.0

func PossiblePrivateEndpointServiceConnectionStatusValues() []PrivateEndpointServiceConnectionStatus

PossiblePrivateEndpointServiceConnectionStatusValues returns the possible values for the PrivateEndpointServiceConnectionStatus const type.

type PrivateLinkResource added in v1.0.0

type PrivateLinkResource struct {
	// Resource properties.
	Properties *PrivateLinkResourceProperties

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

	// READ-ONLY; The name of the resource
	Name *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
}

PrivateLinkResource - A private link resource

func (PrivateLinkResource) MarshalJSON added in v1.0.0

func (p PrivateLinkResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateLinkResource.

func (*PrivateLinkResource) UnmarshalJSON added in v1.0.0

func (p *PrivateLinkResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResource.

type PrivateLinkResourceListResult added in v1.0.0

type PrivateLinkResourceListResult struct {
	// Array of private link resources
	Value []*PrivateLinkResource

	// READ-ONLY; URL to get the next set of operation list results (if there are any).
	NextLink *string
}

PrivateLinkResourceListResult - A list of private link resources

func (PrivateLinkResourceListResult) MarshalJSON added in v1.0.0

func (p PrivateLinkResourceListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceListResult.

func (*PrivateLinkResourceListResult) UnmarshalJSON added in v1.0.0

func (p *PrivateLinkResourceListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceListResult.

type PrivateLinkResourceProperties added in v1.0.0

type PrivateLinkResourceProperties struct {
	// The private link resource Private link DNS zone name.
	RequiredZoneNames []*string

	// READ-ONLY; The private link resource group id.
	GroupID *string

	// READ-ONLY; Provisioning state of the resource.
	ProvisioningState *ProvisioningState

	// READ-ONLY; The private link resource required member names.
	RequiredMembers []*string
}

PrivateLinkResourceProperties - Properties of a private link resource.

func (PrivateLinkResourceProperties) MarshalJSON added in v1.0.0

func (p PrivateLinkResourceProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceProperties.

func (*PrivateLinkResourceProperties) UnmarshalJSON added in v1.0.0

func (p *PrivateLinkResourceProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceProperties.

type PrivateLinkResourcesClient added in v1.0.0

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

PrivateLinkResourcesClient contains the methods for the PrivateLinkResources group. Don't use this type directly, use NewPrivateLinkResourcesClient() instead.

func NewPrivateLinkResourcesClient added in v1.0.0

func NewPrivateLinkResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateLinkResourcesClient, error)

NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*PrivateLinkResourcesClient) Get added in v1.0.0

func (client *PrivateLinkResourcesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, privateLinkResourceName string, options *PrivateLinkResourcesClientGetOptions) (PrivateLinkResourcesClientGetResponse, error)

Get - Get specific private link resource information for this grafana resource If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-09-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • workspaceName - The workspace name of Azure Managed Grafana.
  • options - PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/78eac0bd58633028293cb1ec1709baa200bed9e2/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2023-09-01/examples/PrivateLinkResources_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dashboard/armdashboard"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdashboard.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPrivateLinkResourcesClient().Get(ctx, "myResourceGroup", "myWorkspace", "grafana", 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.PrivateLinkResource = armdashboard.PrivateLinkResource{
	// 	Name: to.Ptr("grafana"),
	// 	Type: to.Ptr("Microsoft.Dashboard/grafana/PrivateLinkResources"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/Microsoft.Dashboard/grafana/myWorkspace/privateLinkResources/grafana"),
	// 	Properties: &armdashboard.PrivateLinkResourceProperties{
	// 		GroupID: to.Ptr("grafana"),
	// 		RequiredMembers: []*string{
	// 			to.Ptr("grafana")},
	// 			RequiredZoneNames: []*string{
	// 				to.Ptr("grafana-test.azure.com")},
	// 			},
	// 		}
}
Output:

func (*PrivateLinkResourcesClient) NewListPager added in v1.0.0

NewListPager - List all private link resources information for this grafana resource

Generated from API version 2023-09-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • workspaceName - The workspace name of Azure Managed Grafana.
  • options - PrivateLinkResourcesClientListOptions contains the optional parameters for the PrivateLinkResourcesClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/78eac0bd58633028293cb1ec1709baa200bed9e2/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2023-09-01/examples/PrivateLinkResources_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dashboard/armdashboard"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdashboard.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewPrivateLinkResourcesClient().NewListPager("myResourceGroup", "myWorkspace", 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.PrivateLinkResourceListResult = armdashboard.PrivateLinkResourceListResult{
		// 	Value: []*armdashboard.PrivateLinkResource{
		// 		{
		// 			Name: to.Ptr("grafana"),
		// 			Type: to.Ptr("Microsoft.Dashboard/grafana/PrivateLinkResources"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/Microsoft.Dashboard/grafana/myWorkspace/privateLinkResources/grafana"),
		// 			Properties: &armdashboard.PrivateLinkResourceProperties{
		// 				GroupID: to.Ptr("grafana"),
		// 				RequiredMembers: []*string{
		// 					to.Ptr("grafana")},
		// 					RequiredZoneNames: []*string{
		// 						to.Ptr("grafana-test.azure.com")},
		// 					},
		// 			}},
		// 		}
	}
}
Output:

type PrivateLinkResourcesClientGetOptions added in v1.0.0

type PrivateLinkResourcesClientGetOptions struct {
}

PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get method.

type PrivateLinkResourcesClientGetResponse added in v1.0.0

type PrivateLinkResourcesClientGetResponse struct {
	// A private link resource
	PrivateLinkResource
}

PrivateLinkResourcesClientGetResponse contains the response from method PrivateLinkResourcesClient.Get.

type PrivateLinkResourcesClientListOptions added in v1.0.0

type PrivateLinkResourcesClientListOptions struct {
}

PrivateLinkResourcesClientListOptions contains the optional parameters for the PrivateLinkResourcesClient.NewListPager method.

type PrivateLinkResourcesClientListResponse added in v1.0.0

type PrivateLinkResourcesClientListResponse struct {
	// A list of private link resources
	PrivateLinkResourceListResult
}

PrivateLinkResourcesClientListResponse contains the response from method PrivateLinkResourcesClient.NewListPager.

type PrivateLinkServiceConnectionState added in v1.0.0

type PrivateLinkServiceConnectionState struct {
	// A message indicating if changes on the service provider require any updates on the consumer.
	ActionsRequired *string

	// The reason for approval/rejection of the connection.
	Description *string

	// Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service.
	Status *PrivateEndpointServiceConnectionStatus
}

PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer and provider.

func (PrivateLinkServiceConnectionState) MarshalJSON added in v1.0.0

func (p PrivateLinkServiceConnectionState) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceConnectionState.

func (*PrivateLinkServiceConnectionState) UnmarshalJSON added in v1.0.0

func (p *PrivateLinkServiceConnectionState) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServiceConnectionState.

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateAccepted     ProvisioningState = "Accepted"
	ProvisioningStateCanceled     ProvisioningState = "Canceled"
	ProvisioningStateCreating     ProvisioningState = "Creating"
	ProvisioningStateDeleted      ProvisioningState = "Deleted"
	ProvisioningStateDeleting     ProvisioningState = "Deleting"
	ProvisioningStateFailed       ProvisioningState = "Failed"
	ProvisioningStateNotSpecified ProvisioningState = "NotSpecified"
	ProvisioningStateSucceeded    ProvisioningState = "Succeeded"
	ProvisioningStateUpdating     ProvisioningState = "Updating"
)

func PossibleProvisioningStateValues

func PossibleProvisioningStateValues() []ProvisioningState

PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.

type PublicNetworkAccess added in v1.0.0

type PublicNetworkAccess string

PublicNetworkAccess - Indicate the state for enable or disable traffic over the public interface.

const (
	PublicNetworkAccessDisabled PublicNetworkAccess = "Disabled"
	PublicNetworkAccessEnabled  PublicNetworkAccess = "Enabled"
)

func PossiblePublicNetworkAccessValues added in v1.0.0

func PossiblePublicNetworkAccessValues() []PublicNetworkAccess

PossiblePublicNetworkAccessValues returns the possible values for the PublicNetworkAccess const type.

type ResourceSKU

type ResourceSKU struct {
	// REQUIRED
	Name *string
}

func (ResourceSKU) MarshalJSON added in v1.0.0

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

MarshalJSON implements the json.Marshaller interface for type ResourceSKU.

func (*ResourceSKU) UnmarshalJSON added in v1.0.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKU.

type SMTP added in v1.2.0

type SMTP struct {
	// Enable this to allow Grafana to send email. Default is false
	Enabled *bool

	// Address used when sending out emails https://pkg.go.dev/net/mail#Address
	FromAddress *string

	// Name to be used when sending out emails. Default is "Azure Managed Grafana Notification" https://pkg.go.dev/net/mail#Address
	FromName *string

	// SMTP server hostname with port, e.g. test.email.net:587
	Host *string

	// Password of SMTP auth. If the password contains # or ;, then you have to wrap it with triple quotes
	Password *string

	// Verify SSL for SMTP server. Default is false https://pkg.go.dev/crypto/tls#Config
	SkipVerify *bool

	// The StartTLSPolicy setting of the SMTP configuration https://pkg.go.dev/github.com/go-mail/mail#StartTLSPolicy
	StartTLSPolicy *StartTLSPolicy

	// User of SMTP auth
	User *string
}

SMTP - Email server settings. https://grafana.com/docs/grafana/v9.0/setup-grafana/configure-grafana/#smtp

func (SMTP) MarshalJSON added in v1.2.0

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

MarshalJSON implements the json.Marshaller interface for type SMTP.

func (*SMTP) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type SMTP.

type SaasSubscriptionDetails added in v1.2.0

type SaasSubscriptionDetails struct {
	// The offer Id of the SaaS subscription.
	OfferID *string

	// The plan Id of the SaaS subscription.
	PlanID *string

	// The publisher Id of the SaaS subscription.
	PublisherID *string

	// The billing term of the SaaS Subscription.
	Term *SubscriptionTerm
}

SaasSubscriptionDetails - SaaS subscription details of a Grafana instance

func (SaasSubscriptionDetails) MarshalJSON added in v1.2.0

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

MarshalJSON implements the json.Marshaller interface for type SaasSubscriptionDetails.

func (*SaasSubscriptionDetails) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type SaasSubscriptionDetails.

type StartTLSPolicy added in v1.2.0

type StartTLSPolicy string

StartTLSPolicy - The StartTLSPolicy setting of the SMTP configuration https://pkg.go.dev/github.com/go-mail/mail#StartTLSPolicy

const (
	StartTLSPolicyMandatoryStartTLS     StartTLSPolicy = "MandatoryStartTLS"
	StartTLSPolicyNoStartTLS            StartTLSPolicy = "NoStartTLS"
	StartTLSPolicyOpportunisticStartTLS StartTLSPolicy = "OpportunisticStartTLS"
)

func PossibleStartTLSPolicyValues added in v1.2.0

func PossibleStartTLSPolicyValues() []StartTLSPolicy

PossibleStartTLSPolicyValues returns the possible values for the StartTLSPolicy const type.

type SubscriptionTerm added in v1.2.0

type SubscriptionTerm struct {
	// The date and time in UTC of when the billing term ends.
	EndDate *time.Time

	// The date and time in UTC of when the billing term starts.
	StartDate *time.Time

	// The unit of the billing term.
	TermUnit *string
}

SubscriptionTerm - The current billing term of the SaaS Subscription.

func (SubscriptionTerm) MarshalJSON added in v1.2.0

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

MarshalJSON implements the json.Marshaller interface for type SubscriptionTerm.

func (*SubscriptionTerm) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionTerm.

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.

type UserAssignedIdentity

type UserAssignedIdentity struct {
	// READ-ONLY; The client ID of the assigned identity.
	ClientID *string

	// READ-ONLY; The principal ID of the assigned identity.
	PrincipalID *string
}

UserAssignedIdentity - User assigned identity properties

func (UserAssignedIdentity) MarshalJSON added in v1.0.0

func (u UserAssignedIdentity) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentity.

func (*UserAssignedIdentity) UnmarshalJSON added in v1.0.0

func (u *UserAssignedIdentity) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedIdentity.

type ZoneRedundancy

type ZoneRedundancy string
const (
	ZoneRedundancyDisabled ZoneRedundancy = "Disabled"
	ZoneRedundancyEnabled  ZoneRedundancy = "Enabled"
)

func PossibleZoneRedundancyValues

func PossibleZoneRedundancyValues() []ZoneRedundancy

PossibleZoneRedundancyValues returns the possible values for the ZoneRedundancy const type.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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