armdatabasewatcher

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2025 License: MIT Imports: 14 Imported by: 0

README

Azure Databasewatcher Module for Go

The armdatabasewatcher module provides operations for working with Azure Databasewatcher.

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

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/databasewatcher/armdatabasewatcher

Authorization

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

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 Databasewatcher label.

Contributing

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

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

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

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionType

type ActionType string

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

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

func PossibleActionTypeValues

func PossibleActionTypeValues() []ActionType

PossibleActionTypeValues returns the possible values for the ActionType const type.

type AlertRuleCreationProperties

type AlertRuleCreationProperties string

AlertRuleCreationProperties - The properties with which the alert rule resource was created.

const (
	// AlertRuleCreationPropertiesCreatedWithActionGroup - The alert rule was created with an action group.
	AlertRuleCreationPropertiesCreatedWithActionGroup AlertRuleCreationProperties = "CreatedWithActionGroup"
	// AlertRuleCreationPropertiesNone - The alert rule was created with no properties.
	AlertRuleCreationPropertiesNone AlertRuleCreationProperties = "None"
)

func PossibleAlertRuleCreationPropertiesValues

func PossibleAlertRuleCreationPropertiesValues() []AlertRuleCreationProperties

PossibleAlertRuleCreationPropertiesValues returns the possible values for the AlertRuleCreationProperties const type.

type AlertRuleResource

type AlertRuleResource struct {
	// The resource-specific properties for this resource.
	Properties *AlertRuleResourceProperties

	// READ-ONLY; The alert rule proxy resource name.
	Name *string

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

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

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

AlertRuleResource - Concrete proxy resource types can be created by aliasing this type using a specific property type.

func (AlertRuleResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AlertRuleResource.

func (*AlertRuleResource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AlertRuleResource.

type AlertRuleResourceListResult

type AlertRuleResourceListResult struct {
	// REQUIRED; The AlertRuleResource items on this page
	Value []*AlertRuleResource

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

AlertRuleResourceListResult - The response of a AlertRuleResource list operation.

func (AlertRuleResourceListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AlertRuleResourceListResult.

func (*AlertRuleResourceListResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AlertRuleResourceListResult.

type AlertRuleResourceProperties

type AlertRuleResourceProperties struct {
	// REQUIRED; The resource ID of the alert rule resource.
	AlertRuleResourceID *string

	// REQUIRED; The template ID associated with alert rule resource.
	AlertRuleTemplateID *string

	// REQUIRED; The alert rule template version.
	AlertRuleTemplateVersion *string

	// REQUIRED; The properties with which the alert rule resource was created.
	CreatedWithProperties *AlertRuleCreationProperties

	// REQUIRED; The creation time of the alert rule resource.
	CreationTime *time.Time

	// READ-ONLY; The provisioning state of the alert rule resource.
	ProvisioningState *ResourceProvisioningState
}

AlertRuleResourceProperties - The generic properties of the alert rule proxy resource.

func (AlertRuleResourceProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AlertRuleResourceProperties.

func (*AlertRuleResourceProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AlertRuleResourceProperties.

type AlertRuleResourcesClient

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

AlertRuleResourcesClient contains the methods for the AlertRuleResources group. Don't use this type directly, use NewAlertRuleResourcesClient() instead.

func NewAlertRuleResourcesClient

func NewAlertRuleResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AlertRuleResourcesClient, error)

NewAlertRuleResourcesClient creates a new instance of AlertRuleResourcesClient with the specified values.

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

func (*AlertRuleResourcesClient) CreateOrUpdate

func (client *AlertRuleResourcesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, watcherName string, alertRuleResourceName string, resource AlertRuleResource, options *AlertRuleResourcesClientCreateOrUpdateOptions) (AlertRuleResourcesClientCreateOrUpdateResponse, error)

CreateOrUpdate - Create a AlertRuleResource If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2025-01-02

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • watcherName - The database watcher name.
  • alertRuleResourceName - The alert rule proxy resource name.
  • resource - Resource create parameters.
  • options - AlertRuleResourcesClientCreateOrUpdateOptions contains the optional parameters for the AlertRuleResourcesClient.CreateOrUpdate method.
Example

Generated from example definition: 2025-01-02/AlertRuleResources_CreateOrUpdate_MaximumSet_Gen.json

package main

import (
	"context"
	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/databasewatcher/armdatabasewatcher"
	"log"
	"time"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatabasewatcher.NewClientFactory("A76F9850-996B-40B3-94D4-C98110A0EEC9", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAlertRuleResourcesClient().CreateOrUpdate(ctx, "rgWatcher", "testWatcher", "testAlert", armdatabasewatcher.AlertRuleResource{
		Properties: &armdatabasewatcher.AlertRuleResourceProperties{
			AlertRuleResourceID:      to.Ptr("/subscriptions/469DD77C-C8DB-47B7-B9E1-72D29F8C878Be/resourceGroups/rgWatcher/providers/microsoft.insights/scheduledqueryrules/alerts-demo"),
			CreationTime:             to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T15:38:47.798Z"); return t }()),
			AlertRuleTemplateVersion: to.Ptr("1.0"),
			AlertRuleTemplateID:      to.Ptr("someTemplateId"),
			CreatedWithProperties:    to.Ptr(armdatabasewatcher.AlertRuleCreationPropertiesCreatedWithActionGroup),
		},
	}, 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 = armdatabasewatcher.AlertRuleResourcesClientCreateOrUpdateResponse{
	// 	AlertRuleResource: &armdatabasewatcher.AlertRuleResource{
	// 		Properties: &armdatabasewatcher.AlertRuleResourceProperties{
	// 			AlertRuleResourceID: to.Ptr("/subscriptions/469DD77C-C8DB-47B7-B9E1-72D29F8C878Be/resourceGroups/rgWatcher/providers/microsoft.insights/scheduledqueryrules/alerts-demo"),
	// 			CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T15:38:47.798Z"); return t}()),
	// 			AlertRuleTemplateVersion: to.Ptr("1.0"),
	// 			AlertRuleTemplateID: to.Ptr("someTemplateId"),
	// 			CreatedWithProperties: to.Ptr(armdatabasewatcher.AlertRuleCreationPropertiesCreatedWithActionGroup),
	// 			ProvisioningState: to.Ptr(armdatabasewatcher.ResourceProvisioningStateSucceeded),
	// 		},
	// 		ID: to.Ptr("/subscriptions/469DD77C-C8DB-47B7-B9E1-72D29F8C878Be/resourceGroups/rgWatcher/providers/microsoft.databasewatcher/watchers/testWatcher/alertRuleResources/testAlert"),
	// 		Name: to.Ptr("testAlert"),
	// 		Type: to.Ptr("microsoft.databasewatcher/watchers/alertRuleResources"),
	// 		SystemData: &armdatabasewatcher.SystemData{
	// 			CreatedBy: to.Ptr("enbpvlpqbwd"),
	// 			CreatedByType: to.Ptr(armdatabasewatcher.CreatedByTypeUser),
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T15:38:47.092Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("mxp"),
	// 			LastModifiedByType: to.Ptr(armdatabasewatcher.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T15:38:47.092Z"); return t}()),
	// 		},
	// 	},
	// }
}
Output:

func (*AlertRuleResourcesClient) Delete

func (client *AlertRuleResourcesClient) Delete(ctx context.Context, resourceGroupName string, watcherName string, alertRuleResourceName string, options *AlertRuleResourcesClientDeleteOptions) (AlertRuleResourcesClientDeleteResponse, error)

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

Generated from API version 2025-01-02

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • watcherName - The database watcher name.
  • alertRuleResourceName - The alert rule proxy resource name.
  • options - AlertRuleResourcesClientDeleteOptions contains the optional parameters for the AlertRuleResourcesClient.Delete method.
Example

Generated from example definition: 2025-01-02/AlertRuleResources_Delete_MaximumSet_Gen.json

package main

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

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatabasewatcher.NewClientFactory("A76F9850-996B-40B3-94D4-C98110A0EEC9", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAlertRuleResourcesClient().Delete(ctx, "rgWatcher", "testWatcher", "testAlert", 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 = armdatabasewatcher.AlertRuleResourcesClientDeleteResponse{
	// }
}
Output:

func (*AlertRuleResourcesClient) Get

func (client *AlertRuleResourcesClient) Get(ctx context.Context, resourceGroupName string, watcherName string, alertRuleResourceName string, options *AlertRuleResourcesClientGetOptions) (AlertRuleResourcesClientGetResponse, error)

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

Generated from API version 2025-01-02

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • watcherName - The database watcher name.
  • alertRuleResourceName - The alert rule proxy resource name.
  • options - AlertRuleResourcesClientGetOptions contains the optional parameters for the AlertRuleResourcesClient.Get method.
Example

Generated from example definition: 2025-01-02/AlertRuleResources_Get_MaximumSet_Gen.json

package main

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

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatabasewatcher.NewClientFactory("A76F9850-996B-40B3-94D4-C98110A0EEC9", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAlertRuleResourcesClient().Get(ctx, "rgWatcher", "testWatcher", "testAlert", 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 = armdatabasewatcher.AlertRuleResourcesClientGetResponse{
	// 	AlertRuleResource: &armdatabasewatcher.AlertRuleResource{
	// 		Properties: &armdatabasewatcher.AlertRuleResourceProperties{
	// 			AlertRuleResourceID: to.Ptr("/subscriptions/469DD77C-C8DB-47B7-B9E1-72D29F8C878Be/resourceGroups/rgWatcher/providers/microsoft.insights/scheduledqueryrules/alerts-demo"),
	// 			CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T15:38:47.798Z"); return t}()),
	// 			AlertRuleTemplateVersion: to.Ptr("1.0"),
	// 			AlertRuleTemplateID: to.Ptr("someTemplateId"),
	// 			CreatedWithProperties: to.Ptr(armdatabasewatcher.AlertRuleCreationPropertiesCreatedWithActionGroup),
	// 			ProvisioningState: to.Ptr(armdatabasewatcher.ResourceProvisioningStateSucceeded),
	// 		},
	// 		ID: to.Ptr("/subscriptions/469DD77C-C8DB-47B7-B9E1-72D29F8C878Be/resourceGroups/rgWatcher/providers/microsoft.databasewatcher/watchers/testWatcher/alertRuleResources/testAlert"),
	// 		Name: to.Ptr("testAlert"),
	// 		Type: to.Ptr("microsoft.databasewatcher/watchers/alertRuleResources"),
	// 		SystemData: &armdatabasewatcher.SystemData{
	// 			CreatedBy: to.Ptr("enbpvlpqbwd"),
	// 			CreatedByType: to.Ptr(armdatabasewatcher.CreatedByTypeUser),
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T15:38:47.092Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("mxp"),
	// 			LastModifiedByType: to.Ptr(armdatabasewatcher.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T15:38:47.092Z"); return t}()),
	// 		},
	// 	},
	// }
}
Output:

func (*AlertRuleResourcesClient) NewListByParentPager

NewListByParentPager - List AlertRuleResource resources by Watcher

Generated from API version 2025-01-02

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • watcherName - The database watcher name.
  • options - AlertRuleResourcesClientListByParentOptions contains the optional parameters for the AlertRuleResourcesClient.NewListByParentPager method.
Example

Generated from example definition: 2025-01-02/AlertRuleResources_ListByParent_MaximumSet_Gen.json

package main

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

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatabasewatcher.NewClientFactory("A76F9850-996B-40B3-94D4-C98110A0EEC9", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAlertRuleResourcesClient().NewListByParentPager("rgWatcher", "testWatcher", 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 = armdatabasewatcher.AlertRuleResourcesClientListByParentResponse{
		// 	AlertRuleResourceListResult: armdatabasewatcher.AlertRuleResourceListResult{
		// 		Value: []*armdatabasewatcher.AlertRuleResource{
		// 			{
		// 				Properties: &armdatabasewatcher.AlertRuleResourceProperties{
		// 					AlertRuleResourceID: to.Ptr("/subscriptions/469DD77C-C8DB-47B7-B9E1-72D29F8C878Be/resourceGroups/rgWatcher/providers/microsoft.insights/scheduledqueryrules/alerts-demo"),
		// 					CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T15:38:47.798Z"); return t}()),
		// 					AlertRuleTemplateVersion: to.Ptr("1.0"),
		// 					ProvisioningState: to.Ptr(armdatabasewatcher.ResourceProvisioningStateSucceeded),
		// 					AlertRuleTemplateID: to.Ptr("someTemplateId"),
		// 					CreatedWithProperties: to.Ptr(armdatabasewatcher.AlertRuleCreationPropertiesCreatedWithActionGroup),
		// 				},
		// 				ID: to.Ptr("/subscriptions/469DD77C-C8DB-47B7-B9E1-72D29F8C878Be/resourceGroups/rgWatcher/providers/microsoft.databasewatcher/watchers/testWatcher/alertRuleResources/testAlert"),
		// 				Name: to.Ptr("testAlert"),
		// 				Type: to.Ptr("microsoft.databasewatcher/watchers/alertRuleResources"),
		// 				SystemData: &armdatabasewatcher.SystemData{
		// 					CreatedBy: to.Ptr("enbpvlpqbwd"),
		// 					CreatedByType: to.Ptr(armdatabasewatcher.CreatedByTypeUser),
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T15:38:47.092Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("mxp"),
		// 					LastModifiedByType: to.Ptr(armdatabasewatcher.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T15:38:47.092Z"); return t}()),
		// 				},
		// 			},
		// 		},
		// 		NextLink: to.Ptr("https://microsoft.com/a"),
		// 	},
		// }
	}
}
Output:

type AlertRuleResourcesClientCreateOrUpdateOptions

type AlertRuleResourcesClientCreateOrUpdateOptions struct {
}

AlertRuleResourcesClientCreateOrUpdateOptions contains the optional parameters for the AlertRuleResourcesClient.CreateOrUpdate method.

type AlertRuleResourcesClientCreateOrUpdateResponse

type AlertRuleResourcesClientCreateOrUpdateResponse struct {
	// Concrete proxy resource types can be created by aliasing this type using a specific property type.
	AlertRuleResource
}

AlertRuleResourcesClientCreateOrUpdateResponse contains the response from method AlertRuleResourcesClient.CreateOrUpdate.

type AlertRuleResourcesClientDeleteOptions

type AlertRuleResourcesClientDeleteOptions struct {
}

AlertRuleResourcesClientDeleteOptions contains the optional parameters for the AlertRuleResourcesClient.Delete method.

type AlertRuleResourcesClientDeleteResponse

type AlertRuleResourcesClientDeleteResponse struct {
}

AlertRuleResourcesClientDeleteResponse contains the response from method AlertRuleResourcesClient.Delete.

type AlertRuleResourcesClientGetOptions

type AlertRuleResourcesClientGetOptions struct {
}

AlertRuleResourcesClientGetOptions contains the optional parameters for the AlertRuleResourcesClient.Get method.

type AlertRuleResourcesClientGetResponse

type AlertRuleResourcesClientGetResponse struct {
	// Concrete proxy resource types can be created by aliasing this type using a specific property type.
	AlertRuleResource
}

AlertRuleResourcesClientGetResponse contains the response from method AlertRuleResourcesClient.Get.

type AlertRuleResourcesClientListByParentOptions

type AlertRuleResourcesClientListByParentOptions struct {
}

AlertRuleResourcesClientListByParentOptions contains the optional parameters for the AlertRuleResourcesClient.NewListByParentPager method.

type AlertRuleResourcesClientListByParentResponse

type AlertRuleResourcesClientListByParentResponse struct {
	// The response of a AlertRuleResource list operation.
	AlertRuleResourceListResult
}

AlertRuleResourcesClientListByParentResponse contains the response from method AlertRuleResourcesClient.NewListByParentPager.

type ClientFactory

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

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

func NewClientFactory

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

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

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

func (*ClientFactory) NewAlertRuleResourcesClient

func (c *ClientFactory) NewAlertRuleResourcesClient() *AlertRuleResourcesClient

NewAlertRuleResourcesClient creates a new instance of AlertRuleResourcesClient.

func (*ClientFactory) NewHealthValidationsClient

func (c *ClientFactory) NewHealthValidationsClient() *HealthValidationsClient

NewHealthValidationsClient creates a new instance of HealthValidationsClient.

func (*ClientFactory) NewOperationsClient

func (c *ClientFactory) NewOperationsClient() *OperationsClient

NewOperationsClient creates a new instance of OperationsClient.

func (*ClientFactory) NewSharedPrivateLinkResourcesClient

func (c *ClientFactory) NewSharedPrivateLinkResourcesClient() *SharedPrivateLinkResourcesClient

NewSharedPrivateLinkResourcesClient creates a new instance of SharedPrivateLinkResourcesClient.

func (*ClientFactory) NewTargetsClient

func (c *ClientFactory) NewTargetsClient() *TargetsClient

NewTargetsClient creates a new instance of TargetsClient.

func (*ClientFactory) NewWatchersClient

func (c *ClientFactory) NewWatchersClient() *WatchersClient

NewWatchersClient creates a new instance of WatchersClient.

type CreatedByType

type CreatedByType string

CreatedByType - The kind of entity that created the resource.

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

func PossibleCreatedByTypeValues

func PossibleCreatedByTypeValues() []CreatedByType

PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.

type Datastore

type Datastore struct {
	// REQUIRED; The Kusto cluster URI.
	KustoClusterURI *string

	// REQUIRED; The Kusto data ingestion URI.
	KustoDataIngestionURI *string

	// REQUIRED; The name of a Kusto database.
	KustoDatabaseName *string

	// REQUIRED; The Kusto management URL.
	KustoManagementURL *string

	// REQUIRED; The type of a Kusto offering.
	KustoOfferingType *KustoOfferingType

	// The Azure resource ID of an Azure Data Explorer cluster.
	AdxClusterResourceID *string

	// The Kusto cluster display name.
	KustoClusterDisplayName *string
}

Datastore - The properties of a data store.

func (Datastore) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Datastore.

func (*Datastore) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type Datastore.

type HealthValidation

type HealthValidation struct {
	// The resource-specific properties for this resource.
	Properties *HealthValidationProperties

	// READ-ONLY; The health validation resource name.
	Name *string

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

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

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

HealthValidation - Concrete proxy resource types can be created by aliasing this type using a specific property type.

func (HealthValidation) MarshalJSON

func (h HealthValidation) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type HealthValidation.

func (*HealthValidation) UnmarshalJSON

func (h *HealthValidation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type HealthValidation.

type HealthValidationListResult

type HealthValidationListResult struct {
	// REQUIRED; The HealthValidation items on this page
	Value []*HealthValidation

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

HealthValidationListResult - The response of a HealthValidation list operation.

func (HealthValidationListResult) MarshalJSON

func (h HealthValidationListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type HealthValidationListResult.

func (*HealthValidationListResult) UnmarshalJSON

func (h *HealthValidationListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type HealthValidationListResult.

type HealthValidationProperties

type HealthValidationProperties struct {
	// READ-ONLY; The end time of health validation, in UTC.
	EndTime *time.Time

	// READ-ONLY; The list of issues found by health validation.
	Issues []*ValidationIssue

	// READ-ONLY; The start time of health validation, in UTC.
	StartTime *time.Time

	// READ-ONLY; The current health validation status.
	Status *ValidationStatus

	// READ-ONLY; The provisioning state of the health validation resource.
	ProvisioningState *ResourceProvisioningState
}

HealthValidationProperties - The generic properties of the health validation resource.

func (HealthValidationProperties) MarshalJSON

func (h HealthValidationProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type HealthValidationProperties.

func (*HealthValidationProperties) UnmarshalJSON

func (h *HealthValidationProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type HealthValidationProperties.

type HealthValidationsClient

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

HealthValidationsClient contains the methods for the HealthValidations group. Don't use this type directly, use NewHealthValidationsClient() instead.

func NewHealthValidationsClient

func NewHealthValidationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*HealthValidationsClient, error)

NewHealthValidationsClient creates a new instance of HealthValidationsClient with the specified values.

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

func (*HealthValidationsClient) BeginStartValidation

func (client *HealthValidationsClient) BeginStartValidation(ctx context.Context, resourceGroupName string, watcherName string, healthValidationName string, options *HealthValidationsClientBeginStartValidationOptions) (*runtime.Poller[HealthValidationsClientStartValidationResponse], error)

BeginStartValidation - Starts health validation for a watcher. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2025-01-02

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • watcherName - The database watcher name.
  • healthValidationName - The health validation resource name.
  • options - HealthValidationsClientBeginStartValidationOptions contains the optional parameters for the HealthValidationsClient.BeginStartValidation method.
Example

Generated from example definition: 2025-01-02/HealthValidations_StartValidation_MaximumSet_Gen.json

package main

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

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatabasewatcher.NewClientFactory("A76F9850-996B-40B3-94D4-C98110A0EEC9", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewHealthValidationsClient().BeginStartValidation(ctx, "rgWatcher", "testWatcher", "testHealthValidation", 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 = armdatabasewatcher.HealthValidationsClientStartValidationResponse{
	// 	HealthValidation: &armdatabasewatcher.HealthValidation{
	// 		Properties: &armdatabasewatcher.HealthValidationProperties{
	// 			StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-10-07T19:42:55.594Z"); return t}()),
	// 			EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-10-07T19:42:55.594Z"); return t}()),
	// 			Status: to.Ptr(armdatabasewatcher.ValidationStatusRunning),
	// 			Issues: []*armdatabasewatcher.ValidationIssue{
	// 			},
	// 		},
	// 		ID: to.Ptr("/subscriptions/469DD77C-C8DB-47B7-B9E1-72D29F8C878Be/resourceGroups/rgWatcher/providers/microsoft.databasewatcher/watchers/testWatcher/healthValidations/testHealthValidation"),
	// 		Name: to.Ptr("testHealthValidation"),
	// 		Type: to.Ptr("microsoft.databasewatcher/watchers/healthValidations"),
	// 		SystemData: &armdatabasewatcher.SystemData{
	// 			CreatedBy: to.Ptr("enbpvlpqbwd"),
	// 			CreatedByType: to.Ptr(armdatabasewatcher.CreatedByTypeUser),
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T15:38:47.092Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("mxp"),
	// 			LastModifiedByType: to.Ptr(armdatabasewatcher.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T15:38:47.092Z"); return t}()),
	// 		},
	// 	},
	// }
}
Output:

func (*HealthValidationsClient) Get

func (client *HealthValidationsClient) Get(ctx context.Context, resourceGroupName string, watcherName string, healthValidationName string, options *HealthValidationsClientGetOptions) (HealthValidationsClientGetResponse, error)

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

Generated from API version 2025-01-02

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • watcherName - The database watcher name.
  • healthValidationName - The health validation resource name.
  • options - HealthValidationsClientGetOptions contains the optional parameters for the HealthValidationsClient.Get method.
Example

Generated from example definition: 2025-01-02/HealthValidations_Get_MaximumSet_Gen.json

package main

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

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatabasewatcher.NewClientFactory("A76F9850-996B-40B3-94D4-C98110A0EEC9", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewHealthValidationsClient().Get(ctx, "rgWatcher", "testWatcher", "testHealthValidation", 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 = armdatabasewatcher.HealthValidationsClientGetResponse{
	// 	HealthValidation: &armdatabasewatcher.HealthValidation{
	// 		Properties: &armdatabasewatcher.HealthValidationProperties{
	// 			StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-10-07T19:42:55.594Z"); return t}()),
	// 			EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-10-07T19:42:55.594Z"); return t}()),
	// 			Status: to.Ptr(armdatabasewatcher.ValidationStatusSucceeded),
	// 			Issues: []*armdatabasewatcher.ValidationIssue{
	// 				{
	// 					ErrorCode: to.Ptr("ReadDatasetError"),
	// 					ErrorMessage: to.Ptr("Invalid operation. The connection is closed."),
	// 					AdditionalDetails: to.Ptr("There seems to be a connection issue."),
	// 					RecommendationMessage: to.Ptr("Please check the connection."),
	// 					RecommendationURL: to.Ptr("https://aka.ms/issuerecommendation"),
	// 					RelatedResourceID: to.Ptr("/subscriptions/469DD77C-C8DB-47B7-B9E1-72D29F8C878Be/resourceGroups/test-setup/providers/Microsoft.Sql/servers/test-setup/databases/test-1"),
	// 					RelatedResourceType: to.Ptr("Microsoft.Sql/servers"),
	// 				},
	// 			},
	// 			ProvisioningState: to.Ptr(armdatabasewatcher.ResourceProvisioningStateSucceeded),
	// 		},
	// 		ID: to.Ptr("/subscriptions/469DD77C-C8DB-47B7-B9E1-72D29F8C878Be/resourceGroups/rgWatcher/providers/microsoft.databasewatcher/watchers/testWatcher/healthValidations/testHealthValidation"),
	// 		Name: to.Ptr("testHealthValidation"),
	// 		Type: to.Ptr("microsoft.databasewatcher/watchers/healthValidations"),
	// 		SystemData: &armdatabasewatcher.SystemData{
	// 			CreatedBy: to.Ptr("enbpvlpqbwd"),
	// 			CreatedByType: to.Ptr(armdatabasewatcher.CreatedByTypeUser),
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T15:38:47.092Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("mxp"),
	// 			LastModifiedByType: to.Ptr(armdatabasewatcher.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T15:38:47.092Z"); return t}()),
	// 		},
	// 	},
	// }
}
Output:

func (*HealthValidationsClient) NewListByParentPager

func (client *HealthValidationsClient) NewListByParentPager(resourceGroupName string, watcherName string, options *HealthValidationsClientListByParentOptions) *runtime.Pager[HealthValidationsClientListByParentResponse]

NewListByParentPager - List HealthValidation resources by Watcher

Generated from API version 2025-01-02

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • watcherName - The database watcher name.
  • options - HealthValidationsClientListByParentOptions contains the optional parameters for the HealthValidationsClient.NewListByParentPager method.
Example

Generated from example definition: 2025-01-02/HealthValidations_ListByParent_MaximumSet_Gen.json

package main

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

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatabasewatcher.NewClientFactory("A76F9850-996B-40B3-94D4-C98110A0EEC9", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewHealthValidationsClient().NewListByParentPager("rgWatcher", "testWatcher", 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 = armdatabasewatcher.HealthValidationsClientListByParentResponse{
		// 	HealthValidationListResult: armdatabasewatcher.HealthValidationListResult{
		// 		Value: []*armdatabasewatcher.HealthValidation{
		// 			{
		// 				Properties: &armdatabasewatcher.HealthValidationProperties{
		// 					StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-10-07T19:42:55.594Z"); return t}()),
		// 					EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-10-07T19:42:55.594Z"); return t}()),
		// 					Status: to.Ptr(armdatabasewatcher.ValidationStatusSucceeded),
		// 					Issues: []*armdatabasewatcher.ValidationIssue{
		// 						{
		// 							ErrorCode: to.Ptr("ReadDatasetError"),
		// 							ErrorMessage: to.Ptr("Invalid operation. The connection is closed."),
		// 							AdditionalDetails: to.Ptr("There seems to be a connection issue."),
		// 							RecommendationMessage: to.Ptr("Please check the connection."),
		// 							RecommendationURL: to.Ptr("https://aka.ms/issuerecommendation"),
		// 							RelatedResourceID: to.Ptr("/subscriptions/469DD77C-C8DB-47B7-B9E1-72D29F8C878Be/resourceGroups/test-setup/providers/Microsoft.Sql/servers/test-setup/databases/test-1"),
		// 							RelatedResourceType: to.Ptr("Microsoft.Sql/servers"),
		// 						},
		// 					},
		// 					ProvisioningState: to.Ptr(armdatabasewatcher.ResourceProvisioningStateSucceeded),
		// 				},
		// 				ID: to.Ptr("/subscriptions/469DD77C-C8DB-47B7-B9E1-72D29F8C878Be/resourceGroups/rgWatcher/providers/microsoft.databasewatcher/watchers/testWatcher/healthValidations/testHealthValidation"),
		// 				Name: to.Ptr("testHealthValidation"),
		// 				Type: to.Ptr("microsoft.databasewatcher/watchers/healthValidations"),
		// 				SystemData: &armdatabasewatcher.SystemData{
		// 					CreatedBy: to.Ptr("enbpvlpqbwd"),
		// 					CreatedByType: to.Ptr(armdatabasewatcher.CreatedByTypeUser),
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T15:38:47.092Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("mxp"),
		// 					LastModifiedByType: to.Ptr(armdatabasewatcher.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T15:38:47.092Z"); return t}()),
		// 				},
		// 			},
		// 		},
		// 		NextLink: to.Ptr("https://microsoft.com/a"),
		// 	},
		// }
	}
}
Output:

type HealthValidationsClientBeginStartValidationOptions

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

HealthValidationsClientBeginStartValidationOptions contains the optional parameters for the HealthValidationsClient.BeginStartValidation method.

type HealthValidationsClientGetOptions

type HealthValidationsClientGetOptions struct {
}

HealthValidationsClientGetOptions contains the optional parameters for the HealthValidationsClient.Get method.

type HealthValidationsClientGetResponse

type HealthValidationsClientGetResponse struct {
	// Concrete proxy resource types can be created by aliasing this type using a specific property type.
	HealthValidation
}

HealthValidationsClientGetResponse contains the response from method HealthValidationsClient.Get.

type HealthValidationsClientListByParentOptions

type HealthValidationsClientListByParentOptions struct {
}

HealthValidationsClientListByParentOptions contains the optional parameters for the HealthValidationsClient.NewListByParentPager method.

type HealthValidationsClientListByParentResponse

type HealthValidationsClientListByParentResponse struct {
	// The response of a HealthValidation list operation.
	HealthValidationListResult
}

HealthValidationsClientListByParentResponse contains the response from method HealthValidationsClient.NewListByParentPager.

type HealthValidationsClientStartValidationResponse

type HealthValidationsClientStartValidationResponse struct {
	// Concrete proxy resource types can be created by aliasing this type using a specific property type.
	HealthValidation
}

HealthValidationsClientStartValidationResponse contains the response from method HealthValidationsClient.BeginStartValidation.

type KustoOfferingType

type KustoOfferingType string

KustoOfferingType - The type of Kusto offering.

const (
	// KustoOfferingTypeAdx - The Azure Data Explorer cluster Kusto offering.
	KustoOfferingTypeAdx KustoOfferingType = "adx"
	// KustoOfferingTypeFabric - The Fabric Real-Time Analytics Kusto offering.
	KustoOfferingTypeFabric KustoOfferingType = "fabric"
	// KustoOfferingTypeFree - The free Azure Data Explorer cluster Kusto offering.
	KustoOfferingTypeFree KustoOfferingType = "free"
)

func PossibleKustoOfferingTypeValues

func PossibleKustoOfferingTypeValues() []KustoOfferingType

PossibleKustoOfferingTypeValues returns the possible values for the KustoOfferingType const type.

type ManagedServiceIdentityType

type ManagedServiceIdentityType string

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

const (
	// ManagedServiceIdentityTypeNone - No managed identity.
	ManagedServiceIdentityTypeNone ManagedServiceIdentityType = "None"
	// ManagedServiceIdentityTypeSystemAndUserAssigned - System and user assigned managed identity.
	ManagedServiceIdentityTypeSystemAndUserAssigned ManagedServiceIdentityType = "SystemAssigned, UserAssigned"
	// ManagedServiceIdentityTypeSystemAssigned - System assigned managed identity.
	ManagedServiceIdentityTypeSystemAssigned ManagedServiceIdentityType = "SystemAssigned"
	// ManagedServiceIdentityTypeUserAssigned - User assigned managed identity.
	ManagedServiceIdentityTypeUserAssigned ManagedServiceIdentityType = "UserAssigned"
)

func PossibleManagedServiceIdentityTypeValues

func PossibleManagedServiceIdentityTypeValues() []ManagedServiceIdentityType

PossibleManagedServiceIdentityTypeValues returns the possible values for the ManagedServiceIdentityType const type.

type ManagedServiceIdentityV4

type ManagedServiceIdentityV4 struct {
	// REQUIRED; The type of managed identity assigned to this resource.
	Type *ManagedServiceIdentityType

	// The identities assigned to this resource by the user.
	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
}

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

func (ManagedServiceIdentityV4) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ManagedServiceIdentityV4.

func (*ManagedServiceIdentityV4) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ManagedServiceIdentityV4.

type Operation

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

	// READ-ONLY; Extensible 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 Azure
	// Resource Manager/control-plane operations.
	IsDataAction *bool

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

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

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

func (Operation) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Operation.

func (*Operation) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type Operation.

type OperationDisplay

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

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

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

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

OperationDisplay - Localized display information for and operation.

func (OperationDisplay) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OperationDisplay.

func (*OperationDisplay) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.

type OperationListResult

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

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

OperationListResult - A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.

func (OperationListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OperationListResult.

func (*OperationListResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult.

type OperationsClient

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

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

func NewOperationsClient

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

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

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

func (*OperationsClient) NewListPager

NewListPager - List the operations for the provider

Generated from API version 2025-01-02

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

Generated from example definition: 2025-01-02/Operations_List_MaximumSet_Gen.json

package main

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

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatabasewatcher.NewClientFactory("<subscriptionID>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewOperationsClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page = armdatabasewatcher.OperationsClientListResponse{
		// 	OperationListResult: armdatabasewatcher.OperationListResult{
		// 		Value: []*armdatabasewatcher.Operation{
		// 			{
		// 				Name: to.Ptr("snzrdvltunnrz"),
		// 				IsDataAction: to.Ptr(true),
		// 				Display: &armdatabasewatcher.OperationDisplay{
		// 					Provider: to.Ptr("dtfrqzamclscchmghtxn"),
		// 					Resource: to.Ptr("lvlhnsfnquorjuuutjxex"),
		// 					Operation: to.Ptr("vbgvamoxqwthpbdghxzaw"),
		// 					Description: to.Ptr("nvbtuwwjfehylzmoatd"),
		// 				},
		// 				Origin: to.Ptr(armdatabasewatcher.OriginUser),
		// 				ActionType: to.Ptr(armdatabasewatcher.ActionTypeInternal),
		// 			},
		// 		},
		// 		NextLink: to.Ptr("https://microsoft.com/awfba"),
		// 	},
		// }
	}
}
Output:

Example (OperationsListMinimumSet)

Generated from example definition: 2025-01-02/Operations_List_MinimumSet_Gen.json

package main

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

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatabasewatcher.NewClientFactory("<subscriptionID>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewOperationsClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page = armdatabasewatcher.OperationsClientListResponse{
		// 	OperationListResult: armdatabasewatcher.OperationListResult{
		// 	},
		// }
	}
}
Output:

type OperationsClientListOptions

type OperationsClientListOptions struct {
}

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

type OperationsClientListResponse

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

OperationsClientListResponse contains the response from method OperationsClient.NewListPager.

type Origin

type Origin string

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

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

func PossibleOriginValues

func PossibleOriginValues() []Origin

PossibleOriginValues returns the possible values for the Origin const type.

type ProvisioningState

type ProvisioningState string

ProvisioningState - The status of the last provisioning operation performed on the resource.

const (
	// ProvisioningStateCanceled - Resource creation was canceled.
	ProvisioningStateCanceled ProvisioningState = "Canceled"
	// ProvisioningStateFailed - Resource creation failed.
	ProvisioningStateFailed ProvisioningState = "Failed"
	// ProvisioningStateSucceeded - Resource has been created.
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
)

func PossibleProvisioningStateValues

func PossibleProvisioningStateValues() []ProvisioningState

PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.

type ResourceProvisioningState

type ResourceProvisioningState string

ResourceProvisioningState - The provisioning state of a resource type.

const (
	// ResourceProvisioningStateCanceled - Resource creation was canceled.
	ResourceProvisioningStateCanceled ResourceProvisioningState = "Canceled"
	// ResourceProvisioningStateFailed - Resource creation failed.
	ResourceProvisioningStateFailed ResourceProvisioningState = "Failed"
	// ResourceProvisioningStateSucceeded - Resource has been created.
	ResourceProvisioningStateSucceeded ResourceProvisioningState = "Succeeded"
)

func PossibleResourceProvisioningStateValues

func PossibleResourceProvisioningStateValues() []ResourceProvisioningState

PossibleResourceProvisioningStateValues returns the possible values for the ResourceProvisioningState const type.

type SQLDbElasticPoolTargetProperties

type SQLDbElasticPoolTargetProperties struct {
	// REQUIRED; The Azure resource ID of the anchor database used to connect to an elastic pool.
	AnchorDatabaseResourceID *string

	// REQUIRED; The FQDN host name of the server to use in the connection string when connecting to a target. For example, for
	// an Azure SQL logical server in the Azure commercial cloud, the value might be 'sql-logical-server-22092780.database.windows.net';
	// for an Azure SQL managed instance in the Azure commercial cloud, the value might be 'sql-mi-39441134.767d5869f605.database.windows.net'.
	// Port number and instance name must be specified separately.
	ConnectionServerName *string

	// REQUIRED; The Azure resource ID of an Azure SQL DB elastic pool target.
	SQLEpResourceID *string

	// REQUIRED; The type of authentication to use when connecting to a target.
	TargetAuthenticationType *TargetAuthenticationType

	// CONSTANT; The Azure SQL DB elastic pool target.
	// Field has constant value "SqlEp", any specified value is ignored.
	TargetType *string

	// Set to true to monitor a high availability replica of specified target, if any.
	ReadIntent *bool

	// To use SQL authentication when connecting to targets, specify the vault where the login name and password secrets are stored.
	TargetVault *VaultSecret

	// READ-ONLY; The provisioning state of the resource.
	ProvisioningState *ResourceProvisioningState
}

SQLDbElasticPoolTargetProperties - The properties specific to an elastic pool in Azure SQL Database.

func (*SQLDbElasticPoolTargetProperties) GetTargetProperties

func (s *SQLDbElasticPoolTargetProperties) GetTargetProperties() *TargetProperties

GetTargetProperties implements the TargetPropertiesClassification interface for type SQLDbElasticPoolTargetProperties.

func (SQLDbElasticPoolTargetProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SQLDbElasticPoolTargetProperties.

func (*SQLDbElasticPoolTargetProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type SQLDbElasticPoolTargetProperties.

type SQLDbSingleDatabaseTargetProperties

type SQLDbSingleDatabaseTargetProperties struct {
	// REQUIRED; The FQDN host name of the server to use in the connection string when connecting to a target. For example, for
	// an Azure SQL logical server in the Azure commercial cloud, the value might be 'sql-logical-server-22092780.database.windows.net';
	// for an Azure SQL managed instance in the Azure commercial cloud, the value might be 'sql-mi-39441134.767d5869f605.database.windows.net'.
	// Port number and instance name must be specified separately.
	ConnectionServerName *string

	// REQUIRED; The Azure resource ID of an Azure SQL DB database target.
	SQLDbResourceID *string

	// REQUIRED; The type of authentication to use when connecting to a target.
	TargetAuthenticationType *TargetAuthenticationType

	// CONSTANT; The Azure SQL DB single database target.
	// Field has constant value "SqlDb", any specified value is ignored.
	TargetType *string

	// Set to true to monitor a high availability replica of specified target, if any.
	ReadIntent *bool

	// To use SQL authentication when connecting to targets, specify the vault where the login name and password secrets are stored.
	TargetVault *VaultSecret

	// READ-ONLY; The provisioning state of the resource.
	ProvisioningState *ResourceProvisioningState
}

SQLDbSingleDatabaseTargetProperties - The properties specific to a database in Azure SQL Database.

func (*SQLDbSingleDatabaseTargetProperties) GetTargetProperties

func (s *SQLDbSingleDatabaseTargetProperties) GetTargetProperties() *TargetProperties

GetTargetProperties implements the TargetPropertiesClassification interface for type SQLDbSingleDatabaseTargetProperties.

func (SQLDbSingleDatabaseTargetProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SQLDbSingleDatabaseTargetProperties.

func (*SQLDbSingleDatabaseTargetProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type SQLDbSingleDatabaseTargetProperties.

type SQLMiTargetProperties

type SQLMiTargetProperties struct {
	// REQUIRED; The FQDN host name of the server to use in the connection string when connecting to a target. For example, for
	// an Azure SQL logical server in the Azure commercial cloud, the value might be 'sql-logical-server-22092780.database.windows.net';
	// for an Azure SQL managed instance in the Azure commercial cloud, the value might be 'sql-mi-39441134.767d5869f605.database.windows.net'.
	// Port number and instance name must be specified separately.
	ConnectionServerName *string

	// REQUIRED; The Azure resource ID of an Azure SQL Managed Instance target.
	SQLMiResourceID *string

	// REQUIRED; The type of authentication to use when connecting to a target.
	TargetAuthenticationType *TargetAuthenticationType

	// CONSTANT; The Azure SQL Managed Instance target.
	// Field has constant value "SqlMi", any specified value is ignored.
	TargetType *string

	// The TCP port number to optionally use in the connection string when connecting to an Azure SQL Managed Instance target.
	ConnectionTCPPort *int32

	// Set to true to monitor a high availability replica of specified target, if any.
	ReadIntent *bool

	// To use SQL authentication when connecting to targets, specify the vault where the login name and password secrets are stored.
	TargetVault *VaultSecret

	// READ-ONLY; The provisioning state of the resource.
	ProvisioningState *ResourceProvisioningState
}

SQLMiTargetProperties - The properties specific to Azure SQL Managed Instance targets.

func (*SQLMiTargetProperties) GetTargetProperties

func (s *SQLMiTargetProperties) GetTargetProperties() *TargetProperties

GetTargetProperties implements the TargetPropertiesClassification interface for type SQLMiTargetProperties.

func (SQLMiTargetProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SQLMiTargetProperties.

func (*SQLMiTargetProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type SQLMiTargetProperties.

type SharedPrivateLinkResource

type SharedPrivateLinkResource struct {
	// The resource-specific properties for this resource.
	Properties *SharedPrivateLinkResourceProperties

	// READ-ONLY; The Shared Private Link resource name.
	Name *string

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

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

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

SharedPrivateLinkResource - Concrete proxy resource types can be created by aliasing this type using a specific property type.

func (SharedPrivateLinkResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SharedPrivateLinkResource.

func (*SharedPrivateLinkResource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type SharedPrivateLinkResource.

type SharedPrivateLinkResourceListResult

type SharedPrivateLinkResourceListResult struct {
	// REQUIRED; The SharedPrivateLinkResource items on this page
	Value []*SharedPrivateLinkResource

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

SharedPrivateLinkResourceListResult - The response of a SharedPrivateLinkResource list operation.

func (SharedPrivateLinkResourceListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SharedPrivateLinkResourceListResult.

func (*SharedPrivateLinkResourceListResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type SharedPrivateLinkResourceListResult.

type SharedPrivateLinkResourceProperties

type SharedPrivateLinkResourceProperties struct {
	// REQUIRED; The group id from the provider of resource the shared private link resource is for.
	GroupID *string

	// REQUIRED; The resource ID of the resource the shared private link resource is for.
	PrivateLinkResourceID *string

	// REQUIRED; The request message for requesting approval of the shared private link resource.
	RequestMessage *string

	// The DNS zone segment to be included in the DNS name of the shared private link. Value is required for Azure Data Explorer
	// clusters and SQL managed instances, and must be omitted for SQL logical servers and key vaults. The value is the second
	// segment of the host FQDN name of the resource that the shared private link resource is for. For example: if the host name
	// is 'adx-cluster-21187695.eastus.kusto.windows.net', then the value is 'eastus'; if the host name is 'sql-mi-23961134.767d5869f605.database.windows.net',
	// then the value is '767d5869f605'.
	DNSZone *string

	// READ-ONLY; The provisioning state of the resource.
	ProvisioningState *ResourceProvisioningState

	// READ-ONLY; Status of the shared private link resource. Can be Pending, Approved, Rejected or Disconnected.
	Status *SharedPrivateLinkResourceStatus
}

SharedPrivateLinkResourceProperties - The generic properties of a Shared Private Link resource.

func (SharedPrivateLinkResourceProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SharedPrivateLinkResourceProperties.

func (*SharedPrivateLinkResourceProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type SharedPrivateLinkResourceProperties.

type SharedPrivateLinkResourceStatus

type SharedPrivateLinkResourceStatus string

SharedPrivateLinkResourceStatus - Status of the shared private link resource. Can be Pending, Approved, Rejected or Disconnected.

const (
	// SharedPrivateLinkResourceStatusApproved - The shared private link connection request was approved by the resource owner.
	SharedPrivateLinkResourceStatusApproved SharedPrivateLinkResourceStatus = "Approved"
	// SharedPrivateLinkResourceStatusDisconnected - The shared private link connection request was disconnected by the resource
	// owner.
	SharedPrivateLinkResourceStatusDisconnected SharedPrivateLinkResourceStatus = "Disconnected"
	// SharedPrivateLinkResourceStatusPending - The shared private link connection request was not yet authorized by the resource
	// owner.
	SharedPrivateLinkResourceStatusPending SharedPrivateLinkResourceStatus = "Pending"
	// SharedPrivateLinkResourceStatusRejected - The shared private link connection request was rejected by the resource owner.
	SharedPrivateLinkResourceStatusRejected SharedPrivateLinkResourceStatus = "Rejected"
)

func PossibleSharedPrivateLinkResourceStatusValues

func PossibleSharedPrivateLinkResourceStatusValues() []SharedPrivateLinkResourceStatus

PossibleSharedPrivateLinkResourceStatusValues returns the possible values for the SharedPrivateLinkResourceStatus const type.

type SharedPrivateLinkResourcesClient

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

SharedPrivateLinkResourcesClient contains the methods for the SharedPrivateLinkResources group. Don't use this type directly, use NewSharedPrivateLinkResourcesClient() instead.

func NewSharedPrivateLinkResourcesClient

func NewSharedPrivateLinkResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SharedPrivateLinkResourcesClient, error)

NewSharedPrivateLinkResourcesClient creates a new instance of SharedPrivateLinkResourcesClient with the specified values.

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

func (*SharedPrivateLinkResourcesClient) BeginCreate

BeginCreate - Create a SharedPrivateLinkResource If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2025-01-02

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • watcherName - The database watcher name.
  • sharedPrivateLinkResourceName - The Shared Private Link resource name.
  • resource - Resource create parameters.
  • options - SharedPrivateLinkResourcesClientBeginCreateOptions contains the optional parameters for the SharedPrivateLinkResourcesClient.BeginCreate method.
Example

Generated from example definition: 2025-01-02/SharedPrivateLinkResources_Create_MaximumSet_Gen.json

package main

import (
	"context"
	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/databasewatcher/armdatabasewatcher"
	"log"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatabasewatcher.NewClientFactory("49e0fbd3-75e8-44e7-96fd-5b64d9ad818d", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewSharedPrivateLinkResourcesClient().BeginCreate(ctx, "apiTest-ddat4p", "databasemo3ej9ih", "monitoringh22eed", armdatabasewatcher.SharedPrivateLinkResource{
		Properties: &armdatabasewatcher.SharedPrivateLinkResourceProperties{
			PrivateLinkResourceID: to.Ptr("/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/apiTest-ddat4p/providers/Microsoft.KeyVault/vaults/kvmo3ej9ih"),
			GroupID:               to.Ptr("vault"),
			RequestMessage:        to.Ptr("request message"),
			DNSZone:               to.Ptr("ec3ae9d410ba"),
			Status:                to.Ptr(armdatabasewatcher.SharedPrivateLinkResourceStatusPending),
		},
	}, 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 = armdatabasewatcher.SharedPrivateLinkResourcesClientCreateResponse{
	// 	SharedPrivateLinkResource: &armdatabasewatcher.SharedPrivateLinkResource{
	// 		Properties: &armdatabasewatcher.SharedPrivateLinkResourceProperties{
	// 			PrivateLinkResourceID: to.Ptr("/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/apiTest-ddat4p/providers/Microsoft.KeyVault/vaults/kvmo3ej9ih"),
	// 			GroupID: to.Ptr("vault"),
	// 			RequestMessage: to.Ptr("request message"),
	// 			DNSZone: to.Ptr("ec3ae9d410ba"),
	// 			Status: to.Ptr(armdatabasewatcher.SharedPrivateLinkResourceStatusPending),
	// 		},
	// 		ID: to.Ptr("/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/apiTest-ddat4p/providers/Microsoft.DatabaseWatcher/watchers/databasemo3ej9ih/sharedPrivateLinkResources/monitoringh22eed"),
	// 		Name: to.Ptr("monitoringh22eed"),
	// 		Type: to.Ptr("microsoft.databasewatcher/watchers/sharedPrivateLinkResources"),
	// 		SystemData: &armdatabasewatcher.SystemData{
	// 			CreatedBy: to.Ptr("enbpvlpqbwd"),
	// 			CreatedByType: to.Ptr(armdatabasewatcher.CreatedByTypeUser),
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T15:38:47.092Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("mxp"),
	// 			LastModifiedByType: to.Ptr(armdatabasewatcher.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T15:38:47.092Z"); return t}()),
	// 		},
	// 	},
	// }
}
Output:

func (*SharedPrivateLinkResourcesClient) BeginDelete

func (client *SharedPrivateLinkResourcesClient) BeginDelete(ctx context.Context, resourceGroupName string, watcherName string, sharedPrivateLinkResourceName string, options *SharedPrivateLinkResourcesClientBeginDeleteOptions) (*runtime.Poller[SharedPrivateLinkResourcesClientDeleteResponse], error)

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

Generated from API version 2025-01-02

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • watcherName - The database watcher name.
  • sharedPrivateLinkResourceName - The Shared Private Link resource name.
  • options - SharedPrivateLinkResourcesClientBeginDeleteOptions contains the optional parameters for the SharedPrivateLinkResourcesClient.BeginDelete method.
Example

Generated from example definition: 2025-01-02/SharedPrivateLinkResources_Delete_MaximumSet_Gen.json

package main

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

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatabasewatcher.NewClientFactory("49e0fbd3-75e8-44e7-96fd-5b64d9ad818d", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewSharedPrivateLinkResourcesClient().BeginDelete(ctx, "apiTest-ddat4p", "databasemo3ej9ih", "monitoringh22eed", 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 (*SharedPrivateLinkResourcesClient) Get

func (client *SharedPrivateLinkResourcesClient) Get(ctx context.Context, resourceGroupName string, watcherName string, sharedPrivateLinkResourceName string, options *SharedPrivateLinkResourcesClientGetOptions) (SharedPrivateLinkResourcesClientGetResponse, error)

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

Generated from API version 2025-01-02

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • watcherName - The database watcher name.
  • sharedPrivateLinkResourceName - The Shared Private Link resource name.
  • options - SharedPrivateLinkResourcesClientGetOptions contains the optional parameters for the SharedPrivateLinkResourcesClient.Get method.
Example

Generated from example definition: 2025-01-02/SharedPrivateLinkResources_Get_MaximumSet_Gen.json

package main

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

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatabasewatcher.NewClientFactory("49e0fbd3-75e8-44e7-96fd-5b64d9ad818d", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewSharedPrivateLinkResourcesClient().Get(ctx, "apiTest-ddat4p", "databasemo3ej9ih", "monitoringh22eed", 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 = armdatabasewatcher.SharedPrivateLinkResourcesClientGetResponse{
	// 	SharedPrivateLinkResource: &armdatabasewatcher.SharedPrivateLinkResource{
	// 		Properties: &armdatabasewatcher.SharedPrivateLinkResourceProperties{
	// 			PrivateLinkResourceID: to.Ptr("/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/apiTest-ddat4p/providers/Microsoft.KeyVault/vaults/kvmo3ej9ih"),
	// 			GroupID: to.Ptr("vault"),
	// 			RequestMessage: to.Ptr("request message"),
	// 			DNSZone: to.Ptr("ec3ae9d410ba"),
	// 			Status: to.Ptr(armdatabasewatcher.SharedPrivateLinkResourceStatusPending),
	// 		},
	// 		ID: to.Ptr("/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/apiTest-ddat4p/providers/Microsoft.DatabaseWatcher/watchers/databasemo3ej9ih/sharedPrivateLinkResources/monitoringh22eed"),
	// 		Name: to.Ptr("monitoringh22eed"),
	// 		Type: to.Ptr("microsoft.databasewatcher/watchers/sharedPrivateLinkResources"),
	// 		SystemData: &armdatabasewatcher.SystemData{
	// 			CreatedBy: to.Ptr("enbpvlpqbwd"),
	// 			CreatedByType: to.Ptr(armdatabasewatcher.CreatedByTypeUser),
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T15:38:47.092Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("mxp"),
	// 			LastModifiedByType: to.Ptr(armdatabasewatcher.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T15:38:47.092Z"); return t}()),
	// 		},
	// 	},
	// }
}
Output:

func (*SharedPrivateLinkResourcesClient) NewListByWatcherPager

NewListByWatcherPager - List SharedPrivateLinkResource resources by Watcher

Generated from API version 2025-01-02

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • watcherName - The database watcher name.
  • options - SharedPrivateLinkResourcesClientListByWatcherOptions contains the optional parameters for the SharedPrivateLinkResourcesClient.NewListByWatcherPager method.
Example

Generated from example definition: 2025-01-02/SharedPrivateLinkResources_ListByWatcher_MaximumSet_Gen.json

package main

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

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatabasewatcher.NewClientFactory("49e0fbd3-75e8-44e7-96fd-5b64d9ad818d", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewSharedPrivateLinkResourcesClient().NewListByWatcherPager("apiTest-ddat4p", "databasemo3ej9ih", 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 = armdatabasewatcher.SharedPrivateLinkResourcesClientListByWatcherResponse{
		// 	SharedPrivateLinkResourceListResult: armdatabasewatcher.SharedPrivateLinkResourceListResult{
		// 		Value: []*armdatabasewatcher.SharedPrivateLinkResource{
		// 			{
		// 				ID: to.Ptr("/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/apiTest-ddat4p/providers/Microsoft.DatabaseWatcher/watchers/databasemo3ej9ih/sharedPrivateLinkResources/monitoringh22eed"),
		// 				Name: to.Ptr("monitoringh22eed"),
		// 				Type: to.Ptr("microsoft.databasewatcher/watchers/sharedPrivateLinkResources"),
		// 				Properties: &armdatabasewatcher.SharedPrivateLinkResourceProperties{
		// 					PrivateLinkResourceID: to.Ptr("/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/apiTest-ddat4p/providers/Microsoft.KeyVault/vaults/kvmo3ej9ih"),
		// 					GroupID: to.Ptr("vault"),
		// 					RequestMessage: to.Ptr("request message"),
		// 					DNSZone: to.Ptr("ec3ae9d410ba"),
		// 					Status: to.Ptr(armdatabasewatcher.SharedPrivateLinkResourceStatusPending),
		// 				},
		// 				SystemData: &armdatabasewatcher.SystemData{
		// 					CreatedBy: to.Ptr("enbpvlpqbwd"),
		// 					CreatedByType: to.Ptr(armdatabasewatcher.CreatedByTypeUser),
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T15:38:47.092Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("mxp"),
		// 					LastModifiedByType: to.Ptr(armdatabasewatcher.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T15:38:47.092Z"); return t}()),
		// 				},
		// 			},
		// 		},
		// 		NextLink: to.Ptr("https://microsoft.com/awfba"),
		// 	},
		// }
	}
}
Output:

type SharedPrivateLinkResourcesClientBeginCreateOptions

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

SharedPrivateLinkResourcesClientBeginCreateOptions contains the optional parameters for the SharedPrivateLinkResourcesClient.BeginCreate method.

type SharedPrivateLinkResourcesClientBeginDeleteOptions

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

SharedPrivateLinkResourcesClientBeginDeleteOptions contains the optional parameters for the SharedPrivateLinkResourcesClient.BeginDelete method.

type SharedPrivateLinkResourcesClientCreateResponse

type SharedPrivateLinkResourcesClientCreateResponse struct {
	// Concrete proxy resource types can be created by aliasing this type using a specific property type.
	SharedPrivateLinkResource
}

SharedPrivateLinkResourcesClientCreateResponse contains the response from method SharedPrivateLinkResourcesClient.BeginCreate.

type SharedPrivateLinkResourcesClientDeleteResponse

type SharedPrivateLinkResourcesClientDeleteResponse struct {
}

SharedPrivateLinkResourcesClientDeleteResponse contains the response from method SharedPrivateLinkResourcesClient.BeginDelete.

type SharedPrivateLinkResourcesClientGetOptions

type SharedPrivateLinkResourcesClientGetOptions struct {
}

SharedPrivateLinkResourcesClientGetOptions contains the optional parameters for the SharedPrivateLinkResourcesClient.Get method.

type SharedPrivateLinkResourcesClientGetResponse

type SharedPrivateLinkResourcesClientGetResponse struct {
	// Concrete proxy resource types can be created by aliasing this type using a specific property type.
	SharedPrivateLinkResource
}

SharedPrivateLinkResourcesClientGetResponse contains the response from method SharedPrivateLinkResourcesClient.Get.

type SharedPrivateLinkResourcesClientListByWatcherOptions

type SharedPrivateLinkResourcesClientListByWatcherOptions struct {
}

SharedPrivateLinkResourcesClientListByWatcherOptions contains the optional parameters for the SharedPrivateLinkResourcesClient.NewListByWatcherPager method.

type SharedPrivateLinkResourcesClientListByWatcherResponse

type SharedPrivateLinkResourcesClientListByWatcherResponse struct {
	// The response of a SharedPrivateLinkResource list operation.
	SharedPrivateLinkResourceListResult
}

SharedPrivateLinkResourcesClientListByWatcherResponse contains the response from method SharedPrivateLinkResourcesClient.NewListByWatcherPager.

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 Target

type Target struct {
	// The resource-specific properties for this resource.
	Properties TargetPropertiesClassification

	// READ-ONLY; The target resource name.
	Name *string

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

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

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

Target - Concrete proxy resource types can be created by aliasing this type using a specific property type.

func (Target) MarshalJSON

func (t Target) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Target.

func (*Target) UnmarshalJSON

func (t *Target) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Target.

type TargetAuthenticationType

type TargetAuthenticationType string

TargetAuthenticationType - The type of authentication to use when connecting to a target.

const (
	// TargetAuthenticationTypeAAD - The Azure Active Directory authentication.
	TargetAuthenticationTypeAAD TargetAuthenticationType = "Aad"
	// TargetAuthenticationTypeSQL - The SQL password authentication.
	TargetAuthenticationTypeSQL TargetAuthenticationType = "Sql"
)

func PossibleTargetAuthenticationTypeValues

func PossibleTargetAuthenticationTypeValues() []TargetAuthenticationType

PossibleTargetAuthenticationTypeValues returns the possible values for the TargetAuthenticationType const type.

type TargetListResult

type TargetListResult struct {
	// REQUIRED; The Target items on this page
	Value []*Target

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

TargetListResult - The response of a Target list operation.

func (TargetListResult) MarshalJSON

func (t TargetListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TargetListResult.

func (*TargetListResult) UnmarshalJSON

func (t *TargetListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TargetListResult.

type TargetProperties

type TargetProperties struct {
	// REQUIRED; The FQDN host name of the server to use in the connection string when connecting to a target. For example, for
	// an Azure SQL logical server in the Azure commercial cloud, the value might be 'sql-logical-server-22092780.database.windows.net';
	// for an Azure SQL managed instance in the Azure commercial cloud, the value might be 'sql-mi-39441134.767d5869f605.database.windows.net'.
	// Port number and instance name must be specified separately.
	ConnectionServerName *string

	// REQUIRED; The type of authentication to use when connecting to a target.
	TargetAuthenticationType *TargetAuthenticationType

	// REQUIRED; Discriminator property for TargetProperties.
	TargetType *string

	// To use SQL authentication when connecting to targets, specify the vault where the login name and password secrets are stored.
	TargetVault *VaultSecret

	// READ-ONLY; The provisioning state of the resource.
	ProvisioningState *ResourceProvisioningState
}

TargetProperties - The generic properties of a target.

func (*TargetProperties) GetTargetProperties

func (t *TargetProperties) GetTargetProperties() *TargetProperties

GetTargetProperties implements the TargetPropertiesClassification interface for type TargetProperties.

func (TargetProperties) MarshalJSON

func (t TargetProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TargetProperties.

func (*TargetProperties) UnmarshalJSON

func (t *TargetProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TargetProperties.

type TargetPropertiesClassification

type TargetPropertiesClassification interface {
	// GetTargetProperties returns the TargetProperties content of the underlying type.
	GetTargetProperties() *TargetProperties
}

TargetPropertiesClassification provides polymorphic access to related types. Call the interface's GetTargetProperties() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *SQLDbElasticPoolTargetProperties, *SQLDbSingleDatabaseTargetProperties, *SQLMiTargetProperties, *TargetProperties

type TargetsClient

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

TargetsClient contains the methods for the Targets group. Don't use this type directly, use NewTargetsClient() instead.

func NewTargetsClient

func NewTargetsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TargetsClient, error)

NewTargetsClient creates a new instance of TargetsClient with the specified values.

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

func (*TargetsClient) CreateOrUpdate

func (client *TargetsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, watcherName string, targetName string, resource Target, options *TargetsClientCreateOrUpdateOptions) (TargetsClientCreateOrUpdateResponse, error)

CreateOrUpdate - Create a Target If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2025-01-02

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • watcherName - The database watcher name.
  • targetName - The target resource name.
  • resource - Resource create parameters.
  • options - TargetsClientCreateOrUpdateOptions contains the optional parameters for the TargetsClient.CreateOrUpdate method.
Example

Generated from example definition: 2025-01-02/Targets_CreateOrUpdate_MaximumSet_Gen.json

package main

import (
	"context"
	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/databasewatcher/armdatabasewatcher"
	"log"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatabasewatcher.NewClientFactory("49e0fbd3-75e8-44e7-96fd-5b64d9ad818d", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewTargetsClient().CreateOrUpdate(ctx, "apiTest-ddat4p", "databasemo3ej9ih", "monitoringh22eed", armdatabasewatcher.Target{
		Properties: &armdatabasewatcher.SQLDbSingleDatabaseTargetProperties{
			TargetType:               to.Ptr("SqlDb"),
			TargetAuthenticationType: to.Ptr(armdatabasewatcher.TargetAuthenticationTypeAAD),
			ConnectionServerName:     to.Ptr("sqlServero1ihe2"),
			SQLDbResourceID:          to.Ptr("/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/apiTest-ddat4p/providers/Microsoft.Sql/servers/m1/databases/m2"),
		},
	}, 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 = armdatabasewatcher.TargetsClientCreateOrUpdateResponse{
	// 	Target: &armdatabasewatcher.Target{
	// 		Properties: &armdatabasewatcher.SQLDbSingleDatabaseTargetProperties{
	// 			TargetType: to.Ptr("SqlDb"),
	// 			TargetAuthenticationType: to.Ptr(armdatabasewatcher.TargetAuthenticationTypeAAD),
	// 			ConnectionServerName: to.Ptr("sqlServero1ihe2"),
	// 			SQLDbResourceID: to.Ptr("/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/apiTest-ddat4p/providers/Microsoft.Sql/servers/m1/databases/m2"),
	// 			ProvisioningState: to.Ptr(armdatabasewatcher.ResourceProvisioningStateSucceeded),
	// 		},
	// 		ID: to.Ptr("/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/apiTest-px9ma7/providers/Microsoft.DatabaseWatcher/watchers/databasemo3d9sgt/targets/monitoringzkndgm"),
	// 		Name: to.Ptr("monitoringzkndgm"),
	// 		Type: to.Ptr("microsoft.databasewatcher/watchers/targets"),
	// 		SystemData: &armdatabasewatcher.SystemData{
	// 			CreatedBy: to.Ptr("enbpvlpqbwd"),
	// 			CreatedByType: to.Ptr(armdatabasewatcher.CreatedByTypeUser),
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T15:38:47.092Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("mxp"),
	// 			LastModifiedByType: to.Ptr(armdatabasewatcher.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T15:38:47.092Z"); return t}()),
	// 		},
	// 	},
	// }
}
Output:

func (*TargetsClient) Delete

func (client *TargetsClient) Delete(ctx context.Context, resourceGroupName string, watcherName string, targetName string, options *TargetsClientDeleteOptions) (TargetsClientDeleteResponse, error)

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

Generated from API version 2025-01-02

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • watcherName - The database watcher name.
  • targetName - The target resource name.
  • options - TargetsClientDeleteOptions contains the optional parameters for the TargetsClient.Delete method.
Example

Generated from example definition: 2025-01-02/Targets_Delete_MaximumSet_Gen.json

package main

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

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatabasewatcher.NewClientFactory("49e0fbd3-75e8-44e7-96fd-5b64d9ad818d", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewTargetsClient().Delete(ctx, "apiTest-ddat4p", "databasemo3ej9ih", "monitoringh22eed", 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 = armdatabasewatcher.TargetsClientDeleteResponse{
	// }
}
Output:

func (*TargetsClient) Get

func (client *TargetsClient) Get(ctx context.Context, resourceGroupName string, watcherName string, targetName string, options *TargetsClientGetOptions) (TargetsClientGetResponse, error)

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

Generated from API version 2025-01-02

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • watcherName - The database watcher name.
  • targetName - The target resource name.
  • options - TargetsClientGetOptions contains the optional parameters for the TargetsClient.Get method.
Example

Generated from example definition: 2025-01-02/Targets_Get_MaximumSet_Gen.json

package main

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

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatabasewatcher.NewClientFactory("49e0fbd3-75e8-44e7-96fd-5b64d9ad818d", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewTargetsClient().Get(ctx, "apiTest-ddat4p", "databasemo3ej9ih", "monitoringh22eed", 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 = armdatabasewatcher.TargetsClientGetResponse{
	// 	Target: &armdatabasewatcher.Target{
	// 		Properties: &armdatabasewatcher.SQLDbSingleDatabaseTargetProperties{
	// 			TargetType: to.Ptr("SqlDb"),
	// 			TargetAuthenticationType: to.Ptr(armdatabasewatcher.TargetAuthenticationTypeAAD),
	// 			ConnectionServerName: to.Ptr("sqlServero1ihe2"),
	// 			SQLDbResourceID: to.Ptr("/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/apiTest-ddat4p/providers/Microsoft.Sql/servers/m1/databases/m2"),
	// 			ProvisioningState: to.Ptr(armdatabasewatcher.ResourceProvisioningStateSucceeded),
	// 		},
	// 		ID: to.Ptr("/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/apiTest-px9ma7/providers/Microsoft.DatabaseWatcher/watchers/databasemo3d9sgt/targets/monitoringzkndgm"),
	// 		Name: to.Ptr("monitoringzkndgm"),
	// 		Type: to.Ptr("microsoft.databasewatcher/watchers/targets"),
	// 		SystemData: &armdatabasewatcher.SystemData{
	// 			CreatedBy: to.Ptr("enbpvlpqbwd"),
	// 			CreatedByType: to.Ptr(armdatabasewatcher.CreatedByTypeUser),
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T15:38:47.092Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("mxp"),
	// 			LastModifiedByType: to.Ptr(armdatabasewatcher.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T15:38:47.092Z"); return t}()),
	// 		},
	// 	},
	// }
}
Output:

func (*TargetsClient) NewListByWatcherPager

func (client *TargetsClient) NewListByWatcherPager(resourceGroupName string, watcherName string, options *TargetsClientListByWatcherOptions) *runtime.Pager[TargetsClientListByWatcherResponse]

NewListByWatcherPager - List Target resources by Watcher

Generated from API version 2025-01-02

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • watcherName - The database watcher name.
  • options - TargetsClientListByWatcherOptions contains the optional parameters for the TargetsClient.NewListByWatcherPager method.
Example

Generated from example definition: 2025-01-02/Targets_ListByWatcher_MaximumSet_Gen.json

package main

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

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatabasewatcher.NewClientFactory("49e0fbd3-75e8-44e7-96fd-5b64d9ad818d", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewTargetsClient().NewListByWatcherPager("apiTest-ddat4p", "databasemo3ej9ih", 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 = armdatabasewatcher.TargetsClientListByWatcherResponse{
		// 	TargetListResult: armdatabasewatcher.TargetListResult{
		// 		Value: []*armdatabasewatcher.Target{
		// 			{
		// 				ID: to.Ptr("/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/apiTest-px9ma7/providers/Microsoft.DatabaseWatcher/watchers/databasemo3d9sgt/targets/monitoringzkndgm"),
		// 				Name: to.Ptr("monitoringzkndgm"),
		// 				Type: to.Ptr("microsoft.databasewatcher/watchers/targets"),
		// 				Properties: &armdatabasewatcher.SQLDbSingleDatabaseTargetProperties{
		// 					TargetType: to.Ptr("SqlDb"),
		// 					TargetAuthenticationType: to.Ptr(armdatabasewatcher.TargetAuthenticationTypeAAD),
		// 					ConnectionServerName: to.Ptr("sqlServero1ihe2"),
		// 					SQLDbResourceID: to.Ptr("/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/apiTest-ddat4p/providers/Microsoft.Sql/servers/m1/databases/m2"),
		// 					ProvisioningState: to.Ptr(armdatabasewatcher.ResourceProvisioningStateSucceeded),
		// 				},
		// 				SystemData: &armdatabasewatcher.SystemData{
		// 					CreatedBy: to.Ptr("enbpvlpqbwd"),
		// 					CreatedByType: to.Ptr(armdatabasewatcher.CreatedByTypeUser),
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T15:38:47.092Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("mxp"),
		// 					LastModifiedByType: to.Ptr(armdatabasewatcher.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T15:38:47.092Z"); return t}()),
		// 				},
		// 			},
		// 		},
		// 		NextLink: to.Ptr("https://microsoft.com/a"),
		// 	},
		// }
	}
}
Output:

type TargetsClientCreateOrUpdateOptions

type TargetsClientCreateOrUpdateOptions struct {
}

TargetsClientCreateOrUpdateOptions contains the optional parameters for the TargetsClient.CreateOrUpdate method.

type TargetsClientCreateOrUpdateResponse

type TargetsClientCreateOrUpdateResponse struct {
	// Concrete proxy resource types can be created by aliasing this type using a specific property type.
	Target
}

TargetsClientCreateOrUpdateResponse contains the response from method TargetsClient.CreateOrUpdate.

type TargetsClientDeleteOptions

type TargetsClientDeleteOptions struct {
}

TargetsClientDeleteOptions contains the optional parameters for the TargetsClient.Delete method.

type TargetsClientDeleteResponse

type TargetsClientDeleteResponse struct {
}

TargetsClientDeleteResponse contains the response from method TargetsClient.Delete.

type TargetsClientGetOptions

type TargetsClientGetOptions struct {
}

TargetsClientGetOptions contains the optional parameters for the TargetsClient.Get method.

type TargetsClientGetResponse

type TargetsClientGetResponse struct {
	// Concrete proxy resource types can be created by aliasing this type using a specific property type.
	Target
}

TargetsClientGetResponse contains the response from method TargetsClient.Get.

type TargetsClientListByWatcherOptions

type TargetsClientListByWatcherOptions struct {
}

TargetsClientListByWatcherOptions contains the optional parameters for the TargetsClient.NewListByWatcherPager method.

type TargetsClientListByWatcherResponse

type TargetsClientListByWatcherResponse struct {
	// The response of a Target list operation.
	TargetListResult
}

TargetsClientListByWatcherResponse contains the response from method TargetsClient.NewListByWatcherPager.

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

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

MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentity.

func (*UserAssignedIdentity) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedIdentity.

type ValidationIssue

type ValidationIssue struct {
	// READ-ONLY; The error code of the issue.
	ErrorCode *string

	// READ-ONLY; The error message of the issue.
	ErrorMessage *string

	// READ-ONLY; The recommendation for resolving the issue.
	RecommendationMessage *string

	// READ-ONLY; The additional details for the issue.
	AdditionalDetails *string

	// READ-ONLY; The URL related to resolving the issue.
	RecommendationURL *string

	// READ-ONLY; The resource ID of the Azure resource related to the issue.
	RelatedResourceID *string

	// READ-ONLY; The type of the Azure resource related to the issue.
	RelatedResourceType *string
}

ValidationIssue - The model of a health validation issue.

func (ValidationIssue) MarshalJSON

func (v ValidationIssue) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ValidationIssue.

func (*ValidationIssue) UnmarshalJSON

func (v *ValidationIssue) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ValidationIssue.

type ValidationStatus

type ValidationStatus string

ValidationStatus - Health validation status.

const (
	// ValidationStatusCanceled - Health validation was canceled.
	ValidationStatusCanceled ValidationStatus = "Canceled"
	// ValidationStatusFailed - Health validation failed.
	ValidationStatusFailed ValidationStatus = "Failed"
	// ValidationStatusNotStarted - Health validation has not started.
	ValidationStatusNotStarted ValidationStatus = "NotStarted"
	// ValidationStatusRunning - Health validation is running.
	ValidationStatusRunning ValidationStatus = "Running"
	// ValidationStatusSucceeded - Health validation completed successfully.
	ValidationStatusSucceeded ValidationStatus = "Succeeded"
	// ValidationStatusTimedOut - Health validation timed out.
	ValidationStatusTimedOut ValidationStatus = "TimedOut"
)

func PossibleValidationStatusValues

func PossibleValidationStatusValues() []ValidationStatus

PossibleValidationStatusValues returns the possible values for the ValidationStatus const type.

type VaultSecret

type VaultSecret struct {
	// The Azure resource ID of the Key Vault instance storing database authentication secrets.
	AkvResourceID *string

	// The path to the Key Vault secret storing the password for authentication to a target.
	AkvTargetPassword *string

	// The path to the Key Vault secret storing the login name (aka user name, aka account name) for authentication to a target.
	AkvTargetUser *string
}

VaultSecret - The vault specific details required if using SQL authentication to connect to a target.

func (VaultSecret) MarshalJSON

func (v VaultSecret) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VaultSecret.

func (*VaultSecret) UnmarshalJSON

func (v *VaultSecret) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VaultSecret.

type Watcher

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

	// READ-ONLY; The database watcher name.
	Name *string

	// The managed service identities assigned to this resource.
	Identity *ManagedServiceIdentityV4

	// The resource-specific properties for this resource.
	Properties *WatcherProperties

	// 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; 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
}

Watcher - The DatabaseWatcherProviderHub resource.

func (Watcher) MarshalJSON

func (w Watcher) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Watcher.

func (*Watcher) UnmarshalJSON

func (w *Watcher) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Watcher.

type WatcherListResult

type WatcherListResult struct {
	// REQUIRED; The Watcher items on this page
	Value []*Watcher

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

WatcherListResult - The response of a Watcher list operation.

func (WatcherListResult) MarshalJSON

func (w WatcherListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WatcherListResult.

func (*WatcherListResult) UnmarshalJSON

func (w *WatcherListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WatcherListResult.

type WatcherProperties

type WatcherProperties struct {
	// The data store for collected monitoring data.
	Datastore *Datastore

	// The resource ID of a user-assigned managed identity that will be assigned to a new alert rule.
	DefaultAlertRuleIdentityResourceID *string

	// READ-ONLY; The provisioning state of the resource watcher.
	ProvisioningState *ProvisioningState

	// READ-ONLY; The monitoring collection status of the watcher.
	Status *WatcherStatus
}

WatcherProperties - The RP specific properties of the resource.

func (WatcherProperties) MarshalJSON

func (w WatcherProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WatcherProperties.

func (*WatcherProperties) UnmarshalJSON

func (w *WatcherProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WatcherProperties.

type WatcherStatus

type WatcherStatus string

WatcherStatus - The monitoring collection status of a watcher.

const (
	// WatcherStatusDeleting - Denotes the watcher is in a deleting state.
	WatcherStatusDeleting WatcherStatus = "Deleting"
	// WatcherStatusRunning - Denotes the watcher is in a running state.
	WatcherStatusRunning WatcherStatus = "Running"
	// WatcherStatusStarting - Denotes the watcher is in a starting state.
	WatcherStatusStarting WatcherStatus = "Starting"
	// WatcherStatusStopped - Denotes the watcher is in a stopped state.
	WatcherStatusStopped WatcherStatus = "Stopped"
	// WatcherStatusStopping - Denotes the watcher is in a stopping state.
	WatcherStatusStopping WatcherStatus = "Stopping"
)

func PossibleWatcherStatusValues

func PossibleWatcherStatusValues() []WatcherStatus

PossibleWatcherStatusValues returns the possible values for the WatcherStatus const type.

type WatcherUpdate

type WatcherUpdate struct {
	// The managed service identities assigned to this resource.
	Identity *ManagedServiceIdentityV4

	// The resource-specific properties for this resource.
	Properties *WatcherUpdateProperties

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

WatcherUpdate - The type used for update operations of the Watcher.

func (WatcherUpdate) MarshalJSON

func (w WatcherUpdate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WatcherUpdate.

func (*WatcherUpdate) UnmarshalJSON

func (w *WatcherUpdate) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WatcherUpdate.

type WatcherUpdateProperties

type WatcherUpdateProperties struct {
	// The data store for collected monitoring data.
	Datastore *Datastore

	// The resource ID of a user-assigned managed identity that will be assigned to a new alert rule.
	DefaultAlertRuleIdentityResourceID *string
}

WatcherUpdateProperties - The updatable properties of the Watcher.

func (WatcherUpdateProperties) MarshalJSON

func (w WatcherUpdateProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WatcherUpdateProperties.

func (*WatcherUpdateProperties) UnmarshalJSON

func (w *WatcherUpdateProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WatcherUpdateProperties.

type WatchersClient

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

WatchersClient contains the methods for the Watchers group. Don't use this type directly, use NewWatchersClient() instead.

func NewWatchersClient

func NewWatchersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WatchersClient, error)

NewWatchersClient creates a new instance of WatchersClient with the specified values.

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

func (*WatchersClient) BeginCreateOrUpdate

func (client *WatchersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, watcherName string, resource Watcher, options *WatchersClientBeginCreateOrUpdateOptions) (*runtime.Poller[WatchersClientCreateOrUpdateResponse], error)

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

Generated from API version 2025-01-02

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • watcherName - The database watcher name.
  • resource - Resource create parameters.
  • options - WatchersClientBeginCreateOrUpdateOptions contains the optional parameters for the WatchersClient.BeginCreateOrUpdate method.
Example

Generated from example definition: 2025-01-02/Watchers_CreateOrUpdate_MaximumSet_Gen.json

package main

import (
	"context"
	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/databasewatcher/armdatabasewatcher"
	"log"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatabasewatcher.NewClientFactory("A76F9850-996B-40B3-94D4-C98110A0EEC9", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewWatchersClient().BeginCreateOrUpdate(ctx, "rgWatcher", "testWatcher", armdatabasewatcher.Watcher{
		Properties: &armdatabasewatcher.WatcherProperties{
			Status:                             to.Ptr(armdatabasewatcher.WatcherStatusStarting),
			DefaultAlertRuleIdentityResourceID: to.Ptr("/subscriptions/469DD77C-C8DB-47B7-B9E1-72D29F8C878B/resourceGroups/rgWatcher/providers/Microsoft.ManagedIdentity/userAssignedIdentities/3pmtest"),
			Datastore: &armdatabasewatcher.Datastore{
				AdxClusterResourceID:    to.Ptr("/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/apiTest/providers/Microsoft.Kusto/clusters/apiTestKusto"),
				KustoClusterURI:         to.Ptr("https://kustouri-adx.eastus.kusto.windows.net"),
				KustoClusterDisplayName: to.Ptr("kustoUri-adx"),
				KustoDataIngestionURI:   to.Ptr("https://ingest-kustouri-adx.eastus.kusto.windows.net"),
				KustoDatabaseName:       to.Ptr("kustoDatabaseName1"),
				KustoManagementURL:      to.Ptr("https://portal.azure.com/"),
				KustoOfferingType:       to.Ptr(armdatabasewatcher.KustoOfferingTypeAdx),
			},
		},
		Identity: &armdatabasewatcher.ManagedServiceIdentityV4{
			Type: to.Ptr(armdatabasewatcher.ManagedServiceIdentityTypeSystemAssigned),
		},
		Tags:     map[string]*string{},
		Location: to.Ptr("eastus2"),
	}, 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 = armdatabasewatcher.WatchersClientCreateOrUpdateResponse{
	// 	Watcher: &armdatabasewatcher.Watcher{
	// 		Properties: &armdatabasewatcher.WatcherProperties{
	// 			Status: to.Ptr(armdatabasewatcher.WatcherStatusStarting),
	// 			DefaultAlertRuleIdentityResourceID: to.Ptr("/subscriptions/469DD77C-C8DB-47B7-B9E1-72D29F8C878B/resourceGroups/rgWatcher/providers/Microsoft.ManagedIdentity/userAssignedIdentities/3pmtest"),
	// 			Datastore: &armdatabasewatcher.Datastore{
	// 				AdxClusterResourceID: to.Ptr("/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/apiTest/providers/Microsoft.Kusto/clusters/apiTestKusto"),
	// 				KustoClusterURI: to.Ptr("https://kustouri-adx.eastus.kusto.windows.net"),
	// 				KustoClusterDisplayName: to.Ptr("kustoUri-adx"),
	// 				KustoDataIngestionURI: to.Ptr("https://ingest-kustouri-adx.eastus.kusto.windows.net"),
	// 				KustoDatabaseName: to.Ptr("kustoDatabaseName1"),
	// 				KustoManagementURL: to.Ptr("https://portal.azure.com/"),
	// 				KustoOfferingType: to.Ptr(armdatabasewatcher.KustoOfferingTypeAdx),
	// 			},
	// 			ProvisioningState: to.Ptr(armdatabasewatcher.ProvisioningStateSucceeded),
	// 		},
	// 		Identity: &armdatabasewatcher.ManagedServiceIdentityV4{
	// 			Type: to.Ptr(armdatabasewatcher.ManagedServiceIdentityTypeSystemAssigned),
	// 			UserAssignedIdentities: map[string]*armdatabasewatcher.UserAssignedIdentity{
	// 			},
	// 			PrincipalID: to.Ptr("49e0fbd3-75e8-44e7-96fd-5b64d9ad818d"),
	// 			TenantID: to.Ptr("49e0fbd3-75e8-44e7-96fd-5b64d9ad818d"),
	// 		},
	// 		Tags: map[string]*string{
	// 		},
	// 		Location: to.Ptr("eastus2"),
	// 		ID: to.Ptr("/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/dummyrg/providers/Microsoft.DatabaseWatcher/watchers/myWatcher"),
	// 		Name: to.Ptr("myWatcher"),
	// 		Type: to.Ptr("microsoft.databasewatcher/watchers"),
	// 		SystemData: &armdatabasewatcher.SystemData{
	// 			CreatedBy: to.Ptr("enbpvlpqbwd"),
	// 			CreatedByType: to.Ptr(armdatabasewatcher.CreatedByTypeUser),
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T15:38:47.092Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("mxp"),
	// 			LastModifiedByType: to.Ptr(armdatabasewatcher.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T15:38:47.092Z"); return t}()),
	// 		},
	// 	},
	// }
}
Output:

func (*WatchersClient) BeginDelete

func (client *WatchersClient) BeginDelete(ctx context.Context, resourceGroupName string, watcherName string, options *WatchersClientBeginDeleteOptions) (*runtime.Poller[WatchersClientDeleteResponse], error)

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

Generated from API version 2025-01-02

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • watcherName - The database watcher name.
  • options - WatchersClientBeginDeleteOptions contains the optional parameters for the WatchersClient.BeginDelete method.
Example

Generated from example definition: 2025-01-02/Watchers_Delete_MaximumSet_Gen.json

package main

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

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatabasewatcher.NewClientFactory("A76F9850-996B-40B3-94D4-C98110A0EEC9", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewWatchersClient().BeginDelete(ctx, "rgWatcher", "testWatcher", 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 (*WatchersClient) BeginStart

func (client *WatchersClient) BeginStart(ctx context.Context, resourceGroupName string, watcherName string, options *WatchersClientBeginStartOptions) (*runtime.Poller[WatchersClientStartResponse], error)

BeginStart - The action to start monitoring all targets configured for a database watcher. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2025-01-02

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • watcherName - The database watcher name.
  • options - WatchersClientBeginStartOptions contains the optional parameters for the WatchersClient.BeginStart method.
Example

Generated from example definition: 2025-01-02/Watchers_Start_MaximumSet_Gen.json

package main

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

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatabasewatcher.NewClientFactory("A76F9850-996B-40B3-94D4-C98110A0EEC9", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewWatchersClient().BeginStart(ctx, "rgWatcher", "testWatcher", 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 = armdatabasewatcher.WatchersClientStartResponse{
	// }
}
Output:

func (*WatchersClient) BeginStop

func (client *WatchersClient) BeginStop(ctx context.Context, resourceGroupName string, watcherName string, options *WatchersClientBeginStopOptions) (*runtime.Poller[WatchersClientStopResponse], error)

BeginStop - The action to stop monitoring all targets configured for a database watcher. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2025-01-02

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • watcherName - The database watcher name.
  • options - WatchersClientBeginStopOptions contains the optional parameters for the WatchersClient.BeginStop method.
Example

Generated from example definition: 2025-01-02/Watchers_Stop_MaximumSet_Gen.json

package main

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

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatabasewatcher.NewClientFactory("A76F9850-996B-40B3-94D4-C98110A0EEC9", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewWatchersClient().BeginStop(ctx, "rgWatcher", "myWatcher", 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 = armdatabasewatcher.WatchersClientStopResponse{
	// }
}
Output:

func (*WatchersClient) BeginUpdate

func (client *WatchersClient) BeginUpdate(ctx context.Context, resourceGroupName string, watcherName string, properties WatcherUpdate, options *WatchersClientBeginUpdateOptions) (*runtime.Poller[WatchersClientUpdateResponse], error)

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

Generated from API version 2025-01-02

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • watcherName - The database watcher name.
  • properties - The resource properties to be updated.
  • options - WatchersClientBeginUpdateOptions contains the optional parameters for the WatchersClient.BeginUpdate method.
Example

Generated from example definition: 2025-01-02/Watchers_Update_MaximumSet_Gen.json

package main

import (
	"context"
	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/databasewatcher/armdatabasewatcher"
	"log"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatabasewatcher.NewClientFactory("A76F9850-996B-40B3-94D4-C98110A0EEC9", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewWatchersClient().BeginUpdate(ctx, "rgWatcher", "testWatcher", armdatabasewatcher.WatcherUpdate{
		Identity: &armdatabasewatcher.ManagedServiceIdentityV4{
			Type: to.Ptr(armdatabasewatcher.ManagedServiceIdentityTypeSystemAssigned),
		},
		Properties: &armdatabasewatcher.WatcherUpdateProperties{
			Datastore: &armdatabasewatcher.Datastore{
				AdxClusterResourceID:    to.Ptr("/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/apiTest/providers/Microsoft.Kusto/clusters/apiTestKusto"),
				KustoClusterURI:         to.Ptr("https://kustouri-adx.eastus.kusto.windows.net"),
				KustoClusterDisplayName: to.Ptr("kustoUri-adx"),
				KustoDataIngestionURI:   to.Ptr("https://ingest-kustouri-adx.eastus.kusto.windows.net"),
				KustoDatabaseName:       to.Ptr("kustoDatabaseName1"),
				KustoManagementURL:      to.Ptr("https://portal.azure.com/"),
				KustoOfferingType:       to.Ptr(armdatabasewatcher.KustoOfferingTypeAdx),
			},
			DefaultAlertRuleIdentityResourceID: to.Ptr("/subscriptions/469DD77C-C8DB-47B7-B9E1-72D29F8C878B/resourceGroups/rgWatcher/providers/Microsoft.ManagedIdentity/userAssignedIdentities/newtest"),
		},
		Tags: map[string]*string{},
	}, 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 = armdatabasewatcher.WatchersClientUpdateResponse{
	// 	Watcher: &armdatabasewatcher.Watcher{
	// 		Properties: &armdatabasewatcher.WatcherProperties{
	// 			Status: to.Ptr(armdatabasewatcher.WatcherStatusStarting),
	// 			DefaultAlertRuleIdentityResourceID: to.Ptr("/subscriptions/469DD77C-C8DB-47B7-B9E1-72D29F8C878B/resourceGroups/rgWatcher/providers/Microsoft.ManagedIdentity/userAssignedIdentities/3pmtest"),
	// 			Datastore: &armdatabasewatcher.Datastore{
	// 				AdxClusterResourceID: to.Ptr("/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/apiTest/providers/Microsoft.Kusto/clusters/apiTestKusto"),
	// 				KustoClusterURI: to.Ptr("https://kustouri-adx.eastus.kusto.windows.net"),
	// 				KustoClusterDisplayName: to.Ptr("kustoUri-adx"),
	// 				KustoDataIngestionURI: to.Ptr("https://ingest-kustouri-adx.eastus.kusto.windows.net"),
	// 				KustoDatabaseName: to.Ptr("kustoDatabaseName1"),
	// 				KustoManagementURL: to.Ptr("https://portal.azure.com/"),
	// 				KustoOfferingType: to.Ptr(armdatabasewatcher.KustoOfferingTypeAdx),
	// 			},
	// 			ProvisioningState: to.Ptr(armdatabasewatcher.ProvisioningStateSucceeded),
	// 		},
	// 		Identity: &armdatabasewatcher.ManagedServiceIdentityV4{
	// 			Type: to.Ptr(armdatabasewatcher.ManagedServiceIdentityTypeSystemAssigned),
	// 			UserAssignedIdentities: map[string]*armdatabasewatcher.UserAssignedIdentity{
	// 			},
	// 			PrincipalID: to.Ptr("49e0fbd3-75e8-44e7-96fd-5b64d9ad818d"),
	// 			TenantID: to.Ptr("49e0fbd3-75e8-44e7-96fd-5b64d9ad818d"),
	// 		},
	// 		Tags: map[string]*string{
	// 		},
	// 		Location: to.Ptr("eastus2"),
	// 		ID: to.Ptr("/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/dummyrg/providers/Microsoft.DatabaseWatcher/watchers/myWatcher"),
	// 		Name: to.Ptr("myWatcher"),
	// 		Type: to.Ptr("microsoft.databasewatcher/watchers"),
	// 		SystemData: &armdatabasewatcher.SystemData{
	// 			CreatedBy: to.Ptr("enbpvlpqbwd"),
	// 			CreatedByType: to.Ptr(armdatabasewatcher.CreatedByTypeUser),
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T15:38:47.092Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("mxp"),
	// 			LastModifiedByType: to.Ptr(armdatabasewatcher.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T15:38:47.092Z"); return t}()),
	// 		},
	// 	},
	// }
}
Output:

func (*WatchersClient) Get

func (client *WatchersClient) Get(ctx context.Context, resourceGroupName string, watcherName string, options *WatchersClientGetOptions) (WatchersClientGetResponse, error)

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

Generated from API version 2025-01-02

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • watcherName - The database watcher name.
  • options - WatchersClientGetOptions contains the optional parameters for the WatchersClient.Get method.
Example

Generated from example definition: 2025-01-02/Watchers_Get_MaximumSet_Gen.json

package main

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

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatabasewatcher.NewClientFactory("A76F9850-996B-40B3-94D4-C98110A0EEC9", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewWatchersClient().Get(ctx, "rgWatcher", "myWatcher", 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 = armdatabasewatcher.WatchersClientGetResponse{
	// 	Watcher: &armdatabasewatcher.Watcher{
	// 		Properties: &armdatabasewatcher.WatcherProperties{
	// 			Status: to.Ptr(armdatabasewatcher.WatcherStatusStarting),
	// 			DefaultAlertRuleIdentityResourceID: to.Ptr("/subscriptions/469DD77C-C8DB-47B7-B9E1-72D29F8C878B/resourceGroups/rgWatcher/providers/Microsoft.ManagedIdentity/userAssignedIdentities/3pmtest"),
	// 			Datastore: &armdatabasewatcher.Datastore{
	// 				AdxClusterResourceID: to.Ptr("/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/apiTest/providers/Microsoft.Kusto/clusters/apiTestKusto"),
	// 				KustoClusterURI: to.Ptr("https://kustouri-adx.eastus.kusto.windows.net"),
	// 				KustoClusterDisplayName: to.Ptr("kustoUri-adx"),
	// 				KustoDataIngestionURI: to.Ptr("https://ingest-kustouri-adx.eastus.kusto.windows.net"),
	// 				KustoDatabaseName: to.Ptr("kustoDatabaseName1"),
	// 				KustoManagementURL: to.Ptr("https://portal.azure.com/"),
	// 				KustoOfferingType: to.Ptr(armdatabasewatcher.KustoOfferingTypeAdx),
	// 			},
	// 			ProvisioningState: to.Ptr(armdatabasewatcher.ProvisioningStateSucceeded),
	// 		},
	// 		Identity: &armdatabasewatcher.ManagedServiceIdentityV4{
	// 			UserAssignedIdentities: map[string]*armdatabasewatcher.UserAssignedIdentity{
	// 			},
	// 			PrincipalID: to.Ptr("49e0fbd3-75e8-44e7-96fd-5b64d9ad818d"),
	// 			TenantID: to.Ptr("49e0fbd3-75e8-44e7-96fd-5b64d9ad818d"),
	// 		},
	// 		Tags: map[string]*string{
	// 		},
	// 		Location: to.Ptr("eastus2"),
	// 		ID: to.Ptr("/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/dummyrg/providers/Microsoft.DatabaseWatcher/watchers/myWatcher"),
	// 		Name: to.Ptr("myWatcher"),
	// 		Type: to.Ptr("microsoft.databasewatcher/watchers"),
	// 		SystemData: &armdatabasewatcher.SystemData{
	// 			CreatedBy: to.Ptr("enbpvlpqbwd"),
	// 			CreatedByType: to.Ptr(armdatabasewatcher.CreatedByTypeUser),
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T15:38:47.092Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("mxp"),
	// 			LastModifiedByType: to.Ptr(armdatabasewatcher.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T15:38:47.092Z"); return t}()),
	// 		},
	// 	},
	// }
}
Output:

func (*WatchersClient) NewListByResourceGroupPager

func (client *WatchersClient) NewListByResourceGroupPager(resourceGroupName string, options *WatchersClientListByResourceGroupOptions) *runtime.Pager[WatchersClientListByResourceGroupResponse]

NewListByResourceGroupPager - List Watcher resources by resource group

Generated from API version 2025-01-02

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

Generated from example definition: 2025-01-02/Watchers_ListByResourceGroup_MaximumSet_Gen.json

package main

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

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatabasewatcher.NewClientFactory("A76F9850-996B-40B3-94D4-C98110A0EEC9", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewWatchersClient().NewListByResourceGroupPager("rgWatcher", 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 = armdatabasewatcher.WatchersClientListByResourceGroupResponse{
		// 	WatcherListResult: armdatabasewatcher.WatcherListResult{
		// 		Value: []*armdatabasewatcher.Watcher{
		// 			{
		// 				ID: to.Ptr("/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/dummyrg/providers/Microsoft.DatabaseWatcher/watchers/myWatcher"),
		// 				Name: to.Ptr("myWatcher"),
		// 				Type: to.Ptr("microsoft.databasewatcher/watchers"),
		// 				Location: to.Ptr("West US"),
		// 				Tags: map[string]*string{
		// 				},
		// 				Identity: &armdatabasewatcher.ManagedServiceIdentityV4{
		// 					UserAssignedIdentities: map[string]*armdatabasewatcher.UserAssignedIdentity{
		// 					},
		// 					PrincipalID: to.Ptr("49e0fbd3-75e8-44e7-96fd-5b64d9ad818d"),
		// 					TenantID: to.Ptr("49e0fbd3-75e8-44e7-96fd-5b64d9ad818d"),
		// 				},
		// 				Properties: &armdatabasewatcher.WatcherProperties{
		// 					Status: to.Ptr(armdatabasewatcher.WatcherStatusStarting),
		// 					ProvisioningState: to.Ptr(armdatabasewatcher.ProvisioningStateSucceeded),
		// 					DefaultAlertRuleIdentityResourceID: to.Ptr("/subscriptions/469DD77C-C8DB-47B7-B9E1-72D29F8C878B/resourceGroups/rgWatcher/providers/Microsoft.ManagedIdentity/userAssignedIdentities/3pmtest"),
		// 					Datastore: &armdatabasewatcher.Datastore{
		// 						AdxClusterResourceID: to.Ptr("/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/apiTest/providers/Microsoft.Kusto/clusters/apiTestKusto"),
		// 						KustoClusterURI: to.Ptr("https://kustouri-adx.eastus.kusto.windows.net"),
		// 						KustoClusterDisplayName: to.Ptr("kustoUri-adx"),
		// 						KustoDataIngestionURI: to.Ptr("https://ingest-kustouri-adx.eastus.kusto.windows.net"),
		// 						KustoDatabaseName: to.Ptr("kustoDatabaseName1"),
		// 						KustoManagementURL: to.Ptr("https://portal.azure.com/"),
		// 						KustoOfferingType: to.Ptr(armdatabasewatcher.KustoOfferingTypeAdx),
		// 					},
		// 				},
		// 				SystemData: &armdatabasewatcher.SystemData{
		// 					CreatedBy: to.Ptr("enbpvlpqbwd"),
		// 					CreatedByType: to.Ptr(armdatabasewatcher.CreatedByTypeUser),
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T15:38:47.092Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("mxp"),
		// 					LastModifiedByType: to.Ptr(armdatabasewatcher.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T15:38:47.092Z"); return t}()),
		// 				},
		// 			},
		// 			{
		// 				ID: to.Ptr("/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/apiTest-4sz1jg/providers/Microsoft.DatabaseWatcher/watchers/databasemo4o4zdf"),
		// 				Name: to.Ptr("databasemo4o4zdf"),
		// 				Type: to.Ptr("microsoft.databasewatcher/watchers"),
		// 				Location: to.Ptr("westus"),
		// 				Properties: &armdatabasewatcher.WatcherProperties{
		// 					Status: to.Ptr(armdatabasewatcher.WatcherStatusStarting),
		// 					ProvisioningState: to.Ptr(armdatabasewatcher.ProvisioningStateSucceeded),
		// 					DefaultAlertRuleIdentityResourceID: to.Ptr("/subscriptions/469DD77C-C8DB-47B7-B9E1-72D29F8C878B/resourceGroups/rgWatcher/providers/Microsoft.ManagedIdentity/userAssignedIdentities/3pmtest"),
		// 					Datastore: &armdatabasewatcher.Datastore{
		// 						AdxClusterResourceID: to.Ptr("/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/apiTest/providers/Microsoft.Kusto/clusters/apiTestKusto"),
		// 						KustoClusterURI: to.Ptr("https://kustouri-adx.eastus.kusto.windows.net"),
		// 						KustoClusterDisplayName: to.Ptr("kustoUri-adx"),
		// 						KustoDataIngestionURI: to.Ptr("https://ingest-kustouri-adx.eastus.kusto.windows.net"),
		// 						KustoDatabaseName: to.Ptr("kustoDatabaseName1"),
		// 						KustoManagementURL: to.Ptr("https://portal.azure.com/"),
		// 						KustoOfferingType: to.Ptr(armdatabasewatcher.KustoOfferingTypeAdx),
		// 					},
		// 				},
		// 				Identity: &armdatabasewatcher.ManagedServiceIdentityV4{
		// 					UserAssignedIdentities: map[string]*armdatabasewatcher.UserAssignedIdentity{
		// 					},
		// 					PrincipalID: to.Ptr("49e0fbd3-75e8-44e7-96fd-5b64d9ad818d"),
		// 					TenantID: to.Ptr("49e0fbd3-75e8-44e7-96fd-5b64d9ad818d"),
		// 				},
		// 				Tags: map[string]*string{
		// 				},
		// 				SystemData: &armdatabasewatcher.SystemData{
		// 					CreatedBy: to.Ptr("enbpvlpqbwd"),
		// 					CreatedByType: to.Ptr(armdatabasewatcher.CreatedByTypeUser),
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T15:38:47.092Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("mxp"),
		// 					LastModifiedByType: to.Ptr(armdatabasewatcher.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T15:38:47.092Z"); return t}()),
		// 				},
		// 			},
		// 			{
		// 				ID: to.Ptr("/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/apiTest-d77ftn/providers/Microsoft.DatabaseWatcher/watchers/databasemosn3h6l"),
		// 				Name: to.Ptr("databasemosn3h6l"),
		// 				Type: to.Ptr("microsoft.databasewatcher/watchers"),
		// 				Location: to.Ptr("westus"),
		// 				Properties: &armdatabasewatcher.WatcherProperties{
		// 					Status: to.Ptr(armdatabasewatcher.WatcherStatusStarting),
		// 					ProvisioningState: to.Ptr(armdatabasewatcher.ProvisioningStateSucceeded),
		// 					DefaultAlertRuleIdentityResourceID: to.Ptr("/subscriptions/469DD77C-C8DB-47B7-B9E1-72D29F8C878B/resourceGroups/rgWatcher/providers/Microsoft.ManagedIdentity/userAssignedIdentities/3pmtest"),
		// 					Datastore: &armdatabasewatcher.Datastore{
		// 						AdxClusterResourceID: to.Ptr("/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/apiTest/providers/Microsoft.Kusto/clusters/apiTestKusto"),
		// 						KustoClusterURI: to.Ptr("https://kustouri-adx.eastus.kusto.windows.net"),
		// 						KustoClusterDisplayName: to.Ptr("kustoUri-adx"),
		// 						KustoDataIngestionURI: to.Ptr("https://ingest-kustouri-adx.eastus.kusto.windows.net"),
		// 						KustoDatabaseName: to.Ptr("kustoDatabaseName1"),
		// 						KustoManagementURL: to.Ptr("https://portal.azure.com/"),
		// 						KustoOfferingType: to.Ptr(armdatabasewatcher.KustoOfferingTypeAdx),
		// 					},
		// 				},
		// 				Identity: &armdatabasewatcher.ManagedServiceIdentityV4{
		// 					UserAssignedIdentities: map[string]*armdatabasewatcher.UserAssignedIdentity{
		// 					},
		// 					PrincipalID: to.Ptr("49e0fbd3-75e8-44e7-96fd-5b64d9ad818d"),
		// 					TenantID: to.Ptr("49e0fbd3-75e8-44e7-96fd-5b64d9ad818d"),
		// 				},
		// 				Tags: map[string]*string{
		// 				},
		// 				SystemData: &armdatabasewatcher.SystemData{
		// 					CreatedBy: to.Ptr("enbpvlpqbwd"),
		// 					CreatedByType: to.Ptr(armdatabasewatcher.CreatedByTypeUser),
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T15:38:47.092Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("mxp"),
		// 					LastModifiedByType: to.Ptr(armdatabasewatcher.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T15:38:47.092Z"); return t}()),
		// 				},
		// 			},
		// 			{
		// 				ID: to.Ptr("/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/apiTest-nyb4gm/providers/Microsoft.DatabaseWatcher/watchers/databasemoyb6iar"),
		// 				Name: to.Ptr("databasemoyb6iar"),
		// 				Type: to.Ptr("microsoft.databasewatcher/watchers"),
		// 				Location: to.Ptr("westus"),
		// 				Properties: &armdatabasewatcher.WatcherProperties{
		// 					Status: to.Ptr(armdatabasewatcher.WatcherStatusStarting),
		// 					ProvisioningState: to.Ptr(armdatabasewatcher.ProvisioningStateSucceeded),
		// 					DefaultAlertRuleIdentityResourceID: to.Ptr("/subscriptions/469DD77C-C8DB-47B7-B9E1-72D29F8C878B/resourceGroups/rgWatcher/providers/Microsoft.ManagedIdentity/userAssignedIdentities/3pmtest"),
		// 					Datastore: &armdatabasewatcher.Datastore{
		// 						AdxClusterResourceID: to.Ptr("/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/apiTest/providers/Microsoft.Kusto/clusters/apiTestKusto"),
		// 						KustoClusterURI: to.Ptr("https://kustouri-adx.eastus.kusto.windows.net"),
		// 						KustoClusterDisplayName: to.Ptr("kustoUri-adx"),
		// 						KustoDataIngestionURI: to.Ptr("https://ingest-kustouri-adx.eastus.kusto.windows.net"),
		// 						KustoDatabaseName: to.Ptr("kustoDatabaseName1"),
		// 						KustoManagementURL: to.Ptr("https://portal.azure.com/"),
		// 						KustoOfferingType: to.Ptr(armdatabasewatcher.KustoOfferingTypeAdx),
		// 					},
		// 				},
		// 				Identity: &armdatabasewatcher.ManagedServiceIdentityV4{
		// 					UserAssignedIdentities: map[string]*armdatabasewatcher.UserAssignedIdentity{
		// 					},
		// 					PrincipalID: to.Ptr("49e0fbd3-75e8-44e7-96fd-5b64d9ad818d"),
		// 					TenantID: to.Ptr("49e0fbd3-75e8-44e7-96fd-5b64d9ad818d"),
		// 				},
		// 				Tags: map[string]*string{
		// 				},
		// 				SystemData: &armdatabasewatcher.SystemData{
		// 					CreatedBy: to.Ptr("enbpvlpqbwd"),
		// 					CreatedByType: to.Ptr(armdatabasewatcher.CreatedByTypeUser),
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T15:38:47.092Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("mxp"),
		// 					LastModifiedByType: to.Ptr(armdatabasewatcher.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T15:38:47.092Z"); return t}()),
		// 				},
		// 			},
		// 			{
		// 				ID: to.Ptr("/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/apiTest-llis4j/providers/Microsoft.DatabaseWatcher/watchers/databasemoi04xst"),
		// 				Name: to.Ptr("databasemoi04xst"),
		// 				Type: to.Ptr("microsoft.databasewatcher/watchers"),
		// 				Location: to.Ptr("westus"),
		// 				Properties: &armdatabasewatcher.WatcherProperties{
		// 					Status: to.Ptr(armdatabasewatcher.WatcherStatusStarting),
		// 					ProvisioningState: to.Ptr(armdatabasewatcher.ProvisioningStateSucceeded),
		// 					DefaultAlertRuleIdentityResourceID: to.Ptr("/subscriptions/469DD77C-C8DB-47B7-B9E1-72D29F8C878B/resourceGroups/rgWatcher/providers/Microsoft.ManagedIdentity/userAssignedIdentities/3pmtest"),
		// 					Datastore: &armdatabasewatcher.Datastore{
		// 						AdxClusterResourceID: to.Ptr("/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/apiTest/providers/Microsoft.Kusto/clusters/apiTestKusto"),
		// 						KustoClusterURI: to.Ptr("https://kustouri-adx.eastus.kusto.windows.net"),
		// 						KustoClusterDisplayName: to.Ptr("kustoUri-adx"),
		// 						KustoDataIngestionURI: to.Ptr("https://ingest-kustouri-adx.eastus.kusto.windows.net"),
		// 						KustoDatabaseName: to.Ptr("kustoDatabaseName1"),
		// 						KustoManagementURL: to.Ptr("https://portal.azure.com/"),
		// 						KustoOfferingType: to.Ptr(armdatabasewatcher.KustoOfferingTypeAdx),
		// 					},
		// 				},
		// 				Identity: &armdatabasewatcher.ManagedServiceIdentityV4{
		// 					UserAssignedIdentities: map[string]*armdatabasewatcher.UserAssignedIdentity{
		// 					},
		// 					PrincipalID: to.Ptr("49e0fbd3-75e8-44e7-96fd-5b64d9ad818d"),
		// 					TenantID: to.Ptr("49e0fbd3-75e8-44e7-96fd-5b64d9ad818d"),
		// 				},
		// 				Tags: map[string]*string{
		// 				},
		// 				SystemData: &armdatabasewatcher.SystemData{
		// 					CreatedBy: to.Ptr("enbpvlpqbwd"),
		// 					CreatedByType: to.Ptr(armdatabasewatcher.CreatedByTypeUser),
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T15:38:47.092Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("mxp"),
		// 					LastModifiedByType: to.Ptr(armdatabasewatcher.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T15:38:47.092Z"); return t}()),
		// 				},
		// 			},
		// 			{
		// 				ID: to.Ptr("/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/apiTest-thy6zd/providers/Microsoft.DatabaseWatcher/watchers/databasemonpyl24"),
		// 				Name: to.Ptr("databasemonpyl24"),
		// 				Type: to.Ptr("microsoft.databasewatcher/watchers"),
		// 				Location: to.Ptr("westus"),
		// 				SystemData: &armdatabasewatcher.SystemData{
		// 					CreatedBy: to.Ptr("ysoqerxnmxqsvhmvjojoyzotc"),
		// 					CreatedByType: to.Ptr(armdatabasewatcher.CreatedByTypeUser),
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T18:01:18.690Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("yrilzsg"),
		// 					LastModifiedByType: to.Ptr(armdatabasewatcher.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T18:01:18.690Z"); return t}()),
		// 				},
		// 				Properties: &armdatabasewatcher.WatcherProperties{
		// 					Status: to.Ptr(armdatabasewatcher.WatcherStatusStarting),
		// 					ProvisioningState: to.Ptr(armdatabasewatcher.ProvisioningStateSucceeded),
		// 					DefaultAlertRuleIdentityResourceID: to.Ptr("/subscriptions/469DD77C-C8DB-47B7-B9E1-72D29F8C878B/resourceGroups/rgWatcher/providers/Microsoft.ManagedIdentity/userAssignedIdentities/3pmtest"),
		// 					Datastore: &armdatabasewatcher.Datastore{
		// 						AdxClusterResourceID: to.Ptr("/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/apiTest/providers/Microsoft.Kusto/clusters/apiTestKusto"),
		// 						KustoClusterURI: to.Ptr("https://kustouri-adx.eastus.kusto.windows.net"),
		// 						KustoClusterDisplayName: to.Ptr("kustoUri-adx"),
		// 						KustoDataIngestionURI: to.Ptr("https://ingest-kustouri-adx.eastus.kusto.windows.net"),
		// 						KustoDatabaseName: to.Ptr("kustoDatabaseName1"),
		// 						KustoManagementURL: to.Ptr("https://portal.azure.com/"),
		// 						KustoOfferingType: to.Ptr(armdatabasewatcher.KustoOfferingTypeAdx),
		// 					},
		// 				},
		// 				Identity: &armdatabasewatcher.ManagedServiceIdentityV4{
		// 					UserAssignedIdentities: map[string]*armdatabasewatcher.UserAssignedIdentity{
		// 					},
		// 					PrincipalID: to.Ptr("49e0fbd3-75e8-44e7-96fd-5b64d9ad818d"),
		// 					TenantID: to.Ptr("49e0fbd3-75e8-44e7-96fd-5b64d9ad818d"),
		// 				},
		// 				Tags: map[string]*string{
		// 				},
		// 			},
		// 			{
		// 				ID: to.Ptr("/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/apiTest-ddat4p/providers/Microsoft.DatabaseWatcher/watchers/databasemo3ej9ih"),
		// 				Name: to.Ptr("databasemo3ej9ih"),
		// 				Type: to.Ptr("microsoft.databasewatcher/watchers"),
		// 				Location: to.Ptr("westus"),
		// 				Properties: &armdatabasewatcher.WatcherProperties{
		// 					Status: to.Ptr(armdatabasewatcher.WatcherStatusStarting),
		// 					ProvisioningState: to.Ptr(armdatabasewatcher.ProvisioningStateSucceeded),
		// 					DefaultAlertRuleIdentityResourceID: to.Ptr("/subscriptions/469DD77C-C8DB-47B7-B9E1-72D29F8C878B/resourceGroups/rgWatcher/providers/Microsoft.ManagedIdentity/userAssignedIdentities/3pmtest"),
		// 					Datastore: &armdatabasewatcher.Datastore{
		// 						AdxClusterResourceID: to.Ptr("/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/apiTest/providers/Microsoft.Kusto/clusters/apiTestKusto"),
		// 						KustoClusterURI: to.Ptr("https://kustouri-adx.eastus.kusto.windows.net"),
		// 						KustoClusterDisplayName: to.Ptr("kustoUri-adx"),
		// 						KustoDataIngestionURI: to.Ptr("https://ingest-kustouri-adx.eastus.kusto.windows.net"),
		// 						KustoDatabaseName: to.Ptr("kustoDatabaseName1"),
		// 						KustoManagementURL: to.Ptr("https://portal.azure.com/"),
		// 						KustoOfferingType: to.Ptr(armdatabasewatcher.KustoOfferingTypeAdx),
		// 					},
		// 				},
		// 				Identity: &armdatabasewatcher.ManagedServiceIdentityV4{
		// 					UserAssignedIdentities: map[string]*armdatabasewatcher.UserAssignedIdentity{
		// 					},
		// 					PrincipalID: to.Ptr("49e0fbd3-75e8-44e7-96fd-5b64d9ad818d"),
		// 					TenantID: to.Ptr("49e0fbd3-75e8-44e7-96fd-5b64d9ad818d"),
		// 				},
		// 				Tags: map[string]*string{
		// 				},
		// 				SystemData: &armdatabasewatcher.SystemData{
		// 					CreatedBy: to.Ptr("enbpvlpqbwd"),
		// 					CreatedByType: to.Ptr(armdatabasewatcher.CreatedByTypeUser),
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T15:38:47.092Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("mxp"),
		// 					LastModifiedByType: to.Ptr(armdatabasewatcher.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T15:38:47.092Z"); return t}()),
		// 				},
		// 			},
		// 		},
		// 		NextLink: to.Ptr("https://microsoft.com/a"),
		// 	},
		// }
	}
}
Output:

func (*WatchersClient) NewListBySubscriptionPager

NewListBySubscriptionPager - List Watcher resources by subscription ID

Generated from API version 2025-01-02

  • options - WatchersClientListBySubscriptionOptions contains the optional parameters for the WatchersClient.NewListBySubscriptionPager method.
Example

Generated from example definition: 2025-01-02/Watchers_ListBySubscription_MaximumSet_Gen.json

package main

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

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatabasewatcher.NewClientFactory("A76F9850-996B-40B3-94D4-C98110A0EEC9", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewWatchersClient().NewListBySubscriptionPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page = armdatabasewatcher.WatchersClientListBySubscriptionResponse{
		// 	WatcherListResult: armdatabasewatcher.WatcherListResult{
		// 		Value: []*armdatabasewatcher.Watcher{
		// 			{
		// 				ID: to.Ptr("/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/dummyrg/providers/Microsoft.DatabaseWatcher/watchers/myWatcher"),
		// 				Name: to.Ptr("myWatcher"),
		// 				Type: to.Ptr("microsoft.databasewatcher/watchers"),
		// 				Location: to.Ptr("West US"),
		// 				Tags: map[string]*string{
		// 				},
		// 				Identity: &armdatabasewatcher.ManagedServiceIdentityV4{
		// 					Type: to.Ptr(armdatabasewatcher.ManagedServiceIdentityTypeSystemAssigned),
		// 				},
		// 				Properties: &armdatabasewatcher.WatcherProperties{
		// 					Status: to.Ptr(armdatabasewatcher.WatcherStatusStarting),
		// 					ProvisioningState: to.Ptr(armdatabasewatcher.ProvisioningStateSucceeded),
		// 					DefaultAlertRuleIdentityResourceID: to.Ptr("/subscriptions/469DD77C-C8DB-47B7-B9E1-72D29F8C878B/resourceGroups/rgWatcher/providers/Microsoft.ManagedIdentity/userAssignedIdentities/3pmtest"),
		// 					Datastore: &armdatabasewatcher.Datastore{
		// 						AdxClusterResourceID: to.Ptr("/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/apiTest/providers/Microsoft.Kusto/clusters/apiTestKusto"),
		// 						KustoClusterURI: to.Ptr("https://kustouri-adx.eastus.kusto.windows.net"),
		// 						KustoClusterDisplayName: to.Ptr("kustoUri-adx"),
		// 						KustoDataIngestionURI: to.Ptr("https://ingest-kustouri-adx.eastus.kusto.windows.net"),
		// 						KustoDatabaseName: to.Ptr("kustoDatabaseName1"),
		// 						KustoManagementURL: to.Ptr("https://portal.azure.com/"),
		// 						KustoOfferingType: to.Ptr(armdatabasewatcher.KustoOfferingTypeAdx),
		// 					},
		// 				},
		// 				SystemData: &armdatabasewatcher.SystemData{
		// 					CreatedBy: to.Ptr("enbpvlpqbwd"),
		// 					CreatedByType: to.Ptr(armdatabasewatcher.CreatedByTypeUser),
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T15:38:47.092Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("mxp"),
		// 					LastModifiedByType: to.Ptr(armdatabasewatcher.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T15:38:47.092Z"); return t}()),
		// 				},
		// 			},
		// 			{
		// 				ID: to.Ptr("/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/apiTest-4sz1jg/providers/Microsoft.DatabaseWatcher/watchers/databasemo4o4zdf"),
		// 				Name: to.Ptr("databasemo4o4zdf"),
		// 				Type: to.Ptr("microsoft.databasewatcher/watchers"),
		// 				Location: to.Ptr("westus"),
		// 				Properties: &armdatabasewatcher.WatcherProperties{
		// 					Status: to.Ptr(armdatabasewatcher.WatcherStatusStarting),
		// 					ProvisioningState: to.Ptr(armdatabasewatcher.ProvisioningStateSucceeded),
		// 					DefaultAlertRuleIdentityResourceID: to.Ptr("/subscriptions/469DD77C-C8DB-47B7-B9E1-72D29F8C878B/resourceGroups/rgWatcher/providers/Microsoft.ManagedIdentity/userAssignedIdentities/3pmtest"),
		// 					Datastore: &armdatabasewatcher.Datastore{
		// 						AdxClusterResourceID: to.Ptr("/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/apiTest/providers/Microsoft.Kusto/clusters/apiTestKusto"),
		// 						KustoClusterURI: to.Ptr("https://kustouri-adx.eastus.kusto.windows.net"),
		// 						KustoClusterDisplayName: to.Ptr("kustoUri-adx"),
		// 						KustoDataIngestionURI: to.Ptr("https://ingest-kustouri-adx.eastus.kusto.windows.net"),
		// 						KustoDatabaseName: to.Ptr("kustoDatabaseName1"),
		// 						KustoManagementURL: to.Ptr("https://portal.azure.com/"),
		// 						KustoOfferingType: to.Ptr(armdatabasewatcher.KustoOfferingTypeAdx),
		// 					},
		// 				},
		// 				Identity: &armdatabasewatcher.ManagedServiceIdentityV4{
		// 					UserAssignedIdentities: map[string]*armdatabasewatcher.UserAssignedIdentity{
		// 					},
		// 					PrincipalID: to.Ptr("49e0fbd3-75e8-44e7-96fd-5b64d9ad818d"),
		// 					TenantID: to.Ptr("49e0fbd3-75e8-44e7-96fd-5b64d9ad818d"),
		// 				},
		// 				Tags: map[string]*string{
		// 				},
		// 				SystemData: &armdatabasewatcher.SystemData{
		// 					CreatedBy: to.Ptr("enbpvlpqbwd"),
		// 					CreatedByType: to.Ptr(armdatabasewatcher.CreatedByTypeUser),
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T15:38:47.092Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("mxp"),
		// 					LastModifiedByType: to.Ptr(armdatabasewatcher.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T15:38:47.092Z"); return t}()),
		// 				},
		// 			},
		// 			{
		// 				ID: to.Ptr("/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/apiTest-d77ftn/providers/Microsoft.DatabaseWatcher/watchers/databasemosn3h6l"),
		// 				Name: to.Ptr("databasemosn3h6l"),
		// 				Type: to.Ptr("microsoft.databasewatcher/watchers"),
		// 				Location: to.Ptr("westus"),
		// 				Properties: &armdatabasewatcher.WatcherProperties{
		// 					Status: to.Ptr(armdatabasewatcher.WatcherStatusStarting),
		// 					ProvisioningState: to.Ptr(armdatabasewatcher.ProvisioningStateSucceeded),
		// 					DefaultAlertRuleIdentityResourceID: to.Ptr("/subscriptions/469DD77C-C8DB-47B7-B9E1-72D29F8C878B/resourceGroups/rgWatcher/providers/Microsoft.ManagedIdentity/userAssignedIdentities/3pmtest"),
		// 					Datastore: &armdatabasewatcher.Datastore{
		// 						AdxClusterResourceID: to.Ptr("/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/apiTest/providers/Microsoft.Kusto/clusters/apiTestKusto"),
		// 						KustoClusterURI: to.Ptr("https://kustouri-adx.eastus.kusto.windows.net"),
		// 						KustoClusterDisplayName: to.Ptr("kustoUri-adx"),
		// 						KustoDataIngestionURI: to.Ptr("https://ingest-kustouri-adx.eastus.kusto.windows.net"),
		// 						KustoDatabaseName: to.Ptr("kustoDatabaseName1"),
		// 						KustoManagementURL: to.Ptr("https://portal.azure.com/"),
		// 						KustoOfferingType: to.Ptr(armdatabasewatcher.KustoOfferingTypeAdx),
		// 					},
		// 				},
		// 				Identity: &armdatabasewatcher.ManagedServiceIdentityV4{
		// 					UserAssignedIdentities: map[string]*armdatabasewatcher.UserAssignedIdentity{
		// 					},
		// 					PrincipalID: to.Ptr("49e0fbd3-75e8-44e7-96fd-5b64d9ad818d"),
		// 					TenantID: to.Ptr("49e0fbd3-75e8-44e7-96fd-5b64d9ad818d"),
		// 				},
		// 				Tags: map[string]*string{
		// 				},
		// 				SystemData: &armdatabasewatcher.SystemData{
		// 					CreatedBy: to.Ptr("enbpvlpqbwd"),
		// 					CreatedByType: to.Ptr(armdatabasewatcher.CreatedByTypeUser),
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T15:38:47.092Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("mxp"),
		// 					LastModifiedByType: to.Ptr(armdatabasewatcher.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T15:38:47.092Z"); return t}()),
		// 				},
		// 			},
		// 			{
		// 				ID: to.Ptr("/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/apiTest-nyb4gm/providers/Microsoft.DatabaseWatcher/watchers/databasemoyb6iar"),
		// 				Name: to.Ptr("databasemoyb6iar"),
		// 				Type: to.Ptr("microsoft.databasewatcher/watchers"),
		// 				Location: to.Ptr("westus"),
		// 				Properties: &armdatabasewatcher.WatcherProperties{
		// 					Status: to.Ptr(armdatabasewatcher.WatcherStatusStarting),
		// 					ProvisioningState: to.Ptr(armdatabasewatcher.ProvisioningStateSucceeded),
		// 					DefaultAlertRuleIdentityResourceID: to.Ptr("/subscriptions/469DD77C-C8DB-47B7-B9E1-72D29F8C878B/resourceGroups/rgWatcher/providers/Microsoft.ManagedIdentity/userAssignedIdentities/3pmtest"),
		// 					Datastore: &armdatabasewatcher.Datastore{
		// 						AdxClusterResourceID: to.Ptr("/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/apiTest/providers/Microsoft.Kusto/clusters/apiTestKusto"),
		// 						KustoClusterURI: to.Ptr("https://kustouri-adx.eastus.kusto.windows.net"),
		// 						KustoClusterDisplayName: to.Ptr("kustoUri-adx"),
		// 						KustoDataIngestionURI: to.Ptr("https://ingest-kustouri-adx.eastus.kusto.windows.net"),
		// 						KustoDatabaseName: to.Ptr("kustoDatabaseName1"),
		// 						KustoManagementURL: to.Ptr("https://portal.azure.com/"),
		// 						KustoOfferingType: to.Ptr(armdatabasewatcher.KustoOfferingTypeAdx),
		// 					},
		// 				},
		// 				Identity: &armdatabasewatcher.ManagedServiceIdentityV4{
		// 					UserAssignedIdentities: map[string]*armdatabasewatcher.UserAssignedIdentity{
		// 					},
		// 					PrincipalID: to.Ptr("49e0fbd3-75e8-44e7-96fd-5b64d9ad818d"),
		// 					TenantID: to.Ptr("49e0fbd3-75e8-44e7-96fd-5b64d9ad818d"),
		// 				},
		// 				Tags: map[string]*string{
		// 				},
		// 				SystemData: &armdatabasewatcher.SystemData{
		// 					CreatedBy: to.Ptr("enbpvlpqbwd"),
		// 					CreatedByType: to.Ptr(armdatabasewatcher.CreatedByTypeUser),
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T15:38:47.092Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("mxp"),
		// 					LastModifiedByType: to.Ptr(armdatabasewatcher.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T15:38:47.092Z"); return t}()),
		// 				},
		// 			},
		// 			{
		// 				ID: to.Ptr("/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/apiTest-llis4j/providers/Microsoft.DatabaseWatcher/watchers/databasemoi04xst"),
		// 				Name: to.Ptr("databasemoi04xst"),
		// 				Type: to.Ptr("microsoft.databasewatcher/watchers"),
		// 				Location: to.Ptr("westus"),
		// 				Properties: &armdatabasewatcher.WatcherProperties{
		// 					Status: to.Ptr(armdatabasewatcher.WatcherStatusStarting),
		// 					ProvisioningState: to.Ptr(armdatabasewatcher.ProvisioningStateSucceeded),
		// 					DefaultAlertRuleIdentityResourceID: to.Ptr("/subscriptions/469DD77C-C8DB-47B7-B9E1-72D29F8C878B/resourceGroups/rgWatcher/providers/Microsoft.ManagedIdentity/userAssignedIdentities/3pmtest"),
		// 					Datastore: &armdatabasewatcher.Datastore{
		// 						AdxClusterResourceID: to.Ptr("/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/apiTest/providers/Microsoft.Kusto/clusters/apiTestKusto"),
		// 						KustoClusterURI: to.Ptr("https://kustouri-adx.eastus.kusto.windows.net"),
		// 						KustoClusterDisplayName: to.Ptr("kustoUri-adx"),
		// 						KustoDataIngestionURI: to.Ptr("https://ingest-kustouri-adx.eastus.kusto.windows.net"),
		// 						KustoDatabaseName: to.Ptr("kustoDatabaseName1"),
		// 						KustoManagementURL: to.Ptr("https://portal.azure.com/"),
		// 						KustoOfferingType: to.Ptr(armdatabasewatcher.KustoOfferingTypeAdx),
		// 					},
		// 				},
		// 				Identity: &armdatabasewatcher.ManagedServiceIdentityV4{
		// 					UserAssignedIdentities: map[string]*armdatabasewatcher.UserAssignedIdentity{
		// 					},
		// 					PrincipalID: to.Ptr("49e0fbd3-75e8-44e7-96fd-5b64d9ad818d"),
		// 					TenantID: to.Ptr("49e0fbd3-75e8-44e7-96fd-5b64d9ad818d"),
		// 				},
		// 				Tags: map[string]*string{
		// 				},
		// 				SystemData: &armdatabasewatcher.SystemData{
		// 					CreatedBy: to.Ptr("enbpvlpqbwd"),
		// 					CreatedByType: to.Ptr(armdatabasewatcher.CreatedByTypeUser),
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T15:38:47.092Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("mxp"),
		// 					LastModifiedByType: to.Ptr(armdatabasewatcher.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T15:38:47.092Z"); return t}()),
		// 				},
		// 			},
		// 			{
		// 				ID: to.Ptr("/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/apiTest-thy6zd/providers/Microsoft.DatabaseWatcher/watchers/databasemonpyl24"),
		// 				Name: to.Ptr("databasemonpyl24"),
		// 				Type: to.Ptr("microsoft.databasewatcher/watchers"),
		// 				Location: to.Ptr("westus"),
		// 				SystemData: &armdatabasewatcher.SystemData{
		// 					CreatedBy: to.Ptr("ysoqerxnmxqsvhmvjojoyzotc"),
		// 					CreatedByType: to.Ptr(armdatabasewatcher.CreatedByTypeUser),
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T18:01:18.690Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("yrilzsg"),
		// 					LastModifiedByType: to.Ptr(armdatabasewatcher.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T18:01:18.690Z"); return t}()),
		// 				},
		// 				Properties: &armdatabasewatcher.WatcherProperties{
		// 					Status: to.Ptr(armdatabasewatcher.WatcherStatusStarting),
		// 					ProvisioningState: to.Ptr(armdatabasewatcher.ProvisioningStateSucceeded),
		// 					DefaultAlertRuleIdentityResourceID: to.Ptr("/subscriptions/469DD77C-C8DB-47B7-B9E1-72D29F8C878B/resourceGroups/rgWatcher/providers/Microsoft.ManagedIdentity/userAssignedIdentities/3pmtest"),
		// 					Datastore: &armdatabasewatcher.Datastore{
		// 						AdxClusterResourceID: to.Ptr("/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/apiTest/providers/Microsoft.Kusto/clusters/apiTestKusto"),
		// 						KustoClusterURI: to.Ptr("https://kustouri-adx.eastus.kusto.windows.net"),
		// 						KustoClusterDisplayName: to.Ptr("kustoUri-adx"),
		// 						KustoDataIngestionURI: to.Ptr("https://ingest-kustouri-adx.eastus.kusto.windows.net"),
		// 						KustoDatabaseName: to.Ptr("kustoDatabaseName1"),
		// 						KustoManagementURL: to.Ptr("https://portal.azure.com/"),
		// 						KustoOfferingType: to.Ptr(armdatabasewatcher.KustoOfferingTypeAdx),
		// 					},
		// 				},
		// 				Identity: &armdatabasewatcher.ManagedServiceIdentityV4{
		// 					UserAssignedIdentities: map[string]*armdatabasewatcher.UserAssignedIdentity{
		// 					},
		// 					PrincipalID: to.Ptr("49e0fbd3-75e8-44e7-96fd-5b64d9ad818d"),
		// 					TenantID: to.Ptr("49e0fbd3-75e8-44e7-96fd-5b64d9ad818d"),
		// 				},
		// 				Tags: map[string]*string{
		// 				},
		// 			},
		// 			{
		// 				ID: to.Ptr("/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/apiTest-ddat4p/providers/Microsoft.DatabaseWatcher/watchers/databasemo3ej9ih"),
		// 				Name: to.Ptr("databasemo3ej9ih"),
		// 				Type: to.Ptr("microsoft.databasewatcher/watchers"),
		// 				Location: to.Ptr("westus"),
		// 				Properties: &armdatabasewatcher.WatcherProperties{
		// 					Status: to.Ptr(armdatabasewatcher.WatcherStatusStarting),
		// 					ProvisioningState: to.Ptr(armdatabasewatcher.ProvisioningStateSucceeded),
		// 					DefaultAlertRuleIdentityResourceID: to.Ptr("/subscriptions/469DD77C-C8DB-47B7-B9E1-72D29F8C878B/resourceGroups/rgWatcher/providers/Microsoft.ManagedIdentity/userAssignedIdentities/3pmtest"),
		// 					Datastore: &armdatabasewatcher.Datastore{
		// 						AdxClusterResourceID: to.Ptr("/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/apiTest/providers/Microsoft.Kusto/clusters/apiTestKusto"),
		// 						KustoClusterURI: to.Ptr("https://kustouri-adx.eastus.kusto.windows.net"),
		// 						KustoClusterDisplayName: to.Ptr("kustoUri-adx"),
		// 						KustoDataIngestionURI: to.Ptr("https://ingest-kustouri-adx.eastus.kusto.windows.net"),
		// 						KustoDatabaseName: to.Ptr("kustoDatabaseName1"),
		// 						KustoManagementURL: to.Ptr("https://portal.azure.com/"),
		// 						KustoOfferingType: to.Ptr(armdatabasewatcher.KustoOfferingTypeAdx),
		// 					},
		// 				},
		// 				Identity: &armdatabasewatcher.ManagedServiceIdentityV4{
		// 					UserAssignedIdentities: map[string]*armdatabasewatcher.UserAssignedIdentity{
		// 					},
		// 					PrincipalID: to.Ptr("49e0fbd3-75e8-44e7-96fd-5b64d9ad818d"),
		// 					TenantID: to.Ptr("49e0fbd3-75e8-44e7-96fd-5b64d9ad818d"),
		// 				},
		// 				Tags: map[string]*string{
		// 				},
		// 				SystemData: &armdatabasewatcher.SystemData{
		// 					CreatedBy: to.Ptr("enbpvlpqbwd"),
		// 					CreatedByType: to.Ptr(armdatabasewatcher.CreatedByTypeUser),
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T15:38:47.092Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("mxp"),
		// 					LastModifiedByType: to.Ptr(armdatabasewatcher.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-25T15:38:47.092Z"); return t}()),
		// 				},
		// 			},
		// 		},
		// 		NextLink: to.Ptr("https://microsoft.com/a"),
		// 	},
		// }
	}
}
Output:

type WatchersClientBeginCreateOrUpdateOptions

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

WatchersClientBeginCreateOrUpdateOptions contains the optional parameters for the WatchersClient.BeginCreateOrUpdate method.

type WatchersClientBeginDeleteOptions

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

WatchersClientBeginDeleteOptions contains the optional parameters for the WatchersClient.BeginDelete method.

type WatchersClientBeginStartOptions

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

WatchersClientBeginStartOptions contains the optional parameters for the WatchersClient.BeginStart method.

type WatchersClientBeginStopOptions

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

WatchersClientBeginStopOptions contains the optional parameters for the WatchersClient.BeginStop method.

type WatchersClientBeginUpdateOptions

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

WatchersClientBeginUpdateOptions contains the optional parameters for the WatchersClient.BeginUpdate method.

type WatchersClientCreateOrUpdateResponse

type WatchersClientCreateOrUpdateResponse struct {
	// The DatabaseWatcherProviderHub resource.
	Watcher
}

WatchersClientCreateOrUpdateResponse contains the response from method WatchersClient.BeginCreateOrUpdate.

type WatchersClientDeleteResponse

type WatchersClientDeleteResponse struct {
}

WatchersClientDeleteResponse contains the response from method WatchersClient.BeginDelete.

type WatchersClientGetOptions

type WatchersClientGetOptions struct {
}

WatchersClientGetOptions contains the optional parameters for the WatchersClient.Get method.

type WatchersClientGetResponse

type WatchersClientGetResponse struct {
	// The DatabaseWatcherProviderHub resource.
	Watcher
}

WatchersClientGetResponse contains the response from method WatchersClient.Get.

type WatchersClientListByResourceGroupOptions

type WatchersClientListByResourceGroupOptions struct {
}

WatchersClientListByResourceGroupOptions contains the optional parameters for the WatchersClient.NewListByResourceGroupPager method.

type WatchersClientListByResourceGroupResponse

type WatchersClientListByResourceGroupResponse struct {
	// The response of a Watcher list operation.
	WatcherListResult
}

WatchersClientListByResourceGroupResponse contains the response from method WatchersClient.NewListByResourceGroupPager.

type WatchersClientListBySubscriptionOptions

type WatchersClientListBySubscriptionOptions struct {
}

WatchersClientListBySubscriptionOptions contains the optional parameters for the WatchersClient.NewListBySubscriptionPager method.

type WatchersClientListBySubscriptionResponse

type WatchersClientListBySubscriptionResponse struct {
	// The response of a Watcher list operation.
	WatcherListResult
}

WatchersClientListBySubscriptionResponse contains the response from method WatchersClient.NewListBySubscriptionPager.

type WatchersClientStartResponse

type WatchersClientStartResponse struct {
}

WatchersClientStartResponse contains the response from method WatchersClient.BeginStart.

type WatchersClientStopResponse

type WatchersClientStopResponse struct {
}

WatchersClientStopResponse contains the response from method WatchersClient.BeginStop.

type WatchersClientUpdateResponse

type WatchersClientUpdateResponse struct {
	// The DatabaseWatcherProviderHub resource.
	Watcher
}

WatchersClientUpdateResponse contains the response from method WatchersClient.BeginUpdate.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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