armmysqlflexibleservers

package module
v2.0.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2023 License: MIT Imports: 15 Imported by: 0

README

Azure Database for MySQL Module for Go

PkgGoDev

The armmysqlflexibleservers module provides operations for working with Azure Database for MySQL.

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 Database for MySQL module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mysql/armmysqlflexibleservers

Authorization

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

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 Database for MySQL 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 AdministratorListResult

type AdministratorListResult struct {
	// The link used to get the next page of operations.
	NextLink *string

	// The list of azure ad administrator of a server
	Value []*AzureADAdministrator
}

AdministratorListResult - A List of azure ad administrators.

func (AdministratorListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AdministratorListResult.

func (*AdministratorListResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AdministratorListResult.

type AdministratorName

type AdministratorName string
const (
	AdministratorNameActiveDirectory AdministratorName = "ActiveDirectory"
)

func PossibleAdministratorNameValues

func PossibleAdministratorNameValues() []AdministratorName

PossibleAdministratorNameValues returns the possible values for the AdministratorName const type.

type AdministratorProperties

type AdministratorProperties struct {
	// Type of the sever administrator.
	AdministratorType *AdministratorType

	// The resource id of the identity used for AAD Authentication.
	IdentityResourceID *string

	// Login name of the server administrator.
	Login *string

	// SID (object ID) of the server administrator.
	Sid *string

	// Tenant ID of the administrator.
	TenantID *string
}

AdministratorProperties - The properties of an administrator.

func (AdministratorProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AdministratorProperties.

func (*AdministratorProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AdministratorProperties.

type AdministratorType

type AdministratorType string

AdministratorType - Type of the sever administrator.

const (
	AdministratorTypeActiveDirectory AdministratorType = "ActiveDirectory"
)

func PossibleAdministratorTypeValues

func PossibleAdministratorTypeValues() []AdministratorType

PossibleAdministratorTypeValues returns the possible values for the AdministratorType const type.

type AzureADAdministrator

type AzureADAdministrator struct {
	// The properties of an administrator.
	Properties *AdministratorProperties

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

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

	// READ-ONLY; The system metadata relating to this resource.
	SystemData *SystemData

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

AzureADAdministrator - Represents a Administrator.

func (AzureADAdministrator) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AzureADAdministrator.

func (*AzureADAdministrator) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AzureADAdministrator.

type AzureADAdministratorsClient

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

AzureADAdministratorsClient contains the methods for the AzureADAdministrators group. Don't use this type directly, use NewAzureADAdministratorsClient() instead.

func NewAzureADAdministratorsClient

func NewAzureADAdministratorsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AzureADAdministratorsClient, error)

NewAzureADAdministratorsClient creates a new instance of AzureADAdministratorsClient with the specified values.

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

func (*AzureADAdministratorsClient) BeginCreateOrUpdate

BeginCreateOrUpdate - Creates or updates an existing Azure Active Directory administrator. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-12-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serverName - The name of the server.
  • administratorName - The name of the Azure AD Administrator.
  • parameters - The required parameters for creating or updating an aad administrator.
  • options - AzureADAdministratorsClientBeginCreateOrUpdateOptions contains the optional parameters for the AzureADAdministratorsClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/preview/2021-12-01-preview/examples/AzureADAdministratorCreate.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAzureADAdministratorsClient().BeginCreateOrUpdate(ctx, "testrg", "mysqltestsvc4", armmysqlflexibleservers.AdministratorNameActiveDirectory, armmysqlflexibleservers.AzureADAdministrator{
	Properties: &armmysqlflexibleservers.AdministratorProperties{
		AdministratorType:  to.Ptr(armmysqlflexibleservers.AdministratorTypeActiveDirectory),
		IdentityResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/test-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-umi"),
		Login:              to.Ptr("bob@contoso.com"),
		Sid:                to.Ptr("c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c"),
		TenantID:           to.Ptr("c12b7025-bfe2-46c1-b463-993b5e4cd467"),
	},
}, 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.AzureADAdministrator = armmysqlflexibleservers.AzureADAdministrator{
// 	Name: to.Ptr("ActiveDirectory"),
// 	Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers/administrators"),
// 	ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestsvc4/administrators/ActiveDirectory"),
// 	Properties: &armmysqlflexibleservers.AdministratorProperties{
// 		AdministratorType: to.Ptr(armmysqlflexibleservers.AdministratorTypeActiveDirectory),
// 		IdentityResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/test-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-umi"),
// 		Login: to.Ptr("bob@contoso.com"),
// 		Sid: to.Ptr("c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c"),
// 		TenantID: to.Ptr("c12b7025-bfe2-46c1-b463-993b5e4cd467"),
// 	},
// }
Output:

func (*AzureADAdministratorsClient) BeginDelete

BeginDelete - Deletes an Azure AD Administrator. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-12-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serverName - The name of the server.
  • administratorName - The name of the Azure AD Administrator.
  • options - AzureADAdministratorsClientBeginDeleteOptions contains the optional parameters for the AzureADAdministratorsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/preview/2021-12-01-preview/examples/AzureADAdministratorDelete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAzureADAdministratorsClient().BeginDelete(ctx, "testrg", "mysqltestsvc4", armmysqlflexibleservers.AdministratorNameActiveDirectory, 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 (*AzureADAdministratorsClient) Get

Get - Gets information about an azure ad administrator. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-12-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serverName - The name of the server.
  • administratorName - The name of the Azure AD Administrator.
  • options - AzureADAdministratorsClientGetOptions contains the optional parameters for the AzureADAdministratorsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/preview/2021-12-01-preview/examples/AzureADAdministratorGet.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAzureADAdministratorsClient().Get(ctx, "testrg", "mysqltestsvc4", armmysqlflexibleservers.AdministratorNameActiveDirectory, 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.AzureADAdministrator = armmysqlflexibleservers.AzureADAdministrator{
// 	Name: to.Ptr("ActiveDirectory"),
// 	Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers/administrators"),
// 	ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestsvc4/administrators/ActiveDirectory"),
// 	Properties: &armmysqlflexibleservers.AdministratorProperties{
// 		AdministratorType: to.Ptr(armmysqlflexibleservers.AdministratorTypeActiveDirectory),
// 		IdentityResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/test-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-umi"),
// 		Login: to.Ptr("bob@contoso.com"),
// 		Sid: to.Ptr("c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c"),
// 		TenantID: to.Ptr("c12b7025-bfe2-46c1-b463-993b5e4cd467"),
// 	},
// }
Output:

func (*AzureADAdministratorsClient) NewListByServerPager

NewListByServerPager - List all the AAD administrators in a given server.

Generated from API version 2021-12-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serverName - The name of the server.
  • options - AzureADAdministratorsClientListByServerOptions contains the optional parameters for the AzureADAdministratorsClient.NewListByServerPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/preview/2021-12-01-preview/examples/AzureADAdministratorsListByServer.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewAzureADAdministratorsClient().NewListByServerPager("testrg", "mysqltestsvc4", 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.AdministratorListResult = armmysqlflexibleservers.AdministratorListResult{
	// 	Value: []*armmysqlflexibleservers.AzureADAdministrator{
	// 		{
	// 			Name: to.Ptr("ActiveDirectory"),
	// 			Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers/administrators"),
	// 			ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestsvc4/administrators/ActiveDirectory"),
	// 			Properties: &armmysqlflexibleservers.AdministratorProperties{
	// 				AdministratorType: to.Ptr(armmysqlflexibleservers.AdministratorTypeActiveDirectory),
	// 				IdentityResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/test-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-umi"),
	// 				Login: to.Ptr("bob@contoso.com"),
	// 				Sid: to.Ptr("c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c"),
	// 				TenantID: to.Ptr("c12b7025-bfe2-46c1-b463-993b5e4cd467"),
	// 			},
	// 	}},
	// }
}
Output:

type AzureADAdministratorsClientBeginCreateOrUpdateOptions

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

AzureADAdministratorsClientBeginCreateOrUpdateOptions contains the optional parameters for the AzureADAdministratorsClient.BeginCreateOrUpdate method.

type AzureADAdministratorsClientBeginDeleteOptions

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

AzureADAdministratorsClientBeginDeleteOptions contains the optional parameters for the AzureADAdministratorsClient.BeginDelete method.

type AzureADAdministratorsClientCreateOrUpdateResponse

type AzureADAdministratorsClientCreateOrUpdateResponse struct {
	// Represents a Administrator.
	AzureADAdministrator
}

AzureADAdministratorsClientCreateOrUpdateResponse contains the response from method AzureADAdministratorsClient.BeginCreateOrUpdate.

type AzureADAdministratorsClientDeleteResponse

type AzureADAdministratorsClientDeleteResponse struct {
}

AzureADAdministratorsClientDeleteResponse contains the response from method AzureADAdministratorsClient.BeginDelete.

type AzureADAdministratorsClientGetOptions

type AzureADAdministratorsClientGetOptions struct {
}

AzureADAdministratorsClientGetOptions contains the optional parameters for the AzureADAdministratorsClient.Get method.

type AzureADAdministratorsClientGetResponse

type AzureADAdministratorsClientGetResponse struct {
	// Represents a Administrator.
	AzureADAdministrator
}

AzureADAdministratorsClientGetResponse contains the response from method AzureADAdministratorsClient.Get.

type AzureADAdministratorsClientListByServerOptions

type AzureADAdministratorsClientListByServerOptions struct {
}

AzureADAdministratorsClientListByServerOptions contains the optional parameters for the AzureADAdministratorsClient.NewListByServerPager method.

type AzureADAdministratorsClientListByServerResponse

type AzureADAdministratorsClientListByServerResponse struct {
	// A List of azure ad administrators.
	AdministratorListResult
}

AzureADAdministratorsClientListByServerResponse contains the response from method AzureADAdministratorsClient.NewListByServerPager.

type Backup

type Backup struct {
	// Backup retention days for the server.
	BackupRetentionDays *int32

	// Whether or not geo redundant backup is enabled.
	GeoRedundantBackup *EnableStatusEnum

	// READ-ONLY; Earliest restore point creation time (ISO8601 format)
	EarliestRestoreDate *time.Time
}

Backup - Storage Profile properties of a server

func (Backup) MarshalJSON

func (b Backup) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Backup.

func (*Backup) UnmarshalJSON

func (b *Backup) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Backup.

type BackupAndExportClient

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

BackupAndExportClient contains the methods for the BackupAndExport group. Don't use this type directly, use NewBackupAndExportClient() instead.

func NewBackupAndExportClient

func NewBackupAndExportClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BackupAndExportClient, error)

NewBackupAndExportClient creates a new instance of BackupAndExportClient with the specified values.

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

func (*BackupAndExportClient) BeginCreate

BeginCreate - Exports the backup of the given server by creating a backup if not existing. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-09-30-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serverName - The name of the server.
  • parameters - The required parameters for creating and exporting backup of the given server.
  • options - BackupAndExportClientBeginCreateOptions contains the optional parameters for the BackupAndExportClient.BeginCreate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2022-09-30-preview/examples/BackupAndExport.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewBackupAndExportClient().BeginCreate(ctx, "TestGroup", "mysqltestserver", armmysqlflexibleservers.BackupAndExportRequest{
	BackupSettings: &armmysqlflexibleservers.BackupSettings{
		BackupName: to.Ptr("customer-backup-name"),
	},
	TargetDetails: &armmysqlflexibleservers.FullBackupStoreDetails{
		ObjectType: to.Ptr("FullBackupStoreDetails"),
		SasURIList: []*string{
			to.Ptr("sasuri1"),
			to.Ptr("sasuri2")},
	},
}, 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.BackupAndExportResponse = armmysqlflexibleservers.BackupAndExportResponse{
// 	Name: to.Ptr("custom-backup101"),
// 	Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers/backupAndExport"),
// 	ID: to.Ptr("/subscriptions/cb9d743d-2140-4e73-b871-cd31abab1d2f/resourceGroups/mrgsumitkumatest1/providers/Microsoft.DBforMySQL/flexibleServers/servermysql-01/backupAndExport/custom-backup101"),
// 	EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-29T07:37:05.640Z"); return t}()),
// 	Error: &armmysqlflexibleservers.ErrorResponse{
// 		Code: to.Ptr("AggregateException"),
// 		Message: to.Ptr("System.AggregateException: One or more errors occurred. (Mismatch in count of number of Commited-Blocks from service.)"),
// 	},
// 	PercentComplete: to.Ptr[float64](100),
// 	Properties: &armmysqlflexibleservers.BackupAndExportResponseProperties{
// 		BackupMetadata: to.Ptr("{\"key1\":\"value1\",\"key2\":\"value2\"}"),
// 		DataTransferredInBytes: to.Ptr[int64](1024),
// 		DatasourceSizeInBytes: to.Ptr[int64](1024),
// 	},
// 	StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-29T07:34:02.328Z"); return t}()),
// 	Status: to.Ptr(armmysqlflexibleservers.OperationStatusFailed),
// }
Output:

func (*BackupAndExportClient) ValidateBackup

ValidateBackup - Validates if backup can be performed for given server. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-09-30-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serverName - The name of the server.
  • options - BackupAndExportClientValidateBackupOptions contains the optional parameters for the BackupAndExportClient.ValidateBackup method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2022-09-30-preview/examples/ValidateBackup.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewBackupAndExportClient().ValidateBackup(ctx, "TestGroup", "mysqltestserver", 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.ValidateBackupResponse = armmysqlflexibleservers.ValidateBackupResponse{
// 	Properties: &armmysqlflexibleservers.ValidateBackupResponseProperties{
// 		NumberOfContainers: to.Ptr[int32](1),
// 	},
// }
Output:

type BackupAndExportClientBeginCreateOptions

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

BackupAndExportClientBeginCreateOptions contains the optional parameters for the BackupAndExportClient.BeginCreate method.

type BackupAndExportClientCreateResponse

type BackupAndExportClientCreateResponse struct {
	// Represents BackupAndExport API Response
	BackupAndExportResponse
}

BackupAndExportClientCreateResponse contains the response from method BackupAndExportClient.BeginCreate.

type BackupAndExportClientValidateBackupOptions

type BackupAndExportClientValidateBackupOptions struct {
}

BackupAndExportClientValidateBackupOptions contains the optional parameters for the BackupAndExportClient.ValidateBackup method.

type BackupAndExportClientValidateBackupResponse

type BackupAndExportClientValidateBackupResponse struct {
	// Represents ValidateBackup API Response
	ValidateBackupResponse
}

BackupAndExportClientValidateBackupResponse contains the response from method BackupAndExportClient.ValidateBackup.

type BackupAndExportRequest

type BackupAndExportRequest struct {
	// REQUIRED; Backup Settings
	BackupSettings *BackupSettings

	// REQUIRED; Backup Target Store Details
	TargetDetails BackupStoreDetailsClassification
}

BackupAndExportRequest - BackupAndExport API Request

func (BackupAndExportRequest) MarshalJSON

func (b BackupAndExportRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BackupAndExportRequest.

func (*BackupAndExportRequest) UnmarshalJSON

func (b *BackupAndExportRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type BackupAndExportRequest.

type BackupAndExportResponse

type BackupAndExportResponse struct {
	// End time
	EndTime *time.Time

	// The BackupAndExport operation error response.
	Error *ErrorResponse

	// Operation progress (0-100).
	PercentComplete *float64

	// The response properties of a backup and export operation.
	Properties *BackupAndExportResponseProperties

	// Start time
	StartTime *time.Time

	// The operation status
	Status *OperationStatus

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

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

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

BackupAndExportResponse - Represents BackupAndExport API Response

func (BackupAndExportResponse) MarshalJSON

func (b BackupAndExportResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BackupAndExportResponse.

func (*BackupAndExportResponse) UnmarshalJSON

func (b *BackupAndExportResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type BackupAndExportResponse.

type BackupAndExportResponseProperties

type BackupAndExportResponseProperties struct {
	// Metadata related to backup to be stored for restoring resource in key-value pairs.
	BackupMetadata *string

	// Data transferred in bytes
	DataTransferredInBytes *int64

	// Size of datasource in bytes
	DatasourceSizeInBytes *int64
}

BackupAndExportResponseProperties - BackupAndExport Response Properties

func (BackupAndExportResponseProperties) MarshalJSON

func (b BackupAndExportResponseProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BackupAndExportResponseProperties.

func (*BackupAndExportResponseProperties) UnmarshalJSON

func (b *BackupAndExportResponseProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type BackupAndExportResponseProperties.

type BackupFormat

type BackupFormat string

BackupFormat - Backup Format for the current backup. (CollatedFormat is INTERNAL – DO NOT USE)

const (
	BackupFormatCollatedFormat BackupFormat = "CollatedFormat"
	BackupFormatNone           BackupFormat = "None"
)

func PossibleBackupFormatValues

func PossibleBackupFormatValues() []BackupFormat

PossibleBackupFormatValues returns the possible values for the BackupFormat const type.

type BackupRequestBase

type BackupRequestBase struct {
	// REQUIRED; Backup Settings
	BackupSettings *BackupSettings
}

BackupRequestBase is the base for all backup request.

func (BackupRequestBase) MarshalJSON

func (b BackupRequestBase) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BackupRequestBase.

func (*BackupRequestBase) UnmarshalJSON

func (b *BackupRequestBase) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type BackupRequestBase.

type BackupSettings

type BackupSettings struct {
	// REQUIRED; The name of the backup.
	BackupName *string

	// Backup Format for the current backup. (CollatedFormat is INTERNAL – DO NOT USE)
	BackupFormat *BackupFormat
}

BackupSettings - Backup Settings

func (BackupSettings) MarshalJSON

func (b BackupSettings) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BackupSettings.

func (*BackupSettings) UnmarshalJSON

func (b *BackupSettings) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type BackupSettings.

type BackupStoreDetails

type BackupStoreDetails struct {
	// REQUIRED; Type of the specific object - used for deserializing
	ObjectType *string
}

BackupStoreDetails - Details about the target where the backup content will be stored.

func (*BackupStoreDetails) GetBackupStoreDetails

func (b *BackupStoreDetails) GetBackupStoreDetails() *BackupStoreDetails

GetBackupStoreDetails implements the BackupStoreDetailsClassification interface for type BackupStoreDetails.

func (BackupStoreDetails) MarshalJSON

func (b BackupStoreDetails) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BackupStoreDetails.

func (*BackupStoreDetails) UnmarshalJSON

func (b *BackupStoreDetails) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type BackupStoreDetails.

type BackupStoreDetailsClassification

type BackupStoreDetailsClassification interface {
	// GetBackupStoreDetails returns the BackupStoreDetails content of the underlying type.
	GetBackupStoreDetails() *BackupStoreDetails
}

BackupStoreDetailsClassification provides polymorphic access to related types. Call the interface's GetBackupStoreDetails() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *BackupStoreDetails, *FullBackupStoreDetails

type BackupsClient

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

BackupsClient contains the methods for the Backups group. Don't use this type directly, use NewBackupsClient() instead.

func NewBackupsClient

func NewBackupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BackupsClient, error)

NewBackupsClient creates a new instance of BackupsClient with the specified values.

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

func (*BackupsClient) Get

func (client *BackupsClient) Get(ctx context.Context, resourceGroupName string, serverName string, backupName string, options *BackupsClientGetOptions) (BackupsClientGetResponse, error)

Get - List all the backups for a given server. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-09-30-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serverName - The name of the server.
  • backupName - The name of the backup.
  • options - BackupsClientGetOptions contains the optional parameters for the BackupsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2022-09-30-preview/examples/BackupGet.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewBackupsClient().Get(ctx, "TestGroup", "mysqltestserver", "daily_20210615T160516", 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.ServerBackup = armmysqlflexibleservers.ServerBackup{
// 	Name: to.Ptr("daily_20210615T160516"),
// 	Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers/backups"),
// 	ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver/backups/daily_20210615T160516"),
// 	Properties: &armmysqlflexibleservers.ServerBackupProperties{
// 		BackupType: to.Ptr("FULL"),
// 		CompletedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-15T16:05:19.902Z"); return t}()),
// 		Source: to.Ptr("Automatic"),
// 	},
// }
Output:

func (*BackupsClient) NewListByServerPager

func (client *BackupsClient) NewListByServerPager(resourceGroupName string, serverName string, options *BackupsClientListByServerOptions) *runtime.Pager[BackupsClientListByServerResponse]

NewListByServerPager - List all the backups for a given server.

Generated from API version 2022-09-30-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serverName - The name of the server.
  • options - BackupsClientListByServerOptions contains the optional parameters for the BackupsClient.NewListByServerPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2022-09-30-preview/examples/BackupsListByServer.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewBackupsClient().NewListByServerPager("TestGroup", "mysqltestserver", 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.ServerBackupListResult = armmysqlflexibleservers.ServerBackupListResult{
	// 	Value: []*armmysqlflexibleservers.ServerBackup{
	// 		{
	// 			Name: to.Ptr("daily_20210615T160516"),
	// 			Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers/backups"),
	// 			ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver/backups/daily_20210615T160516"),
	// 			Properties: &armmysqlflexibleservers.ServerBackupProperties{
	// 				BackupType: to.Ptr("FULL"),
	// 				CompletedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-15T16:05:19.902Z"); return t}()),
	// 				Source: to.Ptr("Automatic"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("daily_20210616T160520"),
	// 			Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers/backups"),
	// 			ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver/backups/daily_20210616T160520"),
	// 			Properties: &armmysqlflexibleservers.ServerBackupProperties{
	// 				BackupType: to.Ptr("FULL"),
	// 				CompletedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-16T16:05:23.924Z"); return t}()),
	// 				Source: to.Ptr("Automatic"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("daily_20210617T160525"),
	// 			Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers/backups"),
	// 			ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver/backups/daily_20210617T160525"),
	// 			Properties: &armmysqlflexibleservers.ServerBackupProperties{
	// 				BackupType: to.Ptr("FULL"),
	// 				CompletedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-17T16:05:28.124Z"); return t}()),
	// 				Source: to.Ptr("Automatic"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("daily_20210618T160529"),
	// 			Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers/backups"),
	// 			ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver/backups/daily_20210618T160529"),
	// 			Properties: &armmysqlflexibleservers.ServerBackupProperties{
	// 				BackupType: to.Ptr("FULL"),
	// 				CompletedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-18T16:05:32.273Z"); return t}()),
	// 				Source: to.Ptr("Automatic"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("daily_20210619T160533"),
	// 			Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers/backups"),
	// 			ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver/backups/daily_20210619T160533"),
	// 			Properties: &armmysqlflexibleservers.ServerBackupProperties{
	// 				BackupType: to.Ptr("FULL"),
	// 				CompletedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-19T16:05:36.860Z"); return t}()),
	// 				Source: to.Ptr("Automatic"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("daily_20210620T160538"),
	// 			Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers/backups"),
	// 			ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver/backups/daily_20210620T160538"),
	// 			Properties: &armmysqlflexibleservers.ServerBackupProperties{
	// 				BackupType: to.Ptr("FULL"),
	// 				CompletedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-20T16:05:41.920Z"); return t}()),
	// 				Source: to.Ptr("Automatic"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("daily_20210621T160543"),
	// 			Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers/backups"),
	// 			ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver/backups/daily_20210621T160543"),
	// 			Properties: &armmysqlflexibleservers.ServerBackupProperties{
	// 				BackupType: to.Ptr("FULL"),
	// 				CompletedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-21T16:05:48.852Z"); return t}()),
	// 				Source: to.Ptr("Automatic"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("daily_20210622T160803"),
	// 			Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers/backups"),
	// 			ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver/backups/daily_20210622T160803"),
	// 			Properties: &armmysqlflexibleservers.ServerBackupProperties{
	// 				BackupType: to.Ptr("FULL"),
	// 				CompletedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-22T16:08:06.312Z"); return t}()),
	// 				Source: to.Ptr("Automatic"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("daily_20210622T210807"),
	// 			Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers/backups"),
	// 			ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver/backups/daily_20210622T210807"),
	// 			Properties: &armmysqlflexibleservers.ServerBackupProperties{
	// 				BackupType: to.Ptr("FULL"),
	// 				CompletedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-22T21:08:10.505Z"); return t}()),
	// 				Source: to.Ptr("Automatic"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("daily_20210623T212413"),
	// 			Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers/backups"),
	// 			ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver/backups/daily_20210623T212413"),
	// 			Properties: &armmysqlflexibleservers.ServerBackupProperties{
	// 				BackupType: to.Ptr("FULL"),
	// 				CompletedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-23T21:24:16.940Z"); return t}()),
	// 				Source: to.Ptr("Automatic"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("daily_20210624T061328"),
	// 			Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers/backups"),
	// 			ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver/backups/daily_20210624T061328"),
	// 			Properties: &armmysqlflexibleservers.ServerBackupProperties{
	// 				BackupType: to.Ptr("FULL"),
	// 				CompletedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-24T06:13:31.496Z"); return t}()),
	// 				Source: to.Ptr("Automatic"),
	// 			},
	// 	}},
	// }
}
Output:

func (*BackupsClient) Put

func (client *BackupsClient) Put(ctx context.Context, resourceGroupName string, serverName string, backupName string, options *BackupsClientPutOptions) (BackupsClientPutResponse, error)

Put - Create backup for a given server with specified backup name. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-09-30-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serverName - The name of the server.
  • backupName - The name of the backup.
  • options - BackupsClientPutOptions contains the optional parameters for the BackupsClient.Put method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2022-09-30-preview/examples/BackupPut.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewBackupsClient().Put(ctx, "TestGroup", "mysqltestserver", "mybackup", 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.ServerBackup = armmysqlflexibleservers.ServerBackup{
// 	Name: to.Ptr("customer_20220507t073755_bb392c3b-17c6-4d3f-9742-8479ca87b3ac_mybackup"),
// 	Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers/backups"),
// 	ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver/backups/customer_20220507t073755_bb392c3b-17c6-4d3f-9742-8479ca87b3ac_mybackup"),
// 	Properties: &armmysqlflexibleservers.ServerBackupProperties{
// 		BackupType: to.Ptr("FULL"),
// 		CompletedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-05-07T07:38:01.149Z"); return t}()),
// 		Source: to.Ptr("Automatic"),
// 	},
// }
Output:

type BackupsClientGetOptions

type BackupsClientGetOptions struct {
}

BackupsClientGetOptions contains the optional parameters for the BackupsClient.Get method.

type BackupsClientGetResponse

type BackupsClientGetResponse struct {
	// Server backup properties
	ServerBackup
}

BackupsClientGetResponse contains the response from method BackupsClient.Get.

type BackupsClientListByServerOptions

type BackupsClientListByServerOptions struct {
}

BackupsClientListByServerOptions contains the optional parameters for the BackupsClient.NewListByServerPager method.

type BackupsClientListByServerResponse

type BackupsClientListByServerResponse struct {
	// A list of server backups.
	ServerBackupListResult
}

BackupsClientListByServerResponse contains the response from method BackupsClient.NewListByServerPager.

type BackupsClientPutOptions

type BackupsClientPutOptions struct {
}

BackupsClientPutOptions contains the optional parameters for the BackupsClient.Put method.

type BackupsClientPutResponse

type BackupsClientPutResponse struct {
	// Server backup properties
	ServerBackup
}

BackupsClientPutResponse contains the response from method BackupsClient.Put.

type CapabilitiesListResult

type CapabilitiesListResult struct {
	// READ-ONLY; Link to retrieve next page of results.
	NextLink *string

	// READ-ONLY; A list of supported capabilities.
	Value []*CapabilityProperties
}

CapabilitiesListResult - location capability

func (CapabilitiesListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CapabilitiesListResult.

func (*CapabilitiesListResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CapabilitiesListResult.

type CapabilityProperties

type CapabilityProperties struct {
	// READ-ONLY; A list of supported flexible server editions.
	SupportedFlexibleServerEditions []*ServerEditionCapability

	// READ-ONLY; supported geo backup regions
	SupportedGeoBackupRegions []*string

	// READ-ONLY; Supported high availability mode
	SupportedHAMode []*string

	// READ-ONLY; zone name
	Zone *string
}

CapabilityProperties - Location capabilities.

func (CapabilityProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CapabilityProperties.

func (*CapabilityProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CapabilityProperties.

type CheckNameAvailabilityClient

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

CheckNameAvailabilityClient contains the methods for the CheckNameAvailability group. Don't use this type directly, use NewCheckNameAvailabilityClient() instead.

func NewCheckNameAvailabilityClient

func NewCheckNameAvailabilityClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CheckNameAvailabilityClient, error)

NewCheckNameAvailabilityClient creates a new instance of CheckNameAvailabilityClient with the specified values.

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

func (*CheckNameAvailabilityClient) Execute

Execute - Check the availability of name for server If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-12-01-preview

  • locationName - The name of the location.
  • nameAvailabilityRequest - The required parameters for checking if server name is available.
  • options - CheckNameAvailabilityClientExecuteOptions contains the optional parameters for the CheckNameAvailabilityClient.Execute method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2021-12-01-preview/examples/CheckNameAvailability.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewCheckNameAvailabilityClient().Execute(ctx, "SouthEastAsia", armmysqlflexibleservers.NameAvailabilityRequest{
	Name: to.Ptr("name1"),
	Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers"),
}, 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.NameAvailability = armmysqlflexibleservers.NameAvailability{
// 	Message: to.Ptr(""),
// 	NameAvailable: to.Ptr(true),
// 	Reason: to.Ptr(""),
// }
Output:

type CheckNameAvailabilityClientExecuteOptions

type CheckNameAvailabilityClientExecuteOptions struct {
}

CheckNameAvailabilityClientExecuteOptions contains the optional parameters for the CheckNameAvailabilityClient.Execute method.

type CheckNameAvailabilityClientExecuteResponse

type CheckNameAvailabilityClientExecuteResponse struct {
	// Represents a resource name availability.
	NameAvailability
}

CheckNameAvailabilityClientExecuteResponse contains the response from method CheckNameAvailabilityClient.Execute.

type CheckNameAvailabilityWithoutLocationClient

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

CheckNameAvailabilityWithoutLocationClient contains the methods for the CheckNameAvailabilityWithoutLocation group. Don't use this type directly, use NewCheckNameAvailabilityWithoutLocationClient() instead.

func NewCheckNameAvailabilityWithoutLocationClient

func NewCheckNameAvailabilityWithoutLocationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CheckNameAvailabilityWithoutLocationClient, error)

NewCheckNameAvailabilityWithoutLocationClient creates a new instance of CheckNameAvailabilityWithoutLocationClient with the specified values.

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

func (*CheckNameAvailabilityWithoutLocationClient) Execute

Execute - Check the availability of name for server If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-12-01-preview

  • nameAvailabilityRequest - The required parameters for checking if server name is available.
  • options - CheckNameAvailabilityWithoutLocationClientExecuteOptions contains the optional parameters for the CheckNameAvailabilityWithoutLocationClient.Execute method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2021-12-01-preview/examples/CheckNameAvailability.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewCheckNameAvailabilityWithoutLocationClient().Execute(ctx, armmysqlflexibleservers.NameAvailabilityRequest{
	Name: to.Ptr("name1"),
	Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers"),
}, 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.NameAvailability = armmysqlflexibleservers.NameAvailability{
// 	Message: to.Ptr(""),
// 	NameAvailable: to.Ptr(true),
// 	Reason: to.Ptr(""),
// }
Output:

type CheckNameAvailabilityWithoutLocationClientExecuteOptions

type CheckNameAvailabilityWithoutLocationClientExecuteOptions struct {
}

CheckNameAvailabilityWithoutLocationClientExecuteOptions contains the optional parameters for the CheckNameAvailabilityWithoutLocationClient.Execute method.

type CheckNameAvailabilityWithoutLocationClientExecuteResponse

type CheckNameAvailabilityWithoutLocationClientExecuteResponse struct {
	// Represents a resource name availability.
	NameAvailability
}

CheckNameAvailabilityWithoutLocationClientExecuteResponse contains the response from method CheckNameAvailabilityWithoutLocationClient.Execute.

type CheckVirtualNetworkSubnetUsageClient

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

CheckVirtualNetworkSubnetUsageClient contains the methods for the CheckVirtualNetworkSubnetUsage group. Don't use this type directly, use NewCheckVirtualNetworkSubnetUsageClient() instead.

func NewCheckVirtualNetworkSubnetUsageClient

func NewCheckVirtualNetworkSubnetUsageClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CheckVirtualNetworkSubnetUsageClient, error)

NewCheckVirtualNetworkSubnetUsageClient creates a new instance of CheckVirtualNetworkSubnetUsageClient with the specified values.

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

func (*CheckVirtualNetworkSubnetUsageClient) Execute

Execute - Get virtual network subnet usage for a given vNet resource id. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-12-01-preview

  • locationName - The name of the location.
  • parameters - The required parameters for creating or updating a server.
  • options - CheckVirtualNetworkSubnetUsageClientExecuteOptions contains the optional parameters for the CheckVirtualNetworkSubnetUsageClient.Execute method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2021-12-01-preview/examples/CheckVirtualNetworkSubnetUsage.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewCheckVirtualNetworkSubnetUsageClient().Execute(ctx, "WestUS", armmysqlflexibleservers.VirtualNetworkSubnetUsageParameter{
	VirtualNetworkResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/testvnet"),
}, 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.VirtualNetworkSubnetUsageResult = armmysqlflexibleservers.VirtualNetworkSubnetUsageResult{
// 	DelegatedSubnetsUsage: []*armmysqlflexibleservers.DelegatedSubnetUsage{
// 		{
// 			SubnetName: to.Ptr("test-subnet-1"),
// 			Usage: to.Ptr[int64](2),
// 		},
// 		{
// 			SubnetName: to.Ptr("test-subnet-2"),
// 			Usage: to.Ptr[int64](3),
// 	}},
// 	Location: to.Ptr("WestUS"),
// 	SubscriptionID: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff"),
// }
Output:

type CheckVirtualNetworkSubnetUsageClientExecuteOptions

type CheckVirtualNetworkSubnetUsageClientExecuteOptions struct {
}

CheckVirtualNetworkSubnetUsageClientExecuteOptions contains the optional parameters for the CheckVirtualNetworkSubnetUsageClient.Execute method.

type CheckVirtualNetworkSubnetUsageClientExecuteResponse

type CheckVirtualNetworkSubnetUsageClientExecuteResponse struct {
	// Virtual network subnet usage data.
	VirtualNetworkSubnetUsageResult
}

CheckVirtualNetworkSubnetUsageClientExecuteResponse contains the response from method CheckVirtualNetworkSubnetUsageClient.Execute.

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

func (*ClientFactory) NewAzureADAdministratorsClient

func (c *ClientFactory) NewAzureADAdministratorsClient() *AzureADAdministratorsClient

NewAzureADAdministratorsClient creates a new instance of AzureADAdministratorsClient.

func (*ClientFactory) NewBackupAndExportClient

func (c *ClientFactory) NewBackupAndExportClient() *BackupAndExportClient

NewBackupAndExportClient creates a new instance of BackupAndExportClient.

func (*ClientFactory) NewBackupsClient

func (c *ClientFactory) NewBackupsClient() *BackupsClient

NewBackupsClient creates a new instance of BackupsClient.

func (*ClientFactory) NewCheckNameAvailabilityClient

func (c *ClientFactory) NewCheckNameAvailabilityClient() *CheckNameAvailabilityClient

NewCheckNameAvailabilityClient creates a new instance of CheckNameAvailabilityClient.

func (*ClientFactory) NewCheckNameAvailabilityWithoutLocationClient

func (c *ClientFactory) NewCheckNameAvailabilityWithoutLocationClient() *CheckNameAvailabilityWithoutLocationClient

NewCheckNameAvailabilityWithoutLocationClient creates a new instance of CheckNameAvailabilityWithoutLocationClient.

func (*ClientFactory) NewCheckVirtualNetworkSubnetUsageClient

func (c *ClientFactory) NewCheckVirtualNetworkSubnetUsageClient() *CheckVirtualNetworkSubnetUsageClient

NewCheckVirtualNetworkSubnetUsageClient creates a new instance of CheckVirtualNetworkSubnetUsageClient.

func (*ClientFactory) NewConfigurationsClient

func (c *ClientFactory) NewConfigurationsClient() *ConfigurationsClient

NewConfigurationsClient creates a new instance of ConfigurationsClient.

func (*ClientFactory) NewDatabasesClient

func (c *ClientFactory) NewDatabasesClient() *DatabasesClient

NewDatabasesClient creates a new instance of DatabasesClient.

func (*ClientFactory) NewFirewallRulesClient

func (c *ClientFactory) NewFirewallRulesClient() *FirewallRulesClient

NewFirewallRulesClient creates a new instance of FirewallRulesClient.

func (*ClientFactory) NewGetPrivateDNSZoneSuffixClient

func (c *ClientFactory) NewGetPrivateDNSZoneSuffixClient() *GetPrivateDNSZoneSuffixClient

NewGetPrivateDNSZoneSuffixClient creates a new instance of GetPrivateDNSZoneSuffixClient.

func (*ClientFactory) NewLocationBasedCapabilitiesClient

func (c *ClientFactory) NewLocationBasedCapabilitiesClient() *LocationBasedCapabilitiesClient

NewLocationBasedCapabilitiesClient creates a new instance of LocationBasedCapabilitiesClient.

func (*ClientFactory) NewLogFilesClient

func (c *ClientFactory) NewLogFilesClient() *LogFilesClient

NewLogFilesClient creates a new instance of LogFilesClient.

func (*ClientFactory) NewOperationsClient

func (c *ClientFactory) NewOperationsClient() *OperationsClient

NewOperationsClient creates a new instance of OperationsClient.

func (*ClientFactory) NewReplicasClient

func (c *ClientFactory) NewReplicasClient() *ReplicasClient

NewReplicasClient creates a new instance of ReplicasClient.

func (*ClientFactory) NewServersClient

func (c *ClientFactory) NewServersClient() *ServersClient

NewServersClient creates a new instance of ServersClient.

type Configuration

type Configuration struct {
	// The properties of a configuration.
	Properties *ConfigurationProperties

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

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

	// READ-ONLY; The system metadata relating to this resource.
	SystemData *SystemData

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

Configuration - Represents a Configuration.

func (Configuration) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Configuration.

func (*Configuration) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type Configuration.

type ConfigurationForBatchUpdate

type ConfigurationForBatchUpdate struct {
	// Name of the configuration.
	Name *string

	// The properties can be updated for a configuration.
	Properties *ConfigurationForBatchUpdateProperties
}

ConfigurationForBatchUpdate - Represents a Configuration.

func (ConfigurationForBatchUpdate) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ConfigurationForBatchUpdate.

func (*ConfigurationForBatchUpdate) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationForBatchUpdate.

type ConfigurationForBatchUpdateProperties

type ConfigurationForBatchUpdateProperties struct {
	// Source of the configuration.
	Source *string

	// Value of the configuration.
	Value *string
}

ConfigurationForBatchUpdateProperties - The properties can be updated for a configuration.

func (ConfigurationForBatchUpdateProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ConfigurationForBatchUpdateProperties.

func (*ConfigurationForBatchUpdateProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationForBatchUpdateProperties.

type ConfigurationListForBatchUpdate

type ConfigurationListForBatchUpdate struct {
	// Whether to reset all server parameters to default.
	ResetAllToDefault *ResetAllToDefault

	// The list of server configurations.
	Value []*ConfigurationForBatchUpdate
}

ConfigurationListForBatchUpdate - A list of server configurations to update.

func (ConfigurationListForBatchUpdate) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ConfigurationListForBatchUpdate.

func (*ConfigurationListForBatchUpdate) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationListForBatchUpdate.

type ConfigurationListResult

type ConfigurationListResult struct {
	// The link used to get the next page of operations.
	NextLink *string

	// The list of server configurations.
	Value []*Configuration
}

ConfigurationListResult - A list of server configurations.

func (ConfigurationListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ConfigurationListResult.

func (*ConfigurationListResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationListResult.

type ConfigurationProperties

type ConfigurationProperties struct {
	// Current value of the configuration.
	CurrentValue *string

	// Source of the configuration.
	Source *ConfigurationSource

	// Value of the configuration.
	Value *string

	// READ-ONLY; Allowed values of the configuration.
	AllowedValues *string

	// READ-ONLY; Data type of the configuration.
	DataType *string

	// READ-ONLY; Default value of the configuration.
	DefaultValue *string

	// READ-ONLY; Description of the configuration.
	Description *string

	// READ-ONLY; The link used to get the document from community or Azure site.
	DocumentationLink *string

	// READ-ONLY; If is the configuration pending restart or not.
	IsConfigPendingRestart *IsConfigPendingRestart

	// READ-ONLY; If is the configuration dynamic.
	IsDynamicConfig *IsDynamicConfig

	// READ-ONLY; If is the configuration read only.
	IsReadOnly *IsReadOnly
}

ConfigurationProperties - The properties of a configuration.

func (ConfigurationProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ConfigurationProperties.

func (*ConfigurationProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationProperties.

type ConfigurationSource

type ConfigurationSource string

ConfigurationSource - Source of the configuration.

const (
	ConfigurationSourceSystemDefault ConfigurationSource = "system-default"
	ConfigurationSourceUserOverride  ConfigurationSource = "user-override"
)

func PossibleConfigurationSourceValues

func PossibleConfigurationSourceValues() []ConfigurationSource

PossibleConfigurationSourceValues returns the possible values for the ConfigurationSource const type.

type ConfigurationsClient

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

ConfigurationsClient contains the methods for the Configurations group. Don't use this type directly, use NewConfigurationsClient() instead.

func NewConfigurationsClient

func NewConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConfigurationsClient, error)

NewConfigurationsClient creates a new instance of ConfigurationsClient with the specified values.

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

func (*ConfigurationsClient) BeginBatchUpdate

BeginBatchUpdate - Update a list of configurations in a given server. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-12-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serverName - The name of the server.
  • parameters - The parameters for updating a list of server configuration.
  • options - ConfigurationsClientBeginBatchUpdateOptions contains the optional parameters for the ConfigurationsClient.BeginBatchUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2021-12-01-preview/examples/ConfigurationsBatchUpdate.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewConfigurationsClient().BeginBatchUpdate(ctx, "testrg", "mysqltestserver", armmysqlflexibleservers.ConfigurationListForBatchUpdate{
	ResetAllToDefault: to.Ptr(armmysqlflexibleservers.ResetAllToDefaultFalse),
	Value: []*armmysqlflexibleservers.ConfigurationForBatchUpdate{
		{
			Name: to.Ptr("event_scheduler"),
			Properties: &armmysqlflexibleservers.ConfigurationForBatchUpdateProperties{
				Value: to.Ptr("OFF"),
			},
		},
		{
			Name: to.Ptr("div_precision_increment"),
			Properties: &armmysqlflexibleservers.ConfigurationForBatchUpdateProperties{
				Value: to.Ptr("8"),
			},
		}},
}, 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.ConfigurationListResult = armmysqlflexibleservers.ConfigurationListResult{
// 	Value: []*armmysqlflexibleservers.Configuration{
// 		{
// 			Name: to.Ptr("event_scheduler"),
// 			Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers/configurations"),
// 			ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver/configurations/event_scheduler"),
// 			Properties: &armmysqlflexibleservers.ConfigurationProperties{
// 				Description: to.Ptr("Indicates the status of the Event Scheduler. It is always OFF for a replica server to keep the replication consistency."),
// 				AllowedValues: to.Ptr("ON,OFF"),
// 				DataType: to.Ptr("Enumeration"),
// 				DefaultValue: to.Ptr("OFF"),
// 				IsConfigPendingRestart: to.Ptr(armmysqlflexibleservers.IsConfigPendingRestartFalse),
// 				IsDynamicConfig: to.Ptr(armmysqlflexibleservers.IsDynamicConfigTrue),
// 				IsReadOnly: to.Ptr(armmysqlflexibleservers.IsReadOnlyFalse),
// 				Source: to.Ptr(armmysqlflexibleservers.ConfigurationSourceUserOverride),
// 				Value: to.Ptr("ON"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("div_precision_increment"),
// 			Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers/configurations"),
// 			ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver/configurations/div_precision_increment"),
// 			Properties: &armmysqlflexibleservers.ConfigurationProperties{
// 				Description: to.Ptr("Number of digits by which to increase the scale of the result of division operations."),
// 				AllowedValues: to.Ptr("0-30"),
// 				DataType: to.Ptr("Integer"),
// 				DefaultValue: to.Ptr("4"),
// 				IsConfigPendingRestart: to.Ptr(armmysqlflexibleservers.IsConfigPendingRestartFalse),
// 				IsDynamicConfig: to.Ptr(armmysqlflexibleservers.IsDynamicConfigTrue),
// 				IsReadOnly: to.Ptr(armmysqlflexibleservers.IsReadOnlyFalse),
// 				Source: to.Ptr(armmysqlflexibleservers.ConfigurationSourceUserOverride),
// 				Value: to.Ptr("8"),
// 			},
// 	}},
// }
Output:

func (*ConfigurationsClient) BeginCreateOrUpdate

func (client *ConfigurationsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, configurationName string, parameters Configuration, options *ConfigurationsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ConfigurationsClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Updates a configuration of a server. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-12-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serverName - The name of the server.
  • configurationName - The name of the server configuration.
  • parameters - The required parameters for updating a server configuration.
  • options - ConfigurationsClientBeginCreateOrUpdateOptions contains the optional parameters for the ConfigurationsClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2021-12-01-preview/examples/ConfigurationCreateOrUpdate.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewConfigurationsClient().BeginCreateOrUpdate(ctx, "TestGroup", "testserver", "event_scheduler", armmysqlflexibleservers.Configuration{
	Properties: &armmysqlflexibleservers.ConfigurationProperties{
		Source: to.Ptr(armmysqlflexibleservers.ConfigurationSourceUserOverride),
		Value:  to.Ptr("off"),
	},
}, 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.Configuration = armmysqlflexibleservers.Configuration{
// 	Name: to.Ptr("event_scheduler"),
// 	Type: to.Ptr("Microsoft.DBforMySQL/servers/configurations"),
// 	ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/servers/testserver/configurations/event_scheduler"),
// 	Properties: &armmysqlflexibleservers.ConfigurationProperties{
// 		Description: to.Ptr("Indicates the status of the Event Scheduler."),
// 		AllowedValues: to.Ptr("ON,OFF,DISABLED"),
// 		DataType: to.Ptr("Enumeration"),
// 		DefaultValue: to.Ptr("OFF"),
// 		Source: to.Ptr(armmysqlflexibleservers.ConfigurationSourceUserOverride),
// 		Value: to.Ptr("ON"),
// 	},
// }
Output:

func (*ConfigurationsClient) BeginUpdate

func (client *ConfigurationsClient) BeginUpdate(ctx context.Context, resourceGroupName string, serverName string, configurationName string, parameters Configuration, options *ConfigurationsClientBeginUpdateOptions) (*runtime.Poller[ConfigurationsClientUpdateResponse], error)

BeginUpdate - Updates a configuration of a server. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-12-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serverName - The name of the server.
  • configurationName - The name of the server configuration.
  • parameters - The required parameters for updating a server configuration.
  • options - ConfigurationsClientBeginUpdateOptions contains the optional parameters for the ConfigurationsClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2021-12-01-preview/examples/ConfigurationUpdate.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewConfigurationsClient().BeginUpdate(ctx, "testrg", "testserver", "event_scheduler", armmysqlflexibleservers.Configuration{
	Properties: &armmysqlflexibleservers.ConfigurationProperties{
		Source: to.Ptr(armmysqlflexibleservers.ConfigurationSourceUserOverride),
		Value:  to.Ptr("on"),
	},
}, 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.Configuration = armmysqlflexibleservers.Configuration{
// 	Name: to.Ptr("event_scheduler"),
// 	Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers/configurations"),
// 	ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/testserver/configurations/event_scheduler"),
// 	Properties: &armmysqlflexibleservers.ConfigurationProperties{
// 		Description: to.Ptr("Indicates the status of the Event Scheduler. It is always OFF for a replica server to keep the replication consistency."),
// 		AllowedValues: to.Ptr("ON,OFF"),
// 		DataType: to.Ptr("Enumeration"),
// 		DefaultValue: to.Ptr("OFF"),
// 		IsConfigPendingRestart: to.Ptr(armmysqlflexibleservers.IsConfigPendingRestartFalse),
// 		IsDynamicConfig: to.Ptr(armmysqlflexibleservers.IsDynamicConfigTrue),
// 		IsReadOnly: to.Ptr(armmysqlflexibleservers.IsReadOnlyFalse),
// 		Source: to.Ptr(armmysqlflexibleservers.ConfigurationSourceUserOverride),
// 		Value: to.Ptr("ON"),
// 	},
// }
Output:

func (*ConfigurationsClient) Get

func (client *ConfigurationsClient) Get(ctx context.Context, resourceGroupName string, serverName string, configurationName string, options *ConfigurationsClientGetOptions) (ConfigurationsClientGetResponse, error)

Get - Gets information about a configuration of server. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-12-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serverName - The name of the server.
  • configurationName - The name of the server configuration.
  • options - ConfigurationsClientGetOptions contains the optional parameters for the ConfigurationsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2021-12-01-preview/examples/ConfigurationGet.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewConfigurationsClient().Get(ctx, "TestGroup", "testserver", "event_scheduler", 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.Configuration = armmysqlflexibleservers.Configuration{
// 	Name: to.Ptr("event_scheduler"),
// 	Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers/configurations"),
// 	ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/testserver/configurations/event_scheduler"),
// 	Properties: &armmysqlflexibleservers.ConfigurationProperties{
// 		Description: to.Ptr("Indicates the status of the Event Scheduler. It is always OFF for a replica server to keep the replication consistency."),
// 		AllowedValues: to.Ptr("ON,OFF"),
// 		DataType: to.Ptr("Enumeration"),
// 		DefaultValue: to.Ptr("OFF"),
// 		IsConfigPendingRestart: to.Ptr(armmysqlflexibleservers.IsConfigPendingRestartFalse),
// 		IsDynamicConfig: to.Ptr(armmysqlflexibleservers.IsDynamicConfigTrue),
// 		IsReadOnly: to.Ptr(armmysqlflexibleservers.IsReadOnlyFalse),
// 		Source: to.Ptr(armmysqlflexibleservers.ConfigurationSourceSystemDefault),
// 		Value: to.Ptr("OFF"),
// 	},
// }
Output:

func (*ConfigurationsClient) NewListByServerPager

func (client *ConfigurationsClient) NewListByServerPager(resourceGroupName string, serverName string, options *ConfigurationsClientListByServerOptions) *runtime.Pager[ConfigurationsClientListByServerResponse]

NewListByServerPager - List all the configurations in a given server.

Generated from API version 2021-12-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serverName - The name of the server.
  • options - ConfigurationsClientListByServerOptions contains the optional parameters for the ConfigurationsClient.NewListByServerPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2021-12-01-preview/examples/ConfigurationsListByServer.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewConfigurationsClient().NewListByServerPager("testrg", "mysqltestserver", &armmysqlflexibleservers.ConfigurationsClientListByServerOptions{Tags: nil,
	Keyword:  nil,
	Page:     to.Ptr[int32](1),
	PageSize: to.Ptr[int32](8),
})
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.ConfigurationListResult = armmysqlflexibleservers.ConfigurationListResult{
	// 	Value: []*armmysqlflexibleservers.Configuration{
	// 		{
	// 			Name: to.Ptr("archive"),
	// 			Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers/configurations"),
	// 			ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver/configurations/archive"),
	// 			Properties: &armmysqlflexibleservers.ConfigurationProperties{
	// 				Description: to.Ptr("Tell the server to enable or disable archive engine."),
	// 				AllowedValues: to.Ptr("ON,OFF"),
	// 				DataType: to.Ptr("Enumeration"),
	// 				DefaultValue: to.Ptr("OFF"),
	// 				IsConfigPendingRestart: to.Ptr(armmysqlflexibleservers.IsConfigPendingRestartFalse),
	// 				IsDynamicConfig: to.Ptr(armmysqlflexibleservers.IsDynamicConfigFalse),
	// 				IsReadOnly: to.Ptr(armmysqlflexibleservers.IsReadOnlyTrue),
	// 				Source: to.Ptr(armmysqlflexibleservers.ConfigurationSourceSystemDefault),
	// 				Value: to.Ptr("OFF"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("audit_log_enabled"),
	// 			Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers/configurations"),
	// 			ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver/configurations/audit_log_enabled"),
	// 			Properties: &armmysqlflexibleservers.ConfigurationProperties{
	// 				Description: to.Ptr("Allow to audit the log."),
	// 				AllowedValues: to.Ptr("ON,OFF"),
	// 				DataType: to.Ptr("Enumeration"),
	// 				DefaultValue: to.Ptr("OFF"),
	// 				IsConfigPendingRestart: to.Ptr(armmysqlflexibleservers.IsConfigPendingRestartFalse),
	// 				IsDynamicConfig: to.Ptr(armmysqlflexibleservers.IsDynamicConfigTrue),
	// 				IsReadOnly: to.Ptr(armmysqlflexibleservers.IsReadOnlyFalse),
	// 				Source: to.Ptr(armmysqlflexibleservers.ConfigurationSourceSystemDefault),
	// 				Value: to.Ptr("OFF"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("audit_log_events"),
	// 			Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers/configurations"),
	// 			ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver/configurations/audit_log_events"),
	// 			Properties: &armmysqlflexibleservers.ConfigurationProperties{
	// 				Description: to.Ptr("Select the events to audit logs."),
	// 				AllowedValues: to.Ptr("DDL,DML_SELECT,DML_NONSELECT,DCL,ADMIN,DML,GENERAL,CONNECTION,TABLE_ACCESS"),
	// 				DataType: to.Ptr("Set"),
	// 				DefaultValue: to.Ptr("CONNECTION"),
	// 				IsConfigPendingRestart: to.Ptr(armmysqlflexibleservers.IsConfigPendingRestartFalse),
	// 				IsDynamicConfig: to.Ptr(armmysqlflexibleservers.IsDynamicConfigTrue),
	// 				IsReadOnly: to.Ptr(armmysqlflexibleservers.IsReadOnlyFalse),
	// 				Source: to.Ptr(armmysqlflexibleservers.ConfigurationSourceSystemDefault),
	// 				Value: to.Ptr("CONNECTION"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("audit_log_exclude_users"),
	// 			Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers/configurations"),
	// 			ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver/configurations/audit_log_exclude_users"),
	// 			Properties: &armmysqlflexibleservers.ConfigurationProperties{
	// 				Description: to.Ptr("The comma-separated user list whose commands will not be in the audit logs."),
	// 				AllowedValues: to.Ptr(""),
	// 				DataType: to.Ptr("String"),
	// 				DefaultValue: to.Ptr("azure_superuser"),
	// 				IsConfigPendingRestart: to.Ptr(armmysqlflexibleservers.IsConfigPendingRestartFalse),
	// 				IsDynamicConfig: to.Ptr(armmysqlflexibleservers.IsDynamicConfigTrue),
	// 				IsReadOnly: to.Ptr(armmysqlflexibleservers.IsReadOnlyFalse),
	// 				Source: to.Ptr(armmysqlflexibleservers.ConfigurationSourceSystemDefault),
	// 				Value: to.Ptr("azure_superuser"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("audit_log_include_users"),
	// 			Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers/configurations"),
	// 			ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver/configurations/audit_log_include_users"),
	// 			Properties: &armmysqlflexibleservers.ConfigurationProperties{
	// 				Description: to.Ptr("The comma-separated user list whose commands will be in the audit logs. It takes higher priority if the same user name is found in audit_log_exclude_users."),
	// 				AllowedValues: to.Ptr(""),
	// 				DataType: to.Ptr("String"),
	// 				DefaultValue: to.Ptr(""),
	// 				IsConfigPendingRestart: to.Ptr(armmysqlflexibleservers.IsConfigPendingRestartFalse),
	// 				IsDynamicConfig: to.Ptr(armmysqlflexibleservers.IsDynamicConfigTrue),
	// 				IsReadOnly: to.Ptr(armmysqlflexibleservers.IsReadOnlyFalse),
	// 				Source: to.Ptr(armmysqlflexibleservers.ConfigurationSourceSystemDefault),
	// 				Value: to.Ptr(""),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("audit_slow_log_enabled"),
	// 			Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers/configurations"),
	// 			ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver/configurations/audit_slow_log_enabled"),
	// 			Properties: &armmysqlflexibleservers.ConfigurationProperties{
	// 				Description: to.Ptr("Allow to audit the slow log."),
	// 				AllowedValues: to.Ptr("ON,OFF"),
	// 				DataType: to.Ptr("Enumeration"),
	// 				DefaultValue: to.Ptr("ON"),
	// 				IsConfigPendingRestart: to.Ptr(armmysqlflexibleservers.IsConfigPendingRestartFalse),
	// 				IsDynamicConfig: to.Ptr(armmysqlflexibleservers.IsDynamicConfigTrue),
	// 				IsReadOnly: to.Ptr(armmysqlflexibleservers.IsReadOnlyTrue),
	// 				Source: to.Ptr(armmysqlflexibleservers.ConfigurationSourceSystemDefault),
	// 				Value: to.Ptr("ON"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("auto_generate_certs"),
	// 			Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers/configurations"),
	// 			ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver/configurations/auto_generate_certs"),
	// 			Properties: &armmysqlflexibleservers.ConfigurationProperties{
	// 				Description: to.Ptr("Controls whether the server autogenerates SSL key and certificate files in the data directory, if they do not already exist."),
	// 				AllowedValues: to.Ptr("ON,OFF"),
	// 				DataType: to.Ptr("Enumeration"),
	// 				DefaultValue: to.Ptr("OFF"),
	// 				IsConfigPendingRestart: to.Ptr(armmysqlflexibleservers.IsConfigPendingRestartFalse),
	// 				IsDynamicConfig: to.Ptr(armmysqlflexibleservers.IsDynamicConfigFalse),
	// 				IsReadOnly: to.Ptr(armmysqlflexibleservers.IsReadOnlyTrue),
	// 				Source: to.Ptr(armmysqlflexibleservers.ConfigurationSourceSystemDefault),
	// 				Value: to.Ptr("OFF"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("auto_increment_increment"),
	// 			Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers/configurations"),
	// 			ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver/configurations/auto_increment_increment"),
	// 			Properties: &armmysqlflexibleservers.ConfigurationProperties{
	// 				Description: to.Ptr("The auto_increment_increment is intended for use with source-to-source replication, and can be used to control the operation of AUTO_INCREMENT columns."),
	// 				AllowedValues: to.Ptr("1-65535"),
	// 				DataType: to.Ptr("Integer"),
	// 				DefaultValue: to.Ptr("1"),
	// 				IsConfigPendingRestart: to.Ptr(armmysqlflexibleservers.IsConfigPendingRestartFalse),
	// 				IsDynamicConfig: to.Ptr(armmysqlflexibleservers.IsDynamicConfigTrue),
	// 				IsReadOnly: to.Ptr(armmysqlflexibleservers.IsReadOnlyFalse),
	// 				Source: to.Ptr(armmysqlflexibleservers.ConfigurationSourceSystemDefault),
	// 				Value: to.Ptr("1"),
	// 			},
	// 	}},
	// }
}
Output:

type ConfigurationsClientBatchUpdateResponse

type ConfigurationsClientBatchUpdateResponse struct {
	// A list of server configurations.
	ConfigurationListResult
}

ConfigurationsClientBatchUpdateResponse contains the response from method ConfigurationsClient.BeginBatchUpdate.

type ConfigurationsClientBeginBatchUpdateOptions

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

ConfigurationsClientBeginBatchUpdateOptions contains the optional parameters for the ConfigurationsClient.BeginBatchUpdate method.

type ConfigurationsClientBeginCreateOrUpdateOptions

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

ConfigurationsClientBeginCreateOrUpdateOptions contains the optional parameters for the ConfigurationsClient.BeginCreateOrUpdate method.

type ConfigurationsClientBeginUpdateOptions

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

ConfigurationsClientBeginUpdateOptions contains the optional parameters for the ConfigurationsClient.BeginUpdate method.

type ConfigurationsClientCreateOrUpdateResponse

type ConfigurationsClientCreateOrUpdateResponse struct {
	// Represents a Configuration.
	Configuration
}

ConfigurationsClientCreateOrUpdateResponse contains the response from method ConfigurationsClient.BeginCreateOrUpdate.

type ConfigurationsClientGetOptions

type ConfigurationsClientGetOptions struct {
}

ConfigurationsClientGetOptions contains the optional parameters for the ConfigurationsClient.Get method.

type ConfigurationsClientGetResponse

type ConfigurationsClientGetResponse struct {
	// Represents a Configuration.
	Configuration
}

ConfigurationsClientGetResponse contains the response from method ConfigurationsClient.Get.

type ConfigurationsClientListByServerOptions

type ConfigurationsClientListByServerOptions struct {
	// The keyword of the server configuration.
	Keyword *string

	// The page of the server configuration.
	Page *int32

	// The pageSize of the server configuration.
	PageSize *int32

	// The tags of the server configuration.
	Tags *string
}

ConfigurationsClientListByServerOptions contains the optional parameters for the ConfigurationsClient.NewListByServerPager method.

type ConfigurationsClientListByServerResponse

type ConfigurationsClientListByServerResponse struct {
	// A list of server configurations.
	ConfigurationListResult
}

ConfigurationsClientListByServerResponse contains the response from method ConfigurationsClient.NewListByServerPager.

type ConfigurationsClientUpdateResponse

type ConfigurationsClientUpdateResponse struct {
	// Represents a Configuration.
	Configuration
}

ConfigurationsClientUpdateResponse contains the response from method ConfigurationsClient.BeginUpdate.

type CreateMode

type CreateMode string

CreateMode - The mode to create a new MySQL server.

const (
	CreateModeDefault            CreateMode = "Default"
	CreateModeGeoRestore         CreateMode = "GeoRestore"
	CreateModePointInTimeRestore CreateMode = "PointInTimeRestore"
	CreateModeReplica            CreateMode = "Replica"
)

func PossibleCreateModeValues

func PossibleCreateModeValues() []CreateMode

PossibleCreateModeValues returns the possible values for the CreateMode const type.

type CreatedByType

type CreatedByType string

CreatedByType - The type of identity that created the resource.

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

func PossibleCreatedByTypeValues

func PossibleCreatedByTypeValues() []CreatedByType

PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.

type DataEncryption

type DataEncryption struct {
	// Geo backup key uri as key vault can't cross region, need cmk in same region as geo backup
	GeoBackupKeyURI *string

	// Geo backup user identity resource id as identity can't cross region, need identity in same region as geo backup
	GeoBackupUserAssignedIdentityID *string

	// Primary key uri
	PrimaryKeyURI *string

	// Primary user identity resource id
	PrimaryUserAssignedIdentityID *string

	// The key type, AzureKeyVault for enable cmk, SystemManaged for disable cmk.
	Type *DataEncryptionType
}

DataEncryption - The date encryption for cmk.

func (DataEncryption) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DataEncryption.

func (*DataEncryption) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DataEncryption.

type DataEncryptionType

type DataEncryptionType string

DataEncryptionType - The key type, AzureKeyVault for enable cmk, SystemManaged for disable cmk.

const (
	DataEncryptionTypeAzureKeyVault DataEncryptionType = "AzureKeyVault"
	DataEncryptionTypeSystemManaged DataEncryptionType = "SystemManaged"
)

func PossibleDataEncryptionTypeValues

func PossibleDataEncryptionTypeValues() []DataEncryptionType

PossibleDataEncryptionTypeValues returns the possible values for the DataEncryptionType const type.

type Database

type Database struct {
	// The properties of a database.
	Properties *DatabaseProperties

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

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

	// READ-ONLY; The system metadata relating to this resource.
	SystemData *SystemData

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

Database - Represents a Database.

func (Database) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Database.

func (*Database) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type Database.

type DatabaseListResult

type DatabaseListResult struct {
	// The link used to get the next page of operations.
	NextLink *string

	// The list of databases housed in a server
	Value []*Database
}

DatabaseListResult - A List of databases.

func (DatabaseListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DatabaseListResult.

func (*DatabaseListResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseListResult.

type DatabaseProperties

type DatabaseProperties struct {
	// The charset of the database.
	Charset *string

	// The collation of the database.
	Collation *string
}

DatabaseProperties - The properties of a database.

func (DatabaseProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DatabaseProperties.

func (*DatabaseProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseProperties.

type DatabasesClient

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

DatabasesClient contains the methods for the Databases group. Don't use this type directly, use NewDatabasesClient() instead.

func NewDatabasesClient

func NewDatabasesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DatabasesClient, error)

NewDatabasesClient creates a new instance of DatabasesClient with the specified values.

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

func (*DatabasesClient) BeginCreateOrUpdate

func (client *DatabasesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters Database, options *DatabasesClientBeginCreateOrUpdateOptions) (*runtime.Poller[DatabasesClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Creates a new database or updates an existing database. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-12-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serverName - The name of the server.
  • databaseName - The name of the database.
  • parameters - The required parameters for creating or updating a database.
  • options - DatabasesClientBeginCreateOrUpdateOptions contains the optional parameters for the DatabasesClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/preview/2021-12-01-preview/examples/DatabaseCreate.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewDatabasesClient().BeginCreateOrUpdate(ctx, "TestGroup", "testserver", "db1", armmysqlflexibleservers.Database{
	Properties: &armmysqlflexibleservers.DatabaseProperties{
		Charset:   to.Ptr("utf8"),
		Collation: to.Ptr("utf8_general_ci"),
	},
}, 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.Database = armmysqlflexibleservers.Database{
// 	Name: to.Ptr("db1"),
// 	Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers/databases"),
// 	ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/testserver/databases/db1"),
// 	Properties: &armmysqlflexibleservers.DatabaseProperties{
// 		Charset: to.Ptr("utf8"),
// 		Collation: to.Ptr("utf8_general_ci"),
// 	},
// }
Output:

func (*DatabasesClient) BeginDelete

func (client *DatabasesClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DatabasesClientBeginDeleteOptions) (*runtime.Poller[DatabasesClientDeleteResponse], error)

BeginDelete - Deletes a database. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-12-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serverName - The name of the server.
  • databaseName - The name of the database.
  • options - DatabasesClientBeginDeleteOptions contains the optional parameters for the DatabasesClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/preview/2021-12-01-preview/examples/DatabaseDelete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewDatabasesClient().BeginDelete(ctx, "TestGroup", "testserver", "db1", 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 (*DatabasesClient) Get

func (client *DatabasesClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DatabasesClientGetOptions) (DatabasesClientGetResponse, error)

Get - Gets information about a database. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-12-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serverName - The name of the server.
  • databaseName - The name of the database.
  • options - DatabasesClientGetOptions contains the optional parameters for the DatabasesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/preview/2021-12-01-preview/examples/DatabaseGet.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewDatabasesClient().Get(ctx, "TestGroup", "testserver", "db1", 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.Database = armmysqlflexibleservers.Database{
// 	Name: to.Ptr("db1"),
// 	Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers/databases"),
// 	ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/testserver/databases/db1"),
// 	Properties: &armmysqlflexibleservers.DatabaseProperties{
// 		Charset: to.Ptr("utf8"),
// 		Collation: to.Ptr("utf8_general_ci"),
// 	},
// }
Output:

func (*DatabasesClient) NewListByServerPager

func (client *DatabasesClient) NewListByServerPager(resourceGroupName string, serverName string, options *DatabasesClientListByServerOptions) *runtime.Pager[DatabasesClientListByServerResponse]

NewListByServerPager - List all the databases in a given server.

Generated from API version 2021-12-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serverName - The name of the server.
  • options - DatabasesClientListByServerOptions contains the optional parameters for the DatabasesClient.NewListByServerPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/preview/2021-12-01-preview/examples/DatabasesListByServer.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewDatabasesClient().NewListByServerPager("TestGroup", "testserver", 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.DatabaseListResult = armmysqlflexibleservers.DatabaseListResult{
	// 	Value: []*armmysqlflexibleservers.Database{
	// 		{
	// 			Name: to.Ptr("db1"),
	// 			Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers/databases"),
	// 			ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/testserver/databases/db1"),
	// 			Properties: &armmysqlflexibleservers.DatabaseProperties{
	// 				Charset: to.Ptr("utf8"),
	// 				Collation: to.Ptr("utf8_general_ci"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("db2"),
	// 			Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers/databases"),
	// 			ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/testserver/databases/db2"),
	// 			Properties: &armmysqlflexibleservers.DatabaseProperties{
	// 				Charset: to.Ptr("utf8"),
	// 				Collation: to.Ptr("utf8_general_ci"),
	// 			},
	// 	}},
	// }
}
Output:

type DatabasesClientBeginCreateOrUpdateOptions

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

DatabasesClientBeginCreateOrUpdateOptions contains the optional parameters for the DatabasesClient.BeginCreateOrUpdate method.

type DatabasesClientBeginDeleteOptions

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

DatabasesClientBeginDeleteOptions contains the optional parameters for the DatabasesClient.BeginDelete method.

type DatabasesClientCreateOrUpdateResponse

type DatabasesClientCreateOrUpdateResponse struct {
	// Represents a Database.
	Database
}

DatabasesClientCreateOrUpdateResponse contains the response from method DatabasesClient.BeginCreateOrUpdate.

type DatabasesClientDeleteResponse

type DatabasesClientDeleteResponse struct {
}

DatabasesClientDeleteResponse contains the response from method DatabasesClient.BeginDelete.

type DatabasesClientGetOptions

type DatabasesClientGetOptions struct {
}

DatabasesClientGetOptions contains the optional parameters for the DatabasesClient.Get method.

type DatabasesClientGetResponse

type DatabasesClientGetResponse struct {
	// Represents a Database.
	Database
}

DatabasesClientGetResponse contains the response from method DatabasesClient.Get.

type DatabasesClientListByServerOptions

type DatabasesClientListByServerOptions struct {
}

DatabasesClientListByServerOptions contains the optional parameters for the DatabasesClient.NewListByServerPager method.

type DatabasesClientListByServerResponse

type DatabasesClientListByServerResponse struct {
	// A List of databases.
	DatabaseListResult
}

DatabasesClientListByServerResponse contains the response from method DatabasesClient.NewListByServerPager.

type DelegatedSubnetUsage

type DelegatedSubnetUsage struct {
	// READ-ONLY; name of the subnet
	SubnetName *string

	// READ-ONLY; Number of used delegated subnets
	Usage *int64
}

DelegatedSubnetUsage - Delegated subnet usage data.

func (DelegatedSubnetUsage) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DelegatedSubnetUsage.

func (*DelegatedSubnetUsage) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DelegatedSubnetUsage.

type EnableStatusEnum

type EnableStatusEnum string

EnableStatusEnum - Enum to indicate whether value is 'Enabled' or 'Disabled'

const (
	EnableStatusEnumDisabled EnableStatusEnum = "Disabled"
	EnableStatusEnumEnabled  EnableStatusEnum = "Enabled"
)

func PossibleEnableStatusEnumValues

func PossibleEnableStatusEnumValues() []EnableStatusEnum

PossibleEnableStatusEnumValues returns the possible values for the EnableStatusEnum const type.

type ErrorAdditionalInfo

type ErrorAdditionalInfo struct {
	// READ-ONLY; The additional info.
	Info any

	// READ-ONLY; The additional info type.
	Type *string
}

ErrorAdditionalInfo - The resource management error additional info.

func (ErrorAdditionalInfo) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo.

func (*ErrorAdditionalInfo) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorAdditionalInfo.

type ErrorResponse

type ErrorResponse struct {
	// READ-ONLY; The error additional info.
	AdditionalInfo []*ErrorAdditionalInfo

	// READ-ONLY; The error code.
	Code *string

	// READ-ONLY; The error details.
	Details []*ErrorResponse

	// READ-ONLY; The error message.
	Message *string

	// READ-ONLY; The error target.
	Target *string
}

ErrorResponse - Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.)

func (ErrorResponse) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ErrorResponse.

func (*ErrorResponse) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse.

type FirewallRule

type FirewallRule struct {
	// REQUIRED; The properties of a firewall rule.
	Properties *FirewallRuleProperties

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

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

	// READ-ONLY; The system metadata relating to this resource.
	SystemData *SystemData

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

FirewallRule - Represents a server firewall rule.

func (FirewallRule) MarshalJSON

func (f FirewallRule) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type FirewallRule.

func (*FirewallRule) UnmarshalJSON

func (f *FirewallRule) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type FirewallRule.

type FirewallRuleListResult

type FirewallRuleListResult struct {
	// The link used to get the next page of operations.
	NextLink *string

	// The list of firewall rules in a server.
	Value []*FirewallRule
}

FirewallRuleListResult - A list of firewall rules.

func (FirewallRuleListResult) MarshalJSON

func (f FirewallRuleListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type FirewallRuleListResult.

func (*FirewallRuleListResult) UnmarshalJSON

func (f *FirewallRuleListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type FirewallRuleListResult.

type FirewallRuleProperties

type FirewallRuleProperties struct {
	// REQUIRED; The end IP address of the server firewall rule. Must be IPv4 format.
	EndIPAddress *string

	// REQUIRED; The start IP address of the server firewall rule. Must be IPv4 format.
	StartIPAddress *string
}

FirewallRuleProperties - The properties of a server firewall rule.

func (FirewallRuleProperties) MarshalJSON

func (f FirewallRuleProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type FirewallRuleProperties.

func (*FirewallRuleProperties) UnmarshalJSON

func (f *FirewallRuleProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type FirewallRuleProperties.

type FirewallRulesClient

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

FirewallRulesClient contains the methods for the FirewallRules group. Don't use this type directly, use NewFirewallRulesClient() instead.

func NewFirewallRulesClient

func NewFirewallRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FirewallRulesClient, error)

NewFirewallRulesClient creates a new instance of FirewallRulesClient with the specified values.

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

func (*FirewallRulesClient) BeginCreateOrUpdate

func (client *FirewallRulesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string, parameters FirewallRule, options *FirewallRulesClientBeginCreateOrUpdateOptions) (*runtime.Poller[FirewallRulesClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Creates a new firewall rule or updates an existing firewall rule. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-12-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serverName - The name of the server.
  • firewallRuleName - The name of the server firewall rule.
  • parameters - The required parameters for creating or updating a firewall rule.
  • options - FirewallRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the FirewallRulesClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/preview/2021-12-01-preview/examples/FirewallRuleCreate.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewFirewallRulesClient().BeginCreateOrUpdate(ctx, "TestGroup", "testserver", "rule1", armmysqlflexibleservers.FirewallRule{
	Properties: &armmysqlflexibleservers.FirewallRuleProperties{
		EndIPAddress:   to.Ptr("255.255.255.255"),
		StartIPAddress: to.Ptr("0.0.0.0"),
	},
}, 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.FirewallRule = armmysqlflexibleservers.FirewallRule{
// 	Name: to.Ptr("rule1"),
// 	Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers/firewallRules"),
// 	ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/testserver/firewallRules/rule1"),
// 	Properties: &armmysqlflexibleservers.FirewallRuleProperties{
// 		EndIPAddress: to.Ptr("255.255.255.255"),
// 		StartIPAddress: to.Ptr("0.0.0.0"),
// 	},
// }
Output:

func (*FirewallRulesClient) BeginDelete

func (client *FirewallRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string, options *FirewallRulesClientBeginDeleteOptions) (*runtime.Poller[FirewallRulesClientDeleteResponse], error)

BeginDelete - Deletes a firewall rule. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-12-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serverName - The name of the server.
  • firewallRuleName - The name of the server firewall rule.
  • options - FirewallRulesClientBeginDeleteOptions contains the optional parameters for the FirewallRulesClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/preview/2021-12-01-preview/examples/FirewallRuleDelete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewFirewallRulesClient().BeginDelete(ctx, "TestGroup", "testserver", "rule1", 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 (*FirewallRulesClient) Get

func (client *FirewallRulesClient) Get(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string, options *FirewallRulesClientGetOptions) (FirewallRulesClientGetResponse, error)

Get - Gets information about a server firewall rule. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-12-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serverName - The name of the server.
  • firewallRuleName - The name of the server firewall rule.
  • options - FirewallRulesClientGetOptions contains the optional parameters for the FirewallRulesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/preview/2021-12-01-preview/examples/FirewallRuleGet.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewFirewallRulesClient().Get(ctx, "TestGroup", "testserver", "rule1", 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.FirewallRule = armmysqlflexibleservers.FirewallRule{
// 	Name: to.Ptr("rule1"),
// 	Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers/firewallRules"),
// 	ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/testserver/firewallRules/rule1"),
// 	Properties: &armmysqlflexibleservers.FirewallRuleProperties{
// 		EndIPAddress: to.Ptr("255.255.255.255"),
// 		StartIPAddress: to.Ptr("0.0.0.0"),
// 	},
// }
Output:

func (*FirewallRulesClient) NewListByServerPager

func (client *FirewallRulesClient) NewListByServerPager(resourceGroupName string, serverName string, options *FirewallRulesClientListByServerOptions) *runtime.Pager[FirewallRulesClientListByServerResponse]

NewListByServerPager - List all the firewall rules in a given server.

Generated from API version 2021-12-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serverName - The name of the server.
  • options - FirewallRulesClientListByServerOptions contains the optional parameters for the FirewallRulesClient.NewListByServerPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/preview/2021-12-01-preview/examples/FirewallRulesListByServer.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewFirewallRulesClient().NewListByServerPager("TestGroup", "testserver", 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.FirewallRuleListResult = armmysqlflexibleservers.FirewallRuleListResult{
	// 	Value: []*armmysqlflexibleservers.FirewallRule{
	// 		{
	// 			Name: to.Ptr("rule1"),
	// 			Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers/firewallRules"),
	// 			ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/testserver/firewallRules/rule1"),
	// 			Properties: &armmysqlflexibleservers.FirewallRuleProperties{
	// 				EndIPAddress: to.Ptr("255.255.255.255"),
	// 				StartIPAddress: to.Ptr("0.0.0.0"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("rule2"),
	// 			Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers/firewallRules"),
	// 			ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/testserver/firewallRules/rule2"),
	// 			Properties: &armmysqlflexibleservers.FirewallRuleProperties{
	// 				EndIPAddress: to.Ptr("255.0.0.0"),
	// 				StartIPAddress: to.Ptr("1.0.0.0"),
	// 			},
	// 	}},
	// }
}
Output:

type FirewallRulesClientBeginCreateOrUpdateOptions

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

FirewallRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the FirewallRulesClient.BeginCreateOrUpdate method.

type FirewallRulesClientBeginDeleteOptions

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

FirewallRulesClientBeginDeleteOptions contains the optional parameters for the FirewallRulesClient.BeginDelete method.

type FirewallRulesClientCreateOrUpdateResponse

type FirewallRulesClientCreateOrUpdateResponse struct {
	// Represents a server firewall rule.
	FirewallRule
}

FirewallRulesClientCreateOrUpdateResponse contains the response from method FirewallRulesClient.BeginCreateOrUpdate.

type FirewallRulesClientDeleteResponse

type FirewallRulesClientDeleteResponse struct {
}

FirewallRulesClientDeleteResponse contains the response from method FirewallRulesClient.BeginDelete.

type FirewallRulesClientGetOptions

type FirewallRulesClientGetOptions struct {
}

FirewallRulesClientGetOptions contains the optional parameters for the FirewallRulesClient.Get method.

type FirewallRulesClientGetResponse

type FirewallRulesClientGetResponse struct {
	// Represents a server firewall rule.
	FirewallRule
}

FirewallRulesClientGetResponse contains the response from method FirewallRulesClient.Get.

type FirewallRulesClientListByServerOptions

type FirewallRulesClientListByServerOptions struct {
}

FirewallRulesClientListByServerOptions contains the optional parameters for the FirewallRulesClient.NewListByServerPager method.

type FirewallRulesClientListByServerResponse

type FirewallRulesClientListByServerResponse struct {
	// A list of firewall rules.
	FirewallRuleListResult
}

FirewallRulesClientListByServerResponse contains the response from method FirewallRulesClient.NewListByServerPager.

type FullBackupStoreDetails

type FullBackupStoreDetails struct {
	// REQUIRED; Type of the specific object - used for deserializing
	ObjectType *string

	// REQUIRED; SASUriList of storage containers where backup data is to be streamed/copied.
	SasURIList []*string
}

FullBackupStoreDetails is used for scenarios where backup data is streamed/copied over to a storage destination.

func (*FullBackupStoreDetails) GetBackupStoreDetails

func (f *FullBackupStoreDetails) GetBackupStoreDetails() *BackupStoreDetails

GetBackupStoreDetails implements the BackupStoreDetailsClassification interface for type FullBackupStoreDetails.

func (FullBackupStoreDetails) MarshalJSON

func (f FullBackupStoreDetails) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type FullBackupStoreDetails.

func (*FullBackupStoreDetails) UnmarshalJSON

func (f *FullBackupStoreDetails) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type FullBackupStoreDetails.

type GetPrivateDNSZoneSuffixClient

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

GetPrivateDNSZoneSuffixClient contains the methods for the GetPrivateDNSZoneSuffix group. Don't use this type directly, use NewGetPrivateDNSZoneSuffixClient() instead.

func NewGetPrivateDNSZoneSuffixClient

func NewGetPrivateDNSZoneSuffixClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*GetPrivateDNSZoneSuffixClient, error)

NewGetPrivateDNSZoneSuffixClient creates a new instance of GetPrivateDNSZoneSuffixClient with the specified values.

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

func (*GetPrivateDNSZoneSuffixClient) Execute

Execute - Get private DNS zone suffix in the cloud. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-12-01-preview

  • options - GetPrivateDNSZoneSuffixClientExecuteOptions contains the optional parameters for the GetPrivateDNSZoneSuffixClient.Execute method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2021-12-01-preview/examples/GetPrivateDnsZoneSuffix.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewGetPrivateDNSZoneSuffixClient().Execute(ctx, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.GetPrivateDNSZoneSuffixResponse = armmysqlflexibleservers.GetPrivateDNSZoneSuffixResponse{
// 	PrivateDNSZoneSuffix: to.Ptr("suffix-example"),
// }
Output:

type GetPrivateDNSZoneSuffixClientExecuteOptions

type GetPrivateDNSZoneSuffixClientExecuteOptions struct {
}

GetPrivateDNSZoneSuffixClientExecuteOptions contains the optional parameters for the GetPrivateDNSZoneSuffixClient.Execute method.

type GetPrivateDNSZoneSuffixClientExecuteResponse

type GetPrivateDNSZoneSuffixClientExecuteResponse struct {
	// The response of get private dns zone suffix.
	GetPrivateDNSZoneSuffixResponse
}

GetPrivateDNSZoneSuffixClientExecuteResponse contains the response from method GetPrivateDNSZoneSuffixClient.Execute.

type GetPrivateDNSZoneSuffixResponse

type GetPrivateDNSZoneSuffixResponse struct {
	// Represents the private DNS zone suffix.
	PrivateDNSZoneSuffix *string
}

GetPrivateDNSZoneSuffixResponse - The response of get private dns zone suffix.

func (GetPrivateDNSZoneSuffixResponse) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type GetPrivateDNSZoneSuffixResponse.

func (*GetPrivateDNSZoneSuffixResponse) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type GetPrivateDNSZoneSuffixResponse.

type HighAvailability

type HighAvailability struct {
	// High availability mode for a server.
	Mode *HighAvailabilityMode

	// Availability zone of the standby server.
	StandbyAvailabilityZone *string

	// READ-ONLY; The state of server high availability.
	State *HighAvailabilityState
}

HighAvailability - Network related properties of a server

func (HighAvailability) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type HighAvailability.

func (*HighAvailability) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type HighAvailability.

type HighAvailabilityMode

type HighAvailabilityMode string

HighAvailabilityMode - High availability mode for a server.

const (
	HighAvailabilityModeDisabled      HighAvailabilityMode = "Disabled"
	HighAvailabilityModeSameZone      HighAvailabilityMode = "SameZone"
	HighAvailabilityModeZoneRedundant HighAvailabilityMode = "ZoneRedundant"
)

func PossibleHighAvailabilityModeValues

func PossibleHighAvailabilityModeValues() []HighAvailabilityMode

PossibleHighAvailabilityModeValues returns the possible values for the HighAvailabilityMode const type.

type HighAvailabilityState

type HighAvailabilityState string

HighAvailabilityState - The state of server high availability.

const (
	HighAvailabilityStateCreatingStandby HighAvailabilityState = "CreatingStandby"
	HighAvailabilityStateFailingOver     HighAvailabilityState = "FailingOver"
	HighAvailabilityStateHealthy         HighAvailabilityState = "Healthy"
	HighAvailabilityStateNotEnabled      HighAvailabilityState = "NotEnabled"
	HighAvailabilityStateRemovingStandby HighAvailabilityState = "RemovingStandby"
)

func PossibleHighAvailabilityStateValues

func PossibleHighAvailabilityStateValues() []HighAvailabilityState

PossibleHighAvailabilityStateValues returns the possible values for the HighAvailabilityState const type.

type Identity

type Identity struct {
	// Type of managed service identity.
	Type *ManagedServiceIdentityType

	// Metadata of user assigned identity.
	UserAssignedIdentities map[string]any

	// READ-ONLY; ObjectId from the KeyVault
	PrincipalID *string

	// READ-ONLY; TenantId from the KeyVault
	TenantID *string
}

Identity - Properties to configure Identity for Bring your Own Keys

func (Identity) MarshalJSON

func (i Identity) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Identity.

func (*Identity) UnmarshalJSON

func (i *Identity) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Identity.

type IsConfigPendingRestart

type IsConfigPendingRestart string

IsConfigPendingRestart - If is the configuration pending restart or not.

const (
	IsConfigPendingRestartFalse IsConfigPendingRestart = "False"
	IsConfigPendingRestartTrue  IsConfigPendingRestart = "True"
)

func PossibleIsConfigPendingRestartValues

func PossibleIsConfigPendingRestartValues() []IsConfigPendingRestart

PossibleIsConfigPendingRestartValues returns the possible values for the IsConfigPendingRestart const type.

type IsDynamicConfig

type IsDynamicConfig string

IsDynamicConfig - If is the configuration dynamic.

const (
	IsDynamicConfigFalse IsDynamicConfig = "False"
	IsDynamicConfigTrue  IsDynamicConfig = "True"
)

func PossibleIsDynamicConfigValues

func PossibleIsDynamicConfigValues() []IsDynamicConfig

PossibleIsDynamicConfigValues returns the possible values for the IsDynamicConfig const type.

type IsReadOnly

type IsReadOnly string

IsReadOnly - If is the configuration read only.

const (
	IsReadOnlyFalse IsReadOnly = "False"
	IsReadOnlyTrue  IsReadOnly = "True"
)

func PossibleIsReadOnlyValues

func PossibleIsReadOnlyValues() []IsReadOnly

PossibleIsReadOnlyValues returns the possible values for the IsReadOnly const type.

type LocationBasedCapabilitiesClient

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

LocationBasedCapabilitiesClient contains the methods for the LocationBasedCapabilities group. Don't use this type directly, use NewLocationBasedCapabilitiesClient() instead.

func NewLocationBasedCapabilitiesClient

func NewLocationBasedCapabilitiesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LocationBasedCapabilitiesClient, error)

NewLocationBasedCapabilitiesClient creates a new instance of LocationBasedCapabilitiesClient with the specified values.

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

func (*LocationBasedCapabilitiesClient) NewListPager

NewListPager - Get capabilities at specified location in a given subscription.

Generated from API version 2021-12-01-preview

  • locationName - The name of the location.
  • options - LocationBasedCapabilitiesClientListOptions contains the optional parameters for the LocationBasedCapabilitiesClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2021-12-01-preview/examples/CapabilitiesByLocationList.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewLocationBasedCapabilitiesClient().NewListPager("WestUS", 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.CapabilitiesListResult = armmysqlflexibleservers.CapabilitiesListResult{
	// 	Value: []*armmysqlflexibleservers.CapabilityProperties{
	// 		{
	// 			SupportedFlexibleServerEditions: []*armmysqlflexibleservers.ServerEditionCapability{
	// 				{
	// 					Name: to.Ptr("Burstable"),
	// 					SupportedServerVersions: []*armmysqlflexibleservers.ServerVersionCapability{
	// 						{
	// 							Name: to.Ptr("5.7"),
	// 							SupportedSKUs: []*armmysqlflexibleservers.SKUCapability{
	// 								{
	// 									Name: to.Ptr("Standard_B1s"),
	// 									SupportedIops: to.Ptr[int64](400),
	// 									SupportedMemoryPerVCoreMB: to.Ptr[int64](1024),
	// 									VCores: to.Ptr[int64](1),
	// 								},
	// 								{
	// 									Name: to.Ptr("Standard_B1ms"),
	// 									SupportedIops: to.Ptr[int64](640),
	// 									SupportedMemoryPerVCoreMB: to.Ptr[int64](2048),
	// 									VCores: to.Ptr[int64](1),
	// 								},
	// 								{
	// 									Name: to.Ptr("Standard_B2s"),
	// 									SupportedIops: to.Ptr[int64](1280),
	// 									SupportedMemoryPerVCoreMB: to.Ptr[int64](2048),
	// 									VCores: to.Ptr[int64](2),
	// 							}},
	// 						},
	// 						{
	// 							Name: to.Ptr("8.0.21"),
	// 							SupportedSKUs: []*armmysqlflexibleservers.SKUCapability{
	// 								{
	// 									Name: to.Ptr("Standard_B1s"),
	// 									SupportedIops: to.Ptr[int64](400),
	// 									SupportedMemoryPerVCoreMB: to.Ptr[int64](1024),
	// 									VCores: to.Ptr[int64](1),
	// 								},
	// 								{
	// 									Name: to.Ptr("Standard_B1ms"),
	// 									SupportedIops: to.Ptr[int64](640),
	// 									SupportedMemoryPerVCoreMB: to.Ptr[int64](2048),
	// 									VCores: to.Ptr[int64](1),
	// 								},
	// 								{
	// 									Name: to.Ptr("Standard_B2s"),
	// 									SupportedIops: to.Ptr[int64](1280),
	// 									SupportedMemoryPerVCoreMB: to.Ptr[int64](2048),
	// 									VCores: to.Ptr[int64](2),
	// 							}},
	// 					}},
	// 					SupportedStorageEditions: []*armmysqlflexibleservers.StorageEditionCapability{
	// 						{
	// 							Name: to.Ptr("Premium"),
	// 							MaxBackupRetentionDays: to.Ptr[int64](35),
	// 							MaxStorageSize: to.Ptr[int64](16777216),
	// 							MinBackupRetentionDays: to.Ptr[int64](7),
	// 							MinStorageSize: to.Ptr[int64](20480),
	// 					}},
	// 				},
	// 				{
	// 					Name: to.Ptr("GeneralPurpose"),
	// 					SupportedServerVersions: []*armmysqlflexibleservers.ServerVersionCapability{
	// 						{
	// 							Name: to.Ptr("5.7"),
	// 							SupportedSKUs: []*armmysqlflexibleservers.SKUCapability{
	// 								{
	// 									Name: to.Ptr("Standard_D2ds_v4"),
	// 									SupportedIops: to.Ptr[int64](3200),
	// 									SupportedMemoryPerVCoreMB: to.Ptr[int64](4096),
	// 									VCores: to.Ptr[int64](2),
	// 								},
	// 								{
	// 									Name: to.Ptr("Standard_D4ds_v4"),
	// 									SupportedIops: to.Ptr[int64](6400),
	// 									SupportedMemoryPerVCoreMB: to.Ptr[int64](4096),
	// 									VCores: to.Ptr[int64](4),
	// 								},
	// 								{
	// 									Name: to.Ptr("Standard_D8ds_v4"),
	// 									SupportedIops: to.Ptr[int64](12800),
	// 									SupportedMemoryPerVCoreMB: to.Ptr[int64](4096),
	// 									VCores: to.Ptr[int64](8),
	// 								},
	// 								{
	// 									Name: to.Ptr("Standard_D16ds_v4"),
	// 									SupportedIops: to.Ptr[int64](20000),
	// 									SupportedMemoryPerVCoreMB: to.Ptr[int64](4096),
	// 									VCores: to.Ptr[int64](16),
	// 								},
	// 								{
	// 									Name: to.Ptr("Standard_D32ds_v4"),
	// 									SupportedIops: to.Ptr[int64](20000),
	// 									SupportedMemoryPerVCoreMB: to.Ptr[int64](4096),
	// 									VCores: to.Ptr[int64](32),
	// 								},
	// 								{
	// 									Name: to.Ptr("Standard_D48ds_v4"),
	// 									SupportedIops: to.Ptr[int64](20000),
	// 									SupportedMemoryPerVCoreMB: to.Ptr[int64](4096),
	// 									VCores: to.Ptr[int64](48),
	// 								},
	// 								{
	// 									Name: to.Ptr("Standard_D64ds_v4"),
	// 									SupportedIops: to.Ptr[int64](20000),
	// 									SupportedMemoryPerVCoreMB: to.Ptr[int64](4096),
	// 									VCores: to.Ptr[int64](64),
	// 							}},
	// 						},
	// 						{
	// 							Name: to.Ptr("8.0.21"),
	// 							SupportedSKUs: []*armmysqlflexibleservers.SKUCapability{
	// 								{
	// 									Name: to.Ptr("Standard_D2ds_v4"),
	// 									SupportedIops: to.Ptr[int64](3200),
	// 									SupportedMemoryPerVCoreMB: to.Ptr[int64](4096),
	// 									VCores: to.Ptr[int64](2),
	// 								},
	// 								{
	// 									Name: to.Ptr("Standard_D4ds_v4"),
	// 									SupportedIops: to.Ptr[int64](6400),
	// 									SupportedMemoryPerVCoreMB: to.Ptr[int64](4096),
	// 									VCores: to.Ptr[int64](4),
	// 								},
	// 								{
	// 									Name: to.Ptr("Standard_D8ds_v4"),
	// 									SupportedIops: to.Ptr[int64](12800),
	// 									SupportedMemoryPerVCoreMB: to.Ptr[int64](4096),
	// 									VCores: to.Ptr[int64](8),
	// 								},
	// 								{
	// 									Name: to.Ptr("Standard_D16ds_v4"),
	// 									SupportedIops: to.Ptr[int64](20000),
	// 									SupportedMemoryPerVCoreMB: to.Ptr[int64](4096),
	// 									VCores: to.Ptr[int64](16),
	// 								},
	// 								{
	// 									Name: to.Ptr("Standard_D32ds_v4"),
	// 									SupportedIops: to.Ptr[int64](20000),
	// 									SupportedMemoryPerVCoreMB: to.Ptr[int64](4096),
	// 									VCores: to.Ptr[int64](32),
	// 								},
	// 								{
	// 									Name: to.Ptr("Standard_D48ds_v4"),
	// 									SupportedIops: to.Ptr[int64](20000),
	// 									SupportedMemoryPerVCoreMB: to.Ptr[int64](4096),
	// 									VCores: to.Ptr[int64](48),
	// 								},
	// 								{
	// 									Name: to.Ptr("Standard_D64ds_v4"),
	// 									SupportedIops: to.Ptr[int64](20000),
	// 									SupportedMemoryPerVCoreMB: to.Ptr[int64](4096),
	// 									VCores: to.Ptr[int64](64),
	// 							}},
	// 					}},
	// 					SupportedStorageEditions: []*armmysqlflexibleservers.StorageEditionCapability{
	// 						{
	// 							Name: to.Ptr("Premium"),
	// 							MaxBackupRetentionDays: to.Ptr[int64](35),
	// 							MaxStorageSize: to.Ptr[int64](16777216),
	// 							MinBackupRetentionDays: to.Ptr[int64](7),
	// 							MinStorageSize: to.Ptr[int64](20480),
	// 					}},
	// 				},
	// 				{
	// 					Name: to.Ptr("MemoryOptimized"),
	// 					SupportedServerVersions: []*armmysqlflexibleservers.ServerVersionCapability{
	// 						{
	// 							Name: to.Ptr("5.7"),
	// 							SupportedSKUs: []*armmysqlflexibleservers.SKUCapability{
	// 								{
	// 									Name: to.Ptr("Standard_E2ds_v4"),
	// 									SupportedIops: to.Ptr[int64](3200),
	// 									SupportedMemoryPerVCoreMB: to.Ptr[int64](8192),
	// 									VCores: to.Ptr[int64](2),
	// 								},
	// 								{
	// 									Name: to.Ptr("Standard_E4ds_v4"),
	// 									SupportedIops: to.Ptr[int64](6400),
	// 									SupportedMemoryPerVCoreMB: to.Ptr[int64](8192),
	// 									VCores: to.Ptr[int64](4),
	// 								},
	// 								{
	// 									Name: to.Ptr("Standard_E8ds_v4"),
	// 									SupportedIops: to.Ptr[int64](12800),
	// 									SupportedMemoryPerVCoreMB: to.Ptr[int64](8192),
	// 									VCores: to.Ptr[int64](8),
	// 								},
	// 								{
	// 									Name: to.Ptr("Standard_E16ds_v4"),
	// 									SupportedIops: to.Ptr[int64](20000),
	// 									SupportedMemoryPerVCoreMB: to.Ptr[int64](8192),
	// 									VCores: to.Ptr[int64](16),
	// 								},
	// 								{
	// 									Name: to.Ptr("Standard_E32ds_v4"),
	// 									SupportedIops: to.Ptr[int64](20000),
	// 									SupportedMemoryPerVCoreMB: to.Ptr[int64](8192),
	// 									VCores: to.Ptr[int64](32),
	// 								},
	// 								{
	// 									Name: to.Ptr("Standard_E48ds_v4"),
	// 									SupportedIops: to.Ptr[int64](20000),
	// 									SupportedMemoryPerVCoreMB: to.Ptr[int64](8192),
	// 									VCores: to.Ptr[int64](48),
	// 								},
	// 								{
	// 									Name: to.Ptr("Standard_E64ds_v4"),
	// 									SupportedIops: to.Ptr[int64](20000),
	// 									SupportedMemoryPerVCoreMB: to.Ptr[int64](8192),
	// 									VCores: to.Ptr[int64](64),
	// 							}},
	// 						},
	// 						{
	// 							Name: to.Ptr("8.0.21"),
	// 							SupportedSKUs: []*armmysqlflexibleservers.SKUCapability{
	// 								{
	// 									Name: to.Ptr("Standard_E2ds_v4"),
	// 									SupportedIops: to.Ptr[int64](3200),
	// 									SupportedMemoryPerVCoreMB: to.Ptr[int64](8192),
	// 									VCores: to.Ptr[int64](2),
	// 								},
	// 								{
	// 									Name: to.Ptr("Standard_E4ds_v4"),
	// 									SupportedIops: to.Ptr[int64](6400),
	// 									SupportedMemoryPerVCoreMB: to.Ptr[int64](8192),
	// 									VCores: to.Ptr[int64](4),
	// 								},
	// 								{
	// 									Name: to.Ptr("Standard_E8ds_v4"),
	// 									SupportedIops: to.Ptr[int64](12800),
	// 									SupportedMemoryPerVCoreMB: to.Ptr[int64](8192),
	// 									VCores: to.Ptr[int64](8),
	// 								},
	// 								{
	// 									Name: to.Ptr("Standard_E16ds_v4"),
	// 									SupportedIops: to.Ptr[int64](20000),
	// 									SupportedMemoryPerVCoreMB: to.Ptr[int64](8192),
	// 									VCores: to.Ptr[int64](16),
	// 								},
	// 								{
	// 									Name: to.Ptr("Standard_E32ds_v4"),
	// 									SupportedIops: to.Ptr[int64](20000),
	// 									SupportedMemoryPerVCoreMB: to.Ptr[int64](8192),
	// 									VCores: to.Ptr[int64](32),
	// 								},
	// 								{
	// 									Name: to.Ptr("Standard_E48ds_v4"),
	// 									SupportedIops: to.Ptr[int64](20000),
	// 									SupportedMemoryPerVCoreMB: to.Ptr[int64](8192),
	// 									VCores: to.Ptr[int64](48),
	// 								},
	// 								{
	// 									Name: to.Ptr("Standard_E64ds_v4"),
	// 									SupportedIops: to.Ptr[int64](20000),
	// 									SupportedMemoryPerVCoreMB: to.Ptr[int64](8192),
	// 									VCores: to.Ptr[int64](64),
	// 							}},
	// 					}},
	// 					SupportedStorageEditions: []*armmysqlflexibleservers.StorageEditionCapability{
	// 						{
	// 							Name: to.Ptr("Premium"),
	// 							MaxBackupRetentionDays: to.Ptr[int64](35),
	// 							MaxStorageSize: to.Ptr[int64](16777216),
	// 							MinBackupRetentionDays: to.Ptr[int64](7),
	// 							MinStorageSize: to.Ptr[int64](20480),
	// 					}},
	// 			}},
	// 			SupportedGeoBackupRegions: []*string{
	// 			},
	// 			SupportedHAMode: []*string{
	// 				to.Ptr("SameZone"),
	// 				to.Ptr("ZoneRedundant")},
	// 				Zone: to.Ptr("none"),
	// 			},
	// 			{
	// 				SupportedFlexibleServerEditions: []*armmysqlflexibleservers.ServerEditionCapability{
	// 					{
	// 						Name: to.Ptr("Burstable"),
	// 						SupportedServerVersions: []*armmysqlflexibleservers.ServerVersionCapability{
	// 							{
	// 								Name: to.Ptr("5.7"),
	// 								SupportedSKUs: []*armmysqlflexibleservers.SKUCapability{
	// 									{
	// 										Name: to.Ptr("Standard_B1s"),
	// 										SupportedIops: to.Ptr[int64](400),
	// 										SupportedMemoryPerVCoreMB: to.Ptr[int64](1024),
	// 										VCores: to.Ptr[int64](1),
	// 									},
	// 									{
	// 										Name: to.Ptr("Standard_B1ms"),
	// 										SupportedIops: to.Ptr[int64](640),
	// 										SupportedMemoryPerVCoreMB: to.Ptr[int64](2048),
	// 										VCores: to.Ptr[int64](1),
	// 									},
	// 									{
	// 										Name: to.Ptr("Standard_B2s"),
	// 										SupportedIops: to.Ptr[int64](1280),
	// 										SupportedMemoryPerVCoreMB: to.Ptr[int64](2048),
	// 										VCores: to.Ptr[int64](2),
	// 								}},
	// 							},
	// 							{
	// 								Name: to.Ptr("8.0.21"),
	// 								SupportedSKUs: []*armmysqlflexibleservers.SKUCapability{
	// 									{
	// 										Name: to.Ptr("Standard_B1s"),
	// 										SupportedIops: to.Ptr[int64](400),
	// 										SupportedMemoryPerVCoreMB: to.Ptr[int64](1024),
	// 										VCores: to.Ptr[int64](1),
	// 									},
	// 									{
	// 										Name: to.Ptr("Standard_B1ms"),
	// 										SupportedIops: to.Ptr[int64](640),
	// 										SupportedMemoryPerVCoreMB: to.Ptr[int64](2048),
	// 										VCores: to.Ptr[int64](1),
	// 									},
	// 									{
	// 										Name: to.Ptr("Standard_B2s"),
	// 										SupportedIops: to.Ptr[int64](1280),
	// 										SupportedMemoryPerVCoreMB: to.Ptr[int64](2048),
	// 										VCores: to.Ptr[int64](2),
	// 								}},
	// 						}},
	// 						SupportedStorageEditions: []*armmysqlflexibleservers.StorageEditionCapability{
	// 							{
	// 								Name: to.Ptr("Premium"),
	// 								MaxBackupRetentionDays: to.Ptr[int64](35),
	// 								MaxStorageSize: to.Ptr[int64](16777216),
	// 								MinBackupRetentionDays: to.Ptr[int64](7),
	// 								MinStorageSize: to.Ptr[int64](20480),
	// 						}},
	// 					},
	// 					{
	// 						Name: to.Ptr("GeneralPurpose"),
	// 						SupportedServerVersions: []*armmysqlflexibleservers.ServerVersionCapability{
	// 							{
	// 								Name: to.Ptr("5.7"),
	// 								SupportedSKUs: []*armmysqlflexibleservers.SKUCapability{
	// 									{
	// 										Name: to.Ptr("Standard_D2ds_v4"),
	// 										SupportedIops: to.Ptr[int64](3200),
	// 										SupportedMemoryPerVCoreMB: to.Ptr[int64](4096),
	// 										VCores: to.Ptr[int64](2),
	// 									},
	// 									{
	// 										Name: to.Ptr("Standard_D4ds_v4"),
	// 										SupportedIops: to.Ptr[int64](6400),
	// 										SupportedMemoryPerVCoreMB: to.Ptr[int64](4096),
	// 										VCores: to.Ptr[int64](4),
	// 									},
	// 									{
	// 										Name: to.Ptr("Standard_D8ds_v4"),
	// 										SupportedIops: to.Ptr[int64](12800),
	// 										SupportedMemoryPerVCoreMB: to.Ptr[int64](4096),
	// 										VCores: to.Ptr[int64](8),
	// 									},
	// 									{
	// 										Name: to.Ptr("Standard_D16ds_v4"),
	// 										SupportedIops: to.Ptr[int64](20000),
	// 										SupportedMemoryPerVCoreMB: to.Ptr[int64](4096),
	// 										VCores: to.Ptr[int64](16),
	// 									},
	// 									{
	// 										Name: to.Ptr("Standard_D32ds_v4"),
	// 										SupportedIops: to.Ptr[int64](20000),
	// 										SupportedMemoryPerVCoreMB: to.Ptr[int64](4096),
	// 										VCores: to.Ptr[int64](32),
	// 									},
	// 									{
	// 										Name: to.Ptr("Standard_D48ds_v4"),
	// 										SupportedIops: to.Ptr[int64](20000),
	// 										SupportedMemoryPerVCoreMB: to.Ptr[int64](4096),
	// 										VCores: to.Ptr[int64](48),
	// 									},
	// 									{
	// 										Name: to.Ptr("Standard_D64ds_v4"),
	// 										SupportedIops: to.Ptr[int64](20000),
	// 										SupportedMemoryPerVCoreMB: to.Ptr[int64](4096),
	// 										VCores: to.Ptr[int64](64),
	// 								}},
	// 							},
	// 							{
	// 								Name: to.Ptr("8.0.21"),
	// 								SupportedSKUs: []*armmysqlflexibleservers.SKUCapability{
	// 									{
	// 										Name: to.Ptr("Standard_D2ds_v4"),
	// 										SupportedIops: to.Ptr[int64](3200),
	// 										SupportedMemoryPerVCoreMB: to.Ptr[int64](4096),
	// 										VCores: to.Ptr[int64](2),
	// 									},
	// 									{
	// 										Name: to.Ptr("Standard_D4ds_v4"),
	// 										SupportedIops: to.Ptr[int64](6400),
	// 										SupportedMemoryPerVCoreMB: to.Ptr[int64](4096),
	// 										VCores: to.Ptr[int64](4),
	// 									},
	// 									{
	// 										Name: to.Ptr("Standard_D8ds_v4"),
	// 										SupportedIops: to.Ptr[int64](12800),
	// 										SupportedMemoryPerVCoreMB: to.Ptr[int64](4096),
	// 										VCores: to.Ptr[int64](8),
	// 									},
	// 									{
	// 										Name: to.Ptr("Standard_D16ds_v4"),
	// 										SupportedIops: to.Ptr[int64](20000),
	// 										SupportedMemoryPerVCoreMB: to.Ptr[int64](4096),
	// 										VCores: to.Ptr[int64](16),
	// 									},
	// 									{
	// 										Name: to.Ptr("Standard_D32ds_v4"),
	// 										SupportedIops: to.Ptr[int64](20000),
	// 										SupportedMemoryPerVCoreMB: to.Ptr[int64](4096),
	// 										VCores: to.Ptr[int64](32),
	// 									},
	// 									{
	// 										Name: to.Ptr("Standard_D48ds_v4"),
	// 										SupportedIops: to.Ptr[int64](20000),
	// 										SupportedMemoryPerVCoreMB: to.Ptr[int64](4096),
	// 										VCores: to.Ptr[int64](48),
	// 									},
	// 									{
	// 										Name: to.Ptr("Standard_D64ds_v4"),
	// 										SupportedIops: to.Ptr[int64](20000),
	// 										SupportedMemoryPerVCoreMB: to.Ptr[int64](4096),
	// 										VCores: to.Ptr[int64](64),
	// 								}},
	// 						}},
	// 						SupportedStorageEditions: []*armmysqlflexibleservers.StorageEditionCapability{
	// 							{
	// 								Name: to.Ptr("Premium"),
	// 								MaxBackupRetentionDays: to.Ptr[int64](35),
	// 								MaxStorageSize: to.Ptr[int64](16777216),
	// 								MinBackupRetentionDays: to.Ptr[int64](7),
	// 								MinStorageSize: to.Ptr[int64](20480),
	// 						}},
	// 					},
	// 					{
	// 						Name: to.Ptr("MemoryOptimized"),
	// 						SupportedServerVersions: []*armmysqlflexibleservers.ServerVersionCapability{
	// 							{
	// 								Name: to.Ptr("5.7"),
	// 								SupportedSKUs: []*armmysqlflexibleservers.SKUCapability{
	// 									{
	// 										Name: to.Ptr("Standard_E2ds_v4"),
	// 										SupportedIops: to.Ptr[int64](3200),
	// 										SupportedMemoryPerVCoreMB: to.Ptr[int64](8192),
	// 										VCores: to.Ptr[int64](2),
	// 									},
	// 									{
	// 										Name: to.Ptr("Standard_E4ds_v4"),
	// 										SupportedIops: to.Ptr[int64](6400),
	// 										SupportedMemoryPerVCoreMB: to.Ptr[int64](8192),
	// 										VCores: to.Ptr[int64](4),
	// 									},
	// 									{
	// 										Name: to.Ptr("Standard_E8ds_v4"),
	// 										SupportedIops: to.Ptr[int64](12800),
	// 										SupportedMemoryPerVCoreMB: to.Ptr[int64](8192),
	// 										VCores: to.Ptr[int64](8),
	// 									},
	// 									{
	// 										Name: to.Ptr("Standard_E16ds_v4"),
	// 										SupportedIops: to.Ptr[int64](20000),
	// 										SupportedMemoryPerVCoreMB: to.Ptr[int64](8192),
	// 										VCores: to.Ptr[int64](16),
	// 									},
	// 									{
	// 										Name: to.Ptr("Standard_E32ds_v4"),
	// 										SupportedIops: to.Ptr[int64](20000),
	// 										SupportedMemoryPerVCoreMB: to.Ptr[int64](8192),
	// 										VCores: to.Ptr[int64](32),
	// 									},
	// 									{
	// 										Name: to.Ptr("Standard_E48ds_v4"),
	// 										SupportedIops: to.Ptr[int64](20000),
	// 										SupportedMemoryPerVCoreMB: to.Ptr[int64](8192),
	// 										VCores: to.Ptr[int64](48),
	// 									},
	// 									{
	// 										Name: to.Ptr("Standard_E64ds_v4"),
	// 										SupportedIops: to.Ptr[int64](20000),
	// 										SupportedMemoryPerVCoreMB: to.Ptr[int64](8192),
	// 										VCores: to.Ptr[int64](64),
	// 								}},
	// 							},
	// 							{
	// 								Name: to.Ptr("8.0.21"),
	// 								SupportedSKUs: []*armmysqlflexibleservers.SKUCapability{
	// 									{
	// 										Name: to.Ptr("Standard_E2ds_v4"),
	// 										SupportedIops: to.Ptr[int64](3200),
	// 										SupportedMemoryPerVCoreMB: to.Ptr[int64](8192),
	// 										VCores: to.Ptr[int64](2),
	// 									},
	// 									{
	// 										Name: to.Ptr("Standard_E4ds_v4"),
	// 										SupportedIops: to.Ptr[int64](6400),
	// 										SupportedMemoryPerVCoreMB: to.Ptr[int64](8192),
	// 										VCores: to.Ptr[int64](4),
	// 									},
	// 									{
	// 										Name: to.Ptr("Standard_E8ds_v4"),
	// 										SupportedIops: to.Ptr[int64](12800),
	// 										SupportedMemoryPerVCoreMB: to.Ptr[int64](8192),
	// 										VCores: to.Ptr[int64](8),
	// 									},
	// 									{
	// 										Name: to.Ptr("Standard_E16ds_v4"),
	// 										SupportedIops: to.Ptr[int64](20000),
	// 										SupportedMemoryPerVCoreMB: to.Ptr[int64](8192),
	// 										VCores: to.Ptr[int64](16),
	// 									},
	// 									{
	// 										Name: to.Ptr("Standard_E32ds_v4"),
	// 										SupportedIops: to.Ptr[int64](20000),
	// 										SupportedMemoryPerVCoreMB: to.Ptr[int64](8192),
	// 										VCores: to.Ptr[int64](32),
	// 									},
	// 									{
	// 										Name: to.Ptr("Standard_E48ds_v4"),
	// 										SupportedIops: to.Ptr[int64](20000),
	// 										SupportedMemoryPerVCoreMB: to.Ptr[int64](8192),
	// 										VCores: to.Ptr[int64](48),
	// 									},
	// 									{
	// 										Name: to.Ptr("Standard_E64ds_v4"),
	// 										SupportedIops: to.Ptr[int64](20000),
	// 										SupportedMemoryPerVCoreMB: to.Ptr[int64](8192),
	// 										VCores: to.Ptr[int64](64),
	// 								}},
	// 						}},
	// 						SupportedStorageEditions: []*armmysqlflexibleservers.StorageEditionCapability{
	// 							{
	// 								Name: to.Ptr("Premium"),
	// 								MaxBackupRetentionDays: to.Ptr[int64](35),
	// 								MaxStorageSize: to.Ptr[int64](16777216),
	// 								MinBackupRetentionDays: to.Ptr[int64](7),
	// 								MinStorageSize: to.Ptr[int64](20480),
	// 						}},
	// 				}},
	// 				SupportedGeoBackupRegions: []*string{
	// 				},
	// 				SupportedHAMode: []*string{
	// 					to.Ptr("SameZone"),
	// 					to.Ptr("ZoneRedundant")},
	// 					Zone: to.Ptr("1"),
	// 				},
	// 				{
	// 					SupportedFlexibleServerEditions: []*armmysqlflexibleservers.ServerEditionCapability{
	// 						{
	// 							Name: to.Ptr("Burstable"),
	// 							SupportedServerVersions: []*armmysqlflexibleservers.ServerVersionCapability{
	// 								{
	// 									Name: to.Ptr("5.7"),
	// 									SupportedSKUs: []*armmysqlflexibleservers.SKUCapability{
	// 										{
	// 											Name: to.Ptr("Standard_B1s"),
	// 											SupportedIops: to.Ptr[int64](400),
	// 											SupportedMemoryPerVCoreMB: to.Ptr[int64](1024),
	// 											VCores: to.Ptr[int64](1),
	// 										},
	// 										{
	// 											Name: to.Ptr("Standard_B1ms"),
	// 											SupportedIops: to.Ptr[int64](640),
	// 											SupportedMemoryPerVCoreMB: to.Ptr[int64](2048),
	// 											VCores: to.Ptr[int64](1),
	// 										},
	// 										{
	// 											Name: to.Ptr("Standard_B2s"),
	// 											SupportedIops: to.Ptr[int64](1280),
	// 											SupportedMemoryPerVCoreMB: to.Ptr[int64](2048),
	// 											VCores: to.Ptr[int64](2),
	// 									}},
	// 								},
	// 								{
	// 									Name: to.Ptr("8.0.21"),
	// 									SupportedSKUs: []*armmysqlflexibleservers.SKUCapability{
	// 										{
	// 											Name: to.Ptr("Standard_B1s"),
	// 											SupportedIops: to.Ptr[int64](400),
	// 											SupportedMemoryPerVCoreMB: to.Ptr[int64](1024),
	// 											VCores: to.Ptr[int64](1),
	// 										},
	// 										{
	// 											Name: to.Ptr("Standard_B1ms"),
	// 											SupportedIops: to.Ptr[int64](640),
	// 											SupportedMemoryPerVCoreMB: to.Ptr[int64](2048),
	// 											VCores: to.Ptr[int64](1),
	// 										},
	// 										{
	// 											Name: to.Ptr("Standard_B2s"),
	// 											SupportedIops: to.Ptr[int64](1280),
	// 											SupportedMemoryPerVCoreMB: to.Ptr[int64](2048),
	// 											VCores: to.Ptr[int64](2),
	// 									}},
	// 							}},
	// 							SupportedStorageEditions: []*armmysqlflexibleservers.StorageEditionCapability{
	// 								{
	// 									Name: to.Ptr("Premium"),
	// 									MaxBackupRetentionDays: to.Ptr[int64](35),
	// 									MaxStorageSize: to.Ptr[int64](16777216),
	// 									MinBackupRetentionDays: to.Ptr[int64](7),
	// 									MinStorageSize: to.Ptr[int64](20480),
	// 							}},
	// 						},
	// 						{
	// 							Name: to.Ptr("GeneralPurpose"),
	// 							SupportedServerVersions: []*armmysqlflexibleservers.ServerVersionCapability{
	// 								{
	// 									Name: to.Ptr("5.7"),
	// 									SupportedSKUs: []*armmysqlflexibleservers.SKUCapability{
	// 										{
	// 											Name: to.Ptr("Standard_D2ds_v4"),
	// 											SupportedIops: to.Ptr[int64](3200),
	// 											SupportedMemoryPerVCoreMB: to.Ptr[int64](4096),
	// 											VCores: to.Ptr[int64](2),
	// 										},
	// 										{
	// 											Name: to.Ptr("Standard_D4ds_v4"),
	// 											SupportedIops: to.Ptr[int64](6400),
	// 											SupportedMemoryPerVCoreMB: to.Ptr[int64](4096),
	// 											VCores: to.Ptr[int64](4),
	// 										},
	// 										{
	// 											Name: to.Ptr("Standard_D8ds_v4"),
	// 											SupportedIops: to.Ptr[int64](12800),
	// 											SupportedMemoryPerVCoreMB: to.Ptr[int64](4096),
	// 											VCores: to.Ptr[int64](8),
	// 										},
	// 										{
	// 											Name: to.Ptr("Standard_D16ds_v4"),
	// 											SupportedIops: to.Ptr[int64](20000),
	// 											SupportedMemoryPerVCoreMB: to.Ptr[int64](4096),
	// 											VCores: to.Ptr[int64](16),
	// 										},
	// 										{
	// 											Name: to.Ptr("Standard_D32ds_v4"),
	// 											SupportedIops: to.Ptr[int64](20000),
	// 											SupportedMemoryPerVCoreMB: to.Ptr[int64](4096),
	// 											VCores: to.Ptr[int64](32),
	// 										},
	// 										{
	// 											Name: to.Ptr("Standard_D48ds_v4"),
	// 											SupportedIops: to.Ptr[int64](20000),
	// 											SupportedMemoryPerVCoreMB: to.Ptr[int64](4096),
	// 											VCores: to.Ptr[int64](48),
	// 										},
	// 										{
	// 											Name: to.Ptr("Standard_D64ds_v4"),
	// 											SupportedIops: to.Ptr[int64](20000),
	// 											SupportedMemoryPerVCoreMB: to.Ptr[int64](4096),
	// 											VCores: to.Ptr[int64](64),
	// 									}},
	// 								},
	// 								{
	// 									Name: to.Ptr("8.0.21"),
	// 									SupportedSKUs: []*armmysqlflexibleservers.SKUCapability{
	// 										{
	// 											Name: to.Ptr("Standard_D2ds_v4"),
	// 											SupportedIops: to.Ptr[int64](3200),
	// 											SupportedMemoryPerVCoreMB: to.Ptr[int64](4096),
	// 											VCores: to.Ptr[int64](2),
	// 										},
	// 										{
	// 											Name: to.Ptr("Standard_D4ds_v4"),
	// 											SupportedIops: to.Ptr[int64](6400),
	// 											SupportedMemoryPerVCoreMB: to.Ptr[int64](4096),
	// 											VCores: to.Ptr[int64](4),
	// 										},
	// 										{
	// 											Name: to.Ptr("Standard_D8ds_v4"),
	// 											SupportedIops: to.Ptr[int64](12800),
	// 											SupportedMemoryPerVCoreMB: to.Ptr[int64](4096),
	// 											VCores: to.Ptr[int64](8),
	// 										},
	// 										{
	// 											Name: to.Ptr("Standard_D16ds_v4"),
	// 											SupportedIops: to.Ptr[int64](20000),
	// 											SupportedMemoryPerVCoreMB: to.Ptr[int64](4096),
	// 											VCores: to.Ptr[int64](16),
	// 										},
	// 										{
	// 											Name: to.Ptr("Standard_D32ds_v4"),
	// 											SupportedIops: to.Ptr[int64](20000),
	// 											SupportedMemoryPerVCoreMB: to.Ptr[int64](4096),
	// 											VCores: to.Ptr[int64](32),
	// 										},
	// 										{
	// 											Name: to.Ptr("Standard_D48ds_v4"),
	// 											SupportedIops: to.Ptr[int64](20000),
	// 											SupportedMemoryPerVCoreMB: to.Ptr[int64](4096),
	// 											VCores: to.Ptr[int64](48),
	// 										},
	// 										{
	// 											Name: to.Ptr("Standard_D64ds_v4"),
	// 											SupportedIops: to.Ptr[int64](20000),
	// 											SupportedMemoryPerVCoreMB: to.Ptr[int64](4096),
	// 											VCores: to.Ptr[int64](64),
	// 									}},
	// 							}},
	// 							SupportedStorageEditions: []*armmysqlflexibleservers.StorageEditionCapability{
	// 								{
	// 									Name: to.Ptr("Premium"),
	// 									MaxBackupRetentionDays: to.Ptr[int64](35),
	// 									MaxStorageSize: to.Ptr[int64](16777216),
	// 									MinBackupRetentionDays: to.Ptr[int64](7),
	// 									MinStorageSize: to.Ptr[int64](20480),
	// 							}},
	// 						},
	// 						{
	// 							Name: to.Ptr("MemoryOptimized"),
	// 							SupportedServerVersions: []*armmysqlflexibleservers.ServerVersionCapability{
	// 								{
	// 									Name: to.Ptr("5.7"),
	// 									SupportedSKUs: []*armmysqlflexibleservers.SKUCapability{
	// 										{
	// 											Name: to.Ptr("Standard_E2ds_v4"),
	// 											SupportedIops: to.Ptr[int64](3200),
	// 											SupportedMemoryPerVCoreMB: to.Ptr[int64](8192),
	// 											VCores: to.Ptr[int64](2),
	// 										},
	// 										{
	// 											Name: to.Ptr("Standard_E4ds_v4"),
	// 											SupportedIops: to.Ptr[int64](6400),
	// 											SupportedMemoryPerVCoreMB: to.Ptr[int64](8192),
	// 											VCores: to.Ptr[int64](4),
	// 										},
	// 										{
	// 											Name: to.Ptr("Standard_E8ds_v4"),
	// 											SupportedIops: to.Ptr[int64](12800),
	// 											SupportedMemoryPerVCoreMB: to.Ptr[int64](8192),
	// 											VCores: to.Ptr[int64](8),
	// 										},
	// 										{
	// 											Name: to.Ptr("Standard_E16ds_v4"),
	// 											SupportedIops: to.Ptr[int64](20000),
	// 											SupportedMemoryPerVCoreMB: to.Ptr[int64](8192),
	// 											VCores: to.Ptr[int64](16),
	// 										},
	// 										{
	// 											Name: to.Ptr("Standard_E32ds_v4"),
	// 											SupportedIops: to.Ptr[int64](20000),
	// 											SupportedMemoryPerVCoreMB: to.Ptr[int64](8192),
	// 											VCores: to.Ptr[int64](32),
	// 										},
	// 										{
	// 											Name: to.Ptr("Standard_E48ds_v4"),
	// 											SupportedIops: to.Ptr[int64](20000),
	// 											SupportedMemoryPerVCoreMB: to.Ptr[int64](8192),
	// 											VCores: to.Ptr[int64](48),
	// 										},
	// 										{
	// 											Name: to.Ptr("Standard_E64ds_v4"),
	// 											SupportedIops: to.Ptr[int64](20000),
	// 											SupportedMemoryPerVCoreMB: to.Ptr[int64](8192),
	// 											VCores: to.Ptr[int64](64),
	// 									}},
	// 								},
	// 								{
	// 									Name: to.Ptr("8.0.21"),
	// 									SupportedSKUs: []*armmysqlflexibleservers.SKUCapability{
	// 										{
	// 											Name: to.Ptr("Standard_E2ds_v4"),
	// 											SupportedIops: to.Ptr[int64](3200),
	// 											SupportedMemoryPerVCoreMB: to.Ptr[int64](8192),
	// 											VCores: to.Ptr[int64](2),
	// 										},
	// 										{
	// 											Name: to.Ptr("Standard_E4ds_v4"),
	// 											SupportedIops: to.Ptr[int64](6400),
	// 											SupportedMemoryPerVCoreMB: to.Ptr[int64](8192),
	// 											VCores: to.Ptr[int64](4),
	// 										},
	// 										{
	// 											Name: to.Ptr("Standard_E8ds_v4"),
	// 											SupportedIops: to.Ptr[int64](12800),
	// 											SupportedMemoryPerVCoreMB: to.Ptr[int64](8192),
	// 											VCores: to.Ptr[int64](8),
	// 										},
	// 										{
	// 											Name: to.Ptr("Standard_E16ds_v4"),
	// 											SupportedIops: to.Ptr[int64](20000),
	// 											SupportedMemoryPerVCoreMB: to.Ptr[int64](8192),
	// 											VCores: to.Ptr[int64](16),
	// 										},
	// 										{
	// 											Name: to.Ptr("Standard_E32ds_v4"),
	// 											SupportedIops: to.Ptr[int64](20000),
	// 											SupportedMemoryPerVCoreMB: to.Ptr[int64](8192),
	// 											VCores: to.Ptr[int64](32),
	// 										},
	// 										{
	// 											Name: to.Ptr("Standard_E48ds_v4"),
	// 											SupportedIops: to.Ptr[int64](20000),
	// 											SupportedMemoryPerVCoreMB: to.Ptr[int64](8192),
	// 											VCores: to.Ptr[int64](48),
	// 										},
	// 										{
	// 											Name: to.Ptr("Standard_E64ds_v4"),
	// 											SupportedIops: to.Ptr[int64](20000),
	// 											SupportedMemoryPerVCoreMB: to.Ptr[int64](8192),
	// 											VCores: to.Ptr[int64](64),
	// 									}},
	// 							}},
	// 							SupportedStorageEditions: []*armmysqlflexibleservers.StorageEditionCapability{
	// 								{
	// 									Name: to.Ptr("Premium"),
	// 									MaxBackupRetentionDays: to.Ptr[int64](35),
	// 									MaxStorageSize: to.Ptr[int64](16777216),
	// 									MinBackupRetentionDays: to.Ptr[int64](7),
	// 									MinStorageSize: to.Ptr[int64](20480),
	// 							}},
	// 					}},
	// 					SupportedGeoBackupRegions: []*string{
	// 					},
	// 					SupportedHAMode: []*string{
	// 						to.Ptr("SameZone"),
	// 						to.Ptr("ZoneRedundant")},
	// 						Zone: to.Ptr("2"),
	// 					},
	// 					{
	// 						SupportedFlexibleServerEditions: []*armmysqlflexibleservers.ServerEditionCapability{
	// 							{
	// 								Name: to.Ptr("Burstable"),
	// 								SupportedServerVersions: []*armmysqlflexibleservers.ServerVersionCapability{
	// 									{
	// 										Name: to.Ptr("5.7"),
	// 										SupportedSKUs: []*armmysqlflexibleservers.SKUCapability{
	// 											{
	// 												Name: to.Ptr("Standard_B1s"),
	// 												SupportedIops: to.Ptr[int64](400),
	// 												SupportedMemoryPerVCoreMB: to.Ptr[int64](1024),
	// 												VCores: to.Ptr[int64](1),
	// 											},
	// 											{
	// 												Name: to.Ptr("Standard_B1ms"),
	// 												SupportedIops: to.Ptr[int64](640),
	// 												SupportedMemoryPerVCoreMB: to.Ptr[int64](2048),
	// 												VCores: to.Ptr[int64](1),
	// 											},
	// 											{
	// 												Name: to.Ptr("Standard_B2s"),
	// 												SupportedIops: to.Ptr[int64](1280),
	// 												SupportedMemoryPerVCoreMB: to.Ptr[int64](2048),
	// 												VCores: to.Ptr[int64](2),
	// 										}},
	// 									},
	// 									{
	// 										Name: to.Ptr("8.0.21"),
	// 										SupportedSKUs: []*armmysqlflexibleservers.SKUCapability{
	// 											{
	// 												Name: to.Ptr("Standard_B1s"),
	// 												SupportedIops: to.Ptr[int64](400),
	// 												SupportedMemoryPerVCoreMB: to.Ptr[int64](1024),
	// 												VCores: to.Ptr[int64](1),
	// 											},
	// 											{
	// 												Name: to.Ptr("Standard_B1ms"),
	// 												SupportedIops: to.Ptr[int64](640),
	// 												SupportedMemoryPerVCoreMB: to.Ptr[int64](2048),
	// 												VCores: to.Ptr[int64](1),
	// 											},
	// 											{
	// 												Name: to.Ptr("Standard_B2s"),
	// 												SupportedIops: to.Ptr[int64](1280),
	// 												SupportedMemoryPerVCoreMB: to.Ptr[int64](2048),
	// 												VCores: to.Ptr[int64](2),
	// 										}},
	// 								}},
	// 								SupportedStorageEditions: []*armmysqlflexibleservers.StorageEditionCapability{
	// 									{
	// 										Name: to.Ptr("Premium"),
	// 										MaxBackupRetentionDays: to.Ptr[int64](35),
	// 										MaxStorageSize: to.Ptr[int64](16777216),
	// 										MinBackupRetentionDays: to.Ptr[int64](7),
	// 										MinStorageSize: to.Ptr[int64](20480),
	// 								}},
	// 							},
	// 							{
	// 								Name: to.Ptr("GeneralPurpose"),
	// 								SupportedServerVersions: []*armmysqlflexibleservers.ServerVersionCapability{
	// 									{
	// 										Name: to.Ptr("5.7"),
	// 										SupportedSKUs: []*armmysqlflexibleservers.SKUCapability{
	// 											{
	// 												Name: to.Ptr("Standard_D2ds_v4"),
	// 												SupportedIops: to.Ptr[int64](3200),
	// 												SupportedMemoryPerVCoreMB: to.Ptr[int64](4096),
	// 												VCores: to.Ptr[int64](2),
	// 											},
	// 											{
	// 												Name: to.Ptr("Standard_D4ds_v4"),
	// 												SupportedIops: to.Ptr[int64](6400),
	// 												SupportedMemoryPerVCoreMB: to.Ptr[int64](4096),
	// 												VCores: to.Ptr[int64](4),
	// 											},
	// 											{
	// 												Name: to.Ptr("Standard_D8ds_v4"),
	// 												SupportedIops: to.Ptr[int64](12800),
	// 												SupportedMemoryPerVCoreMB: to.Ptr[int64](4096),
	// 												VCores: to.Ptr[int64](8),
	// 											},
	// 											{
	// 												Name: to.Ptr("Standard_D16ds_v4"),
	// 												SupportedIops: to.Ptr[int64](20000),
	// 												SupportedMemoryPerVCoreMB: to.Ptr[int64](4096),
	// 												VCores: to.Ptr[int64](16),
	// 											},
	// 											{
	// 												Name: to.Ptr("Standard_D32ds_v4"),
	// 												SupportedIops: to.Ptr[int64](20000),
	// 												SupportedMemoryPerVCoreMB: to.Ptr[int64](4096),
	// 												VCores: to.Ptr[int64](32),
	// 											},
	// 											{
	// 												Name: to.Ptr("Standard_D48ds_v4"),
	// 												SupportedIops: to.Ptr[int64](20000),
	// 												SupportedMemoryPerVCoreMB: to.Ptr[int64](4096),
	// 												VCores: to.Ptr[int64](48),
	// 											},
	// 											{
	// 												Name: to.Ptr("Standard_D64ds_v4"),
	// 												SupportedIops: to.Ptr[int64](20000),
	// 												SupportedMemoryPerVCoreMB: to.Ptr[int64](4096),
	// 												VCores: to.Ptr[int64](64),
	// 										}},
	// 									},
	// 									{
	// 										Name: to.Ptr("8.0.21"),
	// 										SupportedSKUs: []*armmysqlflexibleservers.SKUCapability{
	// 											{
	// 												Name: to.Ptr("Standard_D2ds_v4"),
	// 												SupportedIops: to.Ptr[int64](3200),
	// 												SupportedMemoryPerVCoreMB: to.Ptr[int64](4096),
	// 												VCores: to.Ptr[int64](2),
	// 											},
	// 											{
	// 												Name: to.Ptr("Standard_D4ds_v4"),
	// 												SupportedIops: to.Ptr[int64](6400),
	// 												SupportedMemoryPerVCoreMB: to.Ptr[int64](4096),
	// 												VCores: to.Ptr[int64](4),
	// 											},
	// 											{
	// 												Name: to.Ptr("Standard_D8ds_v4"),
	// 												SupportedIops: to.Ptr[int64](12800),
	// 												SupportedMemoryPerVCoreMB: to.Ptr[int64](4096),
	// 												VCores: to.Ptr[int64](8),
	// 											},
	// 											{
	// 												Name: to.Ptr("Standard_D16ds_v4"),
	// 												SupportedIops: to.Ptr[int64](20000),
	// 												SupportedMemoryPerVCoreMB: to.Ptr[int64](4096),
	// 												VCores: to.Ptr[int64](16),
	// 											},
	// 											{
	// 												Name: to.Ptr("Standard_D32ds_v4"),
	// 												SupportedIops: to.Ptr[int64](20000),
	// 												SupportedMemoryPerVCoreMB: to.Ptr[int64](4096),
	// 												VCores: to.Ptr[int64](32),
	// 											},
	// 											{
	// 												Name: to.Ptr("Standard_D48ds_v4"),
	// 												SupportedIops: to.Ptr[int64](20000),
	// 												SupportedMemoryPerVCoreMB: to.Ptr[int64](4096),
	// 												VCores: to.Ptr[int64](48),
	// 											},
	// 											{
	// 												Name: to.Ptr("Standard_D64ds_v4"),
	// 												SupportedIops: to.Ptr[int64](20000),
	// 												SupportedMemoryPerVCoreMB: to.Ptr[int64](4096),
	// 												VCores: to.Ptr[int64](64),
	// 										}},
	// 								}},
	// 								SupportedStorageEditions: []*armmysqlflexibleservers.StorageEditionCapability{
	// 									{
	// 										Name: to.Ptr("Premium"),
	// 										MaxBackupRetentionDays: to.Ptr[int64](35),
	// 										MaxStorageSize: to.Ptr[int64](16777216),
	// 										MinBackupRetentionDays: to.Ptr[int64](7),
	// 										MinStorageSize: to.Ptr[int64](20480),
	// 								}},
	// 							},
	// 							{
	// 								Name: to.Ptr("MemoryOptimized"),
	// 								SupportedServerVersions: []*armmysqlflexibleservers.ServerVersionCapability{
	// 									{
	// 										Name: to.Ptr("5.7"),
	// 										SupportedSKUs: []*armmysqlflexibleservers.SKUCapability{
	// 											{
	// 												Name: to.Ptr("Standard_E2ds_v4"),
	// 												SupportedIops: to.Ptr[int64](3200),
	// 												SupportedMemoryPerVCoreMB: to.Ptr[int64](8192),
	// 												VCores: to.Ptr[int64](2),
	// 											},
	// 											{
	// 												Name: to.Ptr("Standard_E4ds_v4"),
	// 												SupportedIops: to.Ptr[int64](6400),
	// 												SupportedMemoryPerVCoreMB: to.Ptr[int64](8192),
	// 												VCores: to.Ptr[int64](4),
	// 											},
	// 											{
	// 												Name: to.Ptr("Standard_E8ds_v4"),
	// 												SupportedIops: to.Ptr[int64](12800),
	// 												SupportedMemoryPerVCoreMB: to.Ptr[int64](8192),
	// 												VCores: to.Ptr[int64](8),
	// 											},
	// 											{
	// 												Name: to.Ptr("Standard_E16ds_v4"),
	// 												SupportedIops: to.Ptr[int64](20000),
	// 												SupportedMemoryPerVCoreMB: to.Ptr[int64](8192),
	// 												VCores: to.Ptr[int64](16),
	// 											},
	// 											{
	// 												Name: to.Ptr("Standard_E32ds_v4"),
	// 												SupportedIops: to.Ptr[int64](20000),
	// 												SupportedMemoryPerVCoreMB: to.Ptr[int64](8192),
	// 												VCores: to.Ptr[int64](32),
	// 											},
	// 											{
	// 												Name: to.Ptr("Standard_E48ds_v4"),
	// 												SupportedIops: to.Ptr[int64](20000),
	// 												SupportedMemoryPerVCoreMB: to.Ptr[int64](8192),
	// 												VCores: to.Ptr[int64](48),
	// 											},
	// 											{
	// 												Name: to.Ptr("Standard_E64ds_v4"),
	// 												SupportedIops: to.Ptr[int64](20000),
	// 												SupportedMemoryPerVCoreMB: to.Ptr[int64](8192),
	// 												VCores: to.Ptr[int64](64),
	// 										}},
	// 									},
	// 									{
	// 										Name: to.Ptr("8.0.21"),
	// 										SupportedSKUs: []*armmysqlflexibleservers.SKUCapability{
	// 											{
	// 												Name: to.Ptr("Standard_E2ds_v4"),
	// 												SupportedIops: to.Ptr[int64](3200),
	// 												SupportedMemoryPerVCoreMB: to.Ptr[int64](8192),
	// 												VCores: to.Ptr[int64](2),
	// 											},
	// 											{
	// 												Name: to.Ptr("Standard_E4ds_v4"),
	// 												SupportedIops: to.Ptr[int64](6400),
	// 												SupportedMemoryPerVCoreMB: to.Ptr[int64](8192),
	// 												VCores: to.Ptr[int64](4),
	// 											},
	// 											{
	// 												Name: to.Ptr("Standard_E8ds_v4"),
	// 												SupportedIops: to.Ptr[int64](12800),
	// 												SupportedMemoryPerVCoreMB: to.Ptr[int64](8192),
	// 												VCores: to.Ptr[int64](8),
	// 											},
	// 											{
	// 												Name: to.Ptr("Standard_E16ds_v4"),
	// 												SupportedIops: to.Ptr[int64](20000),
	// 												SupportedMemoryPerVCoreMB: to.Ptr[int64](8192),
	// 												VCores: to.Ptr[int64](16),
	// 											},
	// 											{
	// 												Name: to.Ptr("Standard_E32ds_v4"),
	// 												SupportedIops: to.Ptr[int64](20000),
	// 												SupportedMemoryPerVCoreMB: to.Ptr[int64](8192),
	// 												VCores: to.Ptr[int64](32),
	// 											},
	// 											{
	// 												Name: to.Ptr("Standard_E48ds_v4"),
	// 												SupportedIops: to.Ptr[int64](20000),
	// 												SupportedMemoryPerVCoreMB: to.Ptr[int64](8192),
	// 												VCores: to.Ptr[int64](48),
	// 											},
	// 											{
	// 												Name: to.Ptr("Standard_E64ds_v4"),
	// 												SupportedIops: to.Ptr[int64](20000),
	// 												SupportedMemoryPerVCoreMB: to.Ptr[int64](8192),
	// 												VCores: to.Ptr[int64](64),
	// 										}},
	// 								}},
	// 								SupportedStorageEditions: []*armmysqlflexibleservers.StorageEditionCapability{
	// 									{
	// 										Name: to.Ptr("Premium"),
	// 										MaxBackupRetentionDays: to.Ptr[int64](35),
	// 										MaxStorageSize: to.Ptr[int64](16777216),
	// 										MinBackupRetentionDays: to.Ptr[int64](7),
	// 										MinStorageSize: to.Ptr[int64](20480),
	// 								}},
	// 						}},
	// 						SupportedGeoBackupRegions: []*string{
	// 						},
	// 						SupportedHAMode: []*string{
	// 							to.Ptr("SameZone"),
	// 							to.Ptr("ZoneRedundant")},
	// 							Zone: to.Ptr("3"),
	// 					}},
	// 				}
}
Output:

type LocationBasedCapabilitiesClientListOptions

type LocationBasedCapabilitiesClientListOptions struct {
}

LocationBasedCapabilitiesClientListOptions contains the optional parameters for the LocationBasedCapabilitiesClient.NewListPager method.

type LocationBasedCapabilitiesClientListResponse

type LocationBasedCapabilitiesClientListResponse struct {
	// location capability
	CapabilitiesListResult
}

LocationBasedCapabilitiesClientListResponse contains the response from method LocationBasedCapabilitiesClient.NewListPager.

type LogFile

type LogFile struct {
	// The properties of a logFile.
	Properties *LogFileProperties

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

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

	// READ-ONLY; The system metadata relating to this resource.
	SystemData *SystemData

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

LogFile - Represents a logFile.

func (LogFile) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type LogFile.

func (*LogFile) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type LogFile.

type LogFileListResult

type LogFileListResult struct {
	// The link used to get the next page of operations.
	NextLink *string

	// The list of logFiles in a server
	Value []*LogFile
}

LogFileListResult - A List of logFiles.

func (LogFileListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type LogFileListResult.

func (*LogFileListResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type LogFileListResult.

type LogFileProperties

type LogFileProperties struct {
	// Creation timestamp of the log file.
	CreatedTime *time.Time

	// Last modified timestamp of the log file.
	LastModifiedTime *time.Time

	// The size in kb of the logFile.
	SizeInKB *int64

	// Type of the log file.
	Type *string

	// The url to download the log file from.
	URL *string
}

LogFileProperties - The properties of a logFile.

func (LogFileProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type LogFileProperties.

func (*LogFileProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type LogFileProperties.

type LogFilesClient

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

LogFilesClient contains the methods for the LogFiles group. Don't use this type directly, use NewLogFilesClient() instead.

func NewLogFilesClient

func NewLogFilesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LogFilesClient, error)

NewLogFilesClient creates a new instance of LogFilesClient with the specified values.

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

func (*LogFilesClient) NewListByServerPager

func (client *LogFilesClient) NewListByServerPager(resourceGroupName string, serverName string, options *LogFilesClientListByServerOptions) *runtime.Pager[LogFilesClientListByServerResponse]

NewListByServerPager - List all the server log files in a given server.

Generated from API version 2021-12-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serverName - The name of the server.
  • options - LogFilesClientListByServerOptions contains the optional parameters for the LogFilesClient.NewListByServerPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/mysql/resource-manager/Microsoft.DBforMySQL/LogFiles/preview/2021-12-01-preview/examples/LogFilesListByServer.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewLogFilesClient().NewListByServerPager("testrg", "mysqltestsvc1", 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.LogFileListResult = armmysqlflexibleservers.LogFileListResult{
	// 	Value: []*armmysqlflexibleservers.LogFile{
	// 		{
	// 			Name: to.Ptr("mysql-slow-mysqltestsvc1-2018022823.log"),
	// 			Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers/logFiles"),
	// 			ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestsvc1/logFiles/mysql-slow-mysqltestsvc1-2018022823.log"),
	// 			Properties: &armmysqlflexibleservers.LogFileProperties{
	// 				Type: to.Ptr("slowlog"),
	// 				CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1-01-01T00:00:00.000Z"); return t}()),
	// 				LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-01T06:09:20.000Z"); return t}()),
	// 				SizeInKB: to.Ptr[int64](1),
	// 				URL: to.Ptr("https://wasd2prodwus1afse42.file.core.windows.net/833c99b2f36c47349e5554b903fe0440/serverlogs/mysql-slow-mysqltestsvc1-2018022823.log?sv=2015-04-05&sr=f&sig=D9Ga4N5Pa%2BPe5Bmjpvs7A0TPD%2FF7IZpk9e4KWR0jgpM%3D&se=2018-03-01T07%3A12%3A13Z&sp=r"),
	// 			},
	// 	}},
	// }
}
Output:

type LogFilesClientListByServerOptions

type LogFilesClientListByServerOptions struct {
}

LogFilesClientListByServerOptions contains the optional parameters for the LogFilesClient.NewListByServerPager method.

type LogFilesClientListByServerResponse

type LogFilesClientListByServerResponse struct {
	// A List of logFiles.
	LogFileListResult
}

LogFilesClientListByServerResponse contains the response from method LogFilesClient.NewListByServerPager.

type MaintenanceWindow

type MaintenanceWindow struct {
	// indicates whether custom window is enabled or disabled
	CustomWindow *string

	// day of week for maintenance window
	DayOfWeek *int32

	// start hour for maintenance window
	StartHour *int32

	// start minute for maintenance window
	StartMinute *int32
}

MaintenanceWindow - Maintenance window of a server.

func (MaintenanceWindow) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type MaintenanceWindow.

func (*MaintenanceWindow) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type MaintenanceWindow.

type ManagedServiceIdentityType

type ManagedServiceIdentityType string

ManagedServiceIdentityType - Type of managed service identity.

const (
	ManagedServiceIdentityTypeUserAssigned ManagedServiceIdentityType = "UserAssigned"
)

func PossibleManagedServiceIdentityTypeValues

func PossibleManagedServiceIdentityTypeValues() []ManagedServiceIdentityType

PossibleManagedServiceIdentityTypeValues returns the possible values for the ManagedServiceIdentityType const type.

type NameAvailability

type NameAvailability struct {
	// Error Message.
	Message *string

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

	// Reason for name being unavailable.
	Reason *string
}

NameAvailability - Represents a resource name availability.

func (NameAvailability) MarshalJSON

func (n NameAvailability) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NameAvailability.

func (*NameAvailability) UnmarshalJSON

func (n *NameAvailability) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NameAvailability.

type NameAvailabilityRequest

type NameAvailabilityRequest struct {
	// REQUIRED; Resource name to verify.
	Name *string

	// Resource type used for verification.
	Type *string
}

NameAvailabilityRequest - Request from client to check resource name availability.

func (NameAvailabilityRequest) MarshalJSON

func (n NameAvailabilityRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NameAvailabilityRequest.

func (*NameAvailabilityRequest) UnmarshalJSON

func (n *NameAvailabilityRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NameAvailabilityRequest.

type Network

type Network struct {
	// Delegated subnet resource id used to setup vnet for a server.
	DelegatedSubnetResourceID *string

	// Private DNS zone resource id.
	PrivateDNSZoneResourceID *string

	// Whether or not public network access is allowed for this server. Value is 'Disabled' when server has VNet integration.
	PublicNetworkAccess *EnableStatusEnum
}

Network related properties of a server

func (Network) MarshalJSON

func (n Network) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Network.

func (*Network) UnmarshalJSON

func (n *Network) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Network.

type Operation

type Operation struct {
	// The localized display information for this particular operation or action.
	Display *OperationDisplay

	// The name of the operation being performed on this particular object.
	Name *string

	// The intended executor of the operation.
	Origin *string

	// Additional descriptions for the operation.
	Properties map[string]any
}

Operation - REST API operation definition.

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 {
	// Operation description.
	Description *string

	// Localized friendly name for the operation.
	Operation *string

	// Operation resource provider name.
	Provider *string

	// Resource on which the operation is performed.
	Resource *string
}

OperationDisplay - Display metadata associated with the 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 {
	// URL client should use to fetch the next page (per server side paging).
	NextLink *string

	// Collection of available operation details
	Value []*Operation
}

OperationListResult - A list of resource provider operations.

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 OperationStatus

type OperationStatus string

OperationStatus - The operation status

const (
	// OperationStatusCancelInProgress - The cancellation in progress
	OperationStatusCancelInProgress OperationStatus = "CancelInProgress"
	// OperationStatusCanceled - The operation has been Canceled
	OperationStatusCanceled OperationStatus = "Canceled"
	// OperationStatusFailed - The operation Failed
	OperationStatusFailed OperationStatus = "Failed"
	// OperationStatusInProgress - The operation is running
	OperationStatusInProgress OperationStatus = "InProgress"
	// OperationStatusPending - The operation has been accepted but hasn't started.
	OperationStatusPending OperationStatus = "Pending"
	// OperationStatusSucceeded - The operation Succeeded
	OperationStatusSucceeded OperationStatus = "Succeeded"
)

func PossibleOperationStatusValues

func PossibleOperationStatusValues() []OperationStatus

PossibleOperationStatusValues returns the possible values for the OperationStatus const type.

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 - Lists all of the available REST API operations.

Generated from API version 2021-12-01-preview

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

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2021-12-01-preview/examples/OperationsList.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewOperationsClient().NewListPager(nil)
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.OperationListResult = armmysqlflexibleservers.OperationListResult{
	// 	Value: []*armmysqlflexibleservers.Operation{
	// 		{
	// 			Name: to.Ptr("Microsoft.DBforMySQL/flexibleServers/firewallRules/read"),
	// 			Display: &armmysqlflexibleservers.OperationDisplay{
	// 				Description: to.Ptr("Return the list of firewall rules for a server or gets the properties for the specified firewall rule."),
	// 				Operation: to.Ptr("List/Get Firewall Rules"),
	// 				Provider: to.Ptr("Microsoft DB for MySQL"),
	// 				Resource: to.Ptr("Firewall Rules"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.DBforMySQL/flexibleServers/firewallRules/write"),
	// 			Display: &armmysqlflexibleservers.OperationDisplay{
	// 				Description: to.Ptr("Creates a firewall rule with the specified parameters or update an existing rule."),
	// 				Operation: to.Ptr("Create/Update Firewall Rule"),
	// 				Provider: to.Ptr("Microsoft DB for MySQL"),
	// 				Resource: to.Ptr("Firewall Rules"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.DBforMySQL/flexibleServers/firewallRules/delete"),
	// 			Display: &armmysqlflexibleservers.OperationDisplay{
	// 				Description: to.Ptr("Deletes an existing firewall rule."),
	// 				Operation: to.Ptr("Delete Firewall Rule"),
	// 				Provider: to.Ptr("Microsoft DB for MySQL"),
	// 				Resource: to.Ptr("Firewall Rules"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.DBforMySQL/flexibleServers/read"),
	// 			Display: &armmysqlflexibleservers.OperationDisplay{
	// 				Description: to.Ptr("Return the list of servers or gets the properties for the specified server."),
	// 				Operation: to.Ptr("List/Get MySQL Servers"),
	// 				Provider: to.Ptr("Microsoft DB for MySQL"),
	// 				Resource: to.Ptr("MySQL Server"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.DBforMySQL/flexibleServers/write"),
	// 			Display: &armmysqlflexibleservers.OperationDisplay{
	// 				Description: to.Ptr("Creates a server with the specified parameters or update the properties or tags for the specified server."),
	// 				Operation: to.Ptr("Create/Update MySQL Server"),
	// 				Provider: to.Ptr("Microsoft DB for MySQL"),
	// 				Resource: to.Ptr("MySQL Server"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.DBforMySQL/flexibleServers/delete"),
	// 			Display: &armmysqlflexibleservers.OperationDisplay{
	// 				Description: to.Ptr("Deletes an existing server."),
	// 				Operation: to.Ptr("Delete MySQL Server"),
	// 				Provider: to.Ptr("Microsoft DB for MySQL"),
	// 				Resource: to.Ptr("MySQL Server"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.DBforMySQL/flexibleServers/providers/Microsoft.Insights/metricDefinitions/read"),
	// 			Display: &armmysqlflexibleservers.OperationDisplay{
	// 				Description: to.Ptr("Return types of metrics that are available for databases"),
	// 				Operation: to.Ptr("Get database metric definitions"),
	// 				Provider: to.Ptr("Microsoft DB for MySQL"),
	// 				Resource: to.Ptr("Database Metric Definition"),
	// 			},
	// 			Properties: map[string]any{
	// 				"serviceSpecification": map[string]any{
	// 					"metricSpecifications":[]any{
	// 						map[string]any{
	// 							"name": "cpu_percent",
	// 							"aggregationType": "Average",
	// 							"displayDescription": "CPU percent",
	// 							"displayName": "CPU percent",
	// 							"fillGapWithZero": true,
	// 							"unit": "Percent",
	// 						},
	// 						map[string]any{
	// 							"name": "memory_percent",
	// 							"aggregationType": "Average",
	// 							"displayDescription": "Memory percent",
	// 							"displayName": "Memory percent",
	// 							"fillGapWithZero": true,
	// 							"unit": "Percent",
	// 						},
	// 						map[string]any{
	// 							"name": "io_consumption_percent",
	// 							"aggregationType": "Average",
	// 							"displayDescription": "IO percent",
	// 							"displayName": "IO percent",
	// 							"fillGapWithZero": true,
	// 							"unit": "Percent",
	// 						},
	// 						map[string]any{
	// 							"name": "storage_percent",
	// 							"aggregationType": "Average",
	// 							"displayDescription": "Storage percentage",
	// 							"displayName": "Storage percentage",
	// 							"unit": "Percent",
	// 						},
	// 						map[string]any{
	// 							"name": "storage_used",
	// 							"aggregationType": "Average",
	// 							"displayDescription": "Storage used",
	// 							"displayName": "Storage used",
	// 							"unit": "Bytes",
	// 						},
	// 						map[string]any{
	// 							"name": "storage_limit",
	// 							"aggregationType": "Average",
	// 							"displayDescription": "Storage limit",
	// 							"displayName": "Storage limit",
	// 							"unit": "Bytes",
	// 						},
	// 						map[string]any{
	// 							"name": "serverlog_storage_percent",
	// 							"aggregationType": "Average",
	// 							"displayDescription": "Server Log storage percent",
	// 							"displayName": "Server Log storage percent",
	// 							"unit": "Percent",
	// 						},
	// 						map[string]any{
	// 							"name": "serverlog_storage_usage",
	// 							"aggregationType": "Average",
	// 							"displayDescription": "Server Log storage used",
	// 							"displayName": "Server Log storage used",
	// 							"unit": "Bytes",
	// 						},
	// 						map[string]any{
	// 							"name": "serverlog_storage_limit",
	// 							"aggregationType": "Average",
	// 							"displayDescription": "Server Log storage limit",
	// 							"displayName": "Server Log storage limit",
	// 							"unit": "Bytes",
	// 						},
	// 						map[string]any{
	// 							"name": "active_connections",
	// 							"aggregationType": "Average",
	// 							"displayDescription": "Total active connections",
	// 							"displayName": "Total active connections",
	// 							"fillGapWithZero": true,
	// 							"unit": "Count",
	// 						},
	// 						map[string]any{
	// 							"name": "connections_failed",
	// 							"aggregationType": "Average",
	// 							"displayDescription": "Total failed connections",
	// 							"displayName": "Total failed connections",
	// 							"fillGapWithZero": true,
	// 							"unit": "Count",
	// 						},
	// 						map[string]any{
	// 							"name": "seconds_behind_master",
	// 							"aggregationType": "Average",
	// 							"displayDescription": "Replication lag in seconds",
	// 							"displayName": "Replication lag in seconds",
	// 							"fillGapWithZero": true,
	// 							"unit": "Count",
	// 						},
	// 					},
	// 				},
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.DBforMySQL/flexibleServers/providers/Microsoft.Insights/diagnosticSettings/read"),
	// 			Display: &armmysqlflexibleservers.OperationDisplay{
	// 				Description: to.Ptr("Gets the disagnostic setting for the resource"),
	// 				Operation: to.Ptr("Read diagnostic setting"),
	// 				Provider: to.Ptr("Microsoft DB for MySQL"),
	// 				Resource: to.Ptr("Database Metric Definition"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.DBforMySQL/flexibleServers/providers/Microsoft.Insights/diagnosticSettings/write"),
	// 			Display: &armmysqlflexibleservers.OperationDisplay{
	// 				Description: to.Ptr("Creates or updates the diagnostic setting for the resource"),
	// 				Operation: to.Ptr("Write diagnostic setting"),
	// 				Provider: to.Ptr("Microsoft DB for MySQL"),
	// 				Resource: to.Ptr("Database Metric Definition"),
	// 			},
	// 	}},
	// }
}
Output:

type OperationsClientListOptions

type OperationsClientListOptions struct {
}

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

type OperationsClientListResponse

type OperationsClientListResponse struct {
	// A list of resource provider operations.
	OperationListResult
}

OperationsClientListResponse contains the response from method OperationsClient.NewListPager.

type ProxyResource

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

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

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

ProxyResource - The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location

func (ProxyResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ProxyResource.

func (*ProxyResource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResource.

type ReplicasClient

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

ReplicasClient contains the methods for the Replicas group. Don't use this type directly, use NewReplicasClient() instead.

func NewReplicasClient

func NewReplicasClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReplicasClient, error)

NewReplicasClient creates a new instance of ReplicasClient with the specified values.

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

func (*ReplicasClient) NewListByServerPager

func (client *ReplicasClient) NewListByServerPager(resourceGroupName string, serverName string, options *ReplicasClientListByServerOptions) *runtime.Pager[ReplicasClientListByServerResponse]

NewListByServerPager - List all the replicas for a given server.

Generated from API version 2022-09-30-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serverName - The name of the server.
  • options - ReplicasClientListByServerOptions contains the optional parameters for the ReplicasClient.NewListByServerPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ReplicasListByServer.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewReplicasClient().NewListByServerPager("TestGroup", "mysqltestserver", 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.ServerListResult = armmysqlflexibleservers.ServerListResult{
	// 	Value: []*armmysqlflexibleservers.Server{
	// 		{
	// 			Name: to.Ptr("mysqltestserver-repl"),
	// 			Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers"),
	// 			ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver-repl"),
	// 			Location: to.Ptr("Southeast Asia"),
	// 			Tags: map[string]*string{
	// 				"num": to.Ptr("1"),
	// 			},
	// 			Properties: &armmysqlflexibleservers.ServerProperties{
	// 				AdministratorLogin: to.Ptr("cloudsa"),
	// 				AvailabilityZone: to.Ptr("1"),
	// 				Backup: &armmysqlflexibleservers.Backup{
	// 					BackupRetentionDays: to.Ptr[int32](7),
	// 					EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-24T08:19:18.000Z"); return t}()),
	// 					GeoRedundantBackup: to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled),
	// 				},
	// 				FullyQualifiedDomainName: to.Ptr("mysqltestserver-repl.orcabrci-seas1-a.mscds.com"),
	// 				HighAvailability: &armmysqlflexibleservers.HighAvailability{
	// 					Mode: to.Ptr(armmysqlflexibleservers.HighAvailabilityModeDisabled),
	// 					State: to.Ptr(armmysqlflexibleservers.HighAvailabilityStateNotEnabled),
	// 				},
	// 				Network: &armmysqlflexibleservers.Network{
	// 					PublicNetworkAccess: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled),
	// 				},
	// 				ReplicaCapacity: to.Ptr[int32](0),
	// 				ReplicationRole: to.Ptr(armmysqlflexibleservers.ReplicationRoleReplica),
	// 				SourceServerResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver"),
	// 				State: to.Ptr(armmysqlflexibleservers.ServerStateReady),
	// 				Storage: &armmysqlflexibleservers.Storage{
	// 					AutoGrow: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled),
	// 					Iops: to.Ptr[int32](360),
	// 					StorageSizeGB: to.Ptr[int32](20),
	// 					StorageSKU: to.Ptr("Premium_LRS"),
	// 				},
	// 				Version: to.Ptr(armmysqlflexibleservers.ServerVersionFive7),
	// 			},
	// 			SKU: &armmysqlflexibleservers.SKU{
	// 				Name: to.Ptr("Standard_D2ds_v4"),
	// 				Tier: to.Ptr(armmysqlflexibleservers.SKUTierGeneralPurpose),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("mysqltestserver-repl"),
	// 			Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers"),
	// 			ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver-repl2"),
	// 			Location: to.Ptr("Southeast Asia"),
	// 			Tags: map[string]*string{
	// 				"num": to.Ptr("1"),
	// 			},
	// 			Properties: &armmysqlflexibleservers.ServerProperties{
	// 				AdministratorLogin: to.Ptr("cloudsa"),
	// 				AvailabilityZone: to.Ptr("1"),
	// 				Backup: &armmysqlflexibleservers.Backup{
	// 					BackupRetentionDays: to.Ptr[int32](7),
	// 					EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-23T08:19:18.000Z"); return t}()),
	// 					GeoRedundantBackup: to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled),
	// 				},
	// 				FullyQualifiedDomainName: to.Ptr("mysqltestserver-repl2.orcabrci-seas1-a.mscds.com"),
	// 				HighAvailability: &armmysqlflexibleservers.HighAvailability{
	// 					Mode: to.Ptr(armmysqlflexibleservers.HighAvailabilityModeDisabled),
	// 					State: to.Ptr(armmysqlflexibleservers.HighAvailabilityStateNotEnabled),
	// 				},
	// 				Network: &armmysqlflexibleservers.Network{
	// 					PublicNetworkAccess: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled),
	// 				},
	// 				ReplicaCapacity: to.Ptr[int32](0),
	// 				ReplicationRole: to.Ptr(armmysqlflexibleservers.ReplicationRoleReplica),
	// 				SourceServerResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver"),
	// 				State: to.Ptr(armmysqlflexibleservers.ServerStateReady),
	// 				Storage: &armmysqlflexibleservers.Storage{
	// 					AutoGrow: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled),
	// 					Iops: to.Ptr[int32](360),
	// 					StorageSizeGB: to.Ptr[int32](20),
	// 					StorageSKU: to.Ptr("Premium_LRS"),
	// 				},
	// 				Version: to.Ptr(armmysqlflexibleservers.ServerVersionFive7),
	// 			},
	// 			SKU: &armmysqlflexibleservers.SKU{
	// 				Name: to.Ptr("Standard_D2ds_v4"),
	// 				Tier: to.Ptr(armmysqlflexibleservers.SKUTierGeneralPurpose),
	// 			},
	// 	}},
	// }
}
Output:

type ReplicasClientListByServerOptions

type ReplicasClientListByServerOptions struct {
}

ReplicasClientListByServerOptions contains the optional parameters for the ReplicasClient.NewListByServerPager method.

type ReplicasClientListByServerResponse

type ReplicasClientListByServerResponse struct {
	// A list of servers.
	ServerListResult
}

ReplicasClientListByServerResponse contains the response from method ReplicasClient.NewListByServerPager.

type ReplicationRole

type ReplicationRole string

ReplicationRole - The replication role.

const (
	ReplicationRoleNone    ReplicationRole = "None"
	ReplicationRoleReplica ReplicationRole = "Replica"
	ReplicationRoleSource  ReplicationRole = "Source"
)

func PossibleReplicationRoleValues

func PossibleReplicationRoleValues() []ReplicationRole

PossibleReplicationRoleValues returns the possible values for the ReplicationRole const type.

type ResetAllToDefault

type ResetAllToDefault string

ResetAllToDefault - Whether to reset all server parameters to default.

const (
	ResetAllToDefaultFalse ResetAllToDefault = "False"
	ResetAllToDefaultTrue  ResetAllToDefault = "True"
)

func PossibleResetAllToDefaultValues

func PossibleResetAllToDefaultValues() []ResetAllToDefault

PossibleResetAllToDefaultValues returns the possible values for the ResetAllToDefault const type.

type Resource

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

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

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

Resource - Common fields that are returned in the response for all Azure Resource Manager resources

func (Resource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Resource.

func (*Resource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type Resource.

type SKU

type SKU struct {
	// REQUIRED; The name of the sku, e.g. StandardD32sv3.
	Name *string

	// REQUIRED; The tier of the particular SKU, e.g. GeneralPurpose.
	Tier *SKUTier
}

SKU - Billing information related properties of a server.

func (SKU) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SKU.

func (*SKU) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type SKU.

type SKUCapability

type SKUCapability struct {
	// READ-ONLY; vCore name
	Name *string

	// READ-ONLY; supported IOPS
	SupportedIops *int64

	// READ-ONLY; supported memory per vCore in MB
	SupportedMemoryPerVCoreMB *int64

	// READ-ONLY; supported vCores
	VCores *int64
}

SKUCapability - Sku capability

func (SKUCapability) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SKUCapability.

func (*SKUCapability) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type SKUCapability.

type SKUTier

type SKUTier string

SKUTier - The tier of the particular SKU, e.g. GeneralPurpose.

const (
	SKUTierBurstable       SKUTier = "Burstable"
	SKUTierGeneralPurpose  SKUTier = "GeneralPurpose"
	SKUTierMemoryOptimized SKUTier = "MemoryOptimized"
)

func PossibleSKUTierValues

func PossibleSKUTierValues() []SKUTier

PossibleSKUTierValues returns the possible values for the SKUTier const type.

type Server

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

	// The cmk identity for the server.
	Identity *Identity

	// Properties of the server.
	Properties *ServerProperties

	// The SKU (pricing tier) of the server.
	SKU *SKU

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

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

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

	// READ-ONLY; The system metadata relating to this resource.
	SystemData *SystemData

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

Server - Represents a server.

func (Server) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Server.

func (*Server) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type Server.

type ServerBackup

type ServerBackup struct {
	// The properties of a server backup.
	Properties *ServerBackupProperties

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

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

	// READ-ONLY; The system metadata relating to this resource.
	SystemData *SystemData

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

ServerBackup - Server backup properties

func (ServerBackup) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ServerBackup.

func (*ServerBackup) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ServerBackup.

type ServerBackupListResult

type ServerBackupListResult struct {
	// The link used to get the next page of operations.
	NextLink *string

	// The list of backups of a server.
	Value []*ServerBackup
}

ServerBackupListResult - A list of server backups.

func (ServerBackupListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ServerBackupListResult.

func (*ServerBackupListResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ServerBackupListResult.

type ServerBackupProperties

type ServerBackupProperties struct {
	// Backup type.
	BackupType *string

	// Backup completed time (ISO8601 format).
	CompletedTime *time.Time

	// Backup source
	Source *string
}

ServerBackupProperties - The properties of a server backup.

func (ServerBackupProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ServerBackupProperties.

func (*ServerBackupProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ServerBackupProperties.

type ServerEditionCapability

type ServerEditionCapability struct {
	// READ-ONLY; Server edition name
	Name *string

	// READ-ONLY; A list of supported server versions.
	SupportedServerVersions []*ServerVersionCapability

	// READ-ONLY; A list of supported storage editions
	SupportedStorageEditions []*StorageEditionCapability
}

ServerEditionCapability - Server edition capabilities.

func (ServerEditionCapability) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ServerEditionCapability.

func (*ServerEditionCapability) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ServerEditionCapability.

type ServerForUpdate

type ServerForUpdate struct {
	// The cmk identity for the server.
	Identity *Identity

	// The properties that can be updated for a server.
	Properties *ServerPropertiesForUpdate

	// The SKU (pricing tier) of the server.
	SKU *SKU

	// Application-specific metadata in the form of key-value pairs.
	Tags map[string]*string
}

ServerForUpdate - Parameters allowed to update for a server.

func (ServerForUpdate) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ServerForUpdate.

func (*ServerForUpdate) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ServerForUpdate.

type ServerGtidSetParameter

type ServerGtidSetParameter struct {
	// The gtid set of server.
	GtidSet *string
}

ServerGtidSetParameter - Server gtid set parameters.

func (ServerGtidSetParameter) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ServerGtidSetParameter.

func (*ServerGtidSetParameter) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ServerGtidSetParameter.

type ServerListResult

type ServerListResult struct {
	// The link used to get the next page of operations.
	NextLink *string

	// The list of servers
	Value []*Server
}

ServerListResult - A list of servers.

func (ServerListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ServerListResult.

func (*ServerListResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ServerListResult.

type ServerProperties

type ServerProperties struct {
	// The administrator's login name of a server. Can only be specified when the server is being created (and is required for
	// creation).
	AdministratorLogin *string

	// The password of the administrator login (required for server creation).
	AdministratorLoginPassword *string

	// availability Zone information of the server.
	AvailabilityZone *string

	// Backup related properties of a server.
	Backup *Backup

	// The mode to create a new MySQL server.
	CreateMode *CreateMode

	// The Data Encryption for CMK.
	DataEncryption *DataEncryption

	// High availability related properties of a server.
	HighAvailability *HighAvailability

	// Maintenance window of a server.
	MaintenanceWindow *MaintenanceWindow

	// Network related properties of a server.
	Network *Network

	// The replication role.
	ReplicationRole *ReplicationRole

	// Restore point creation time (ISO8601 format), specifying the time to restore from.
	RestorePointInTime *time.Time

	// The source MySQL server id.
	SourceServerResourceID *string

	// Storage related properties of a server.
	Storage *Storage

	// Server version.
	Version *ServerVersion

	// READ-ONLY; The fully qualified domain name of a server.
	FullyQualifiedDomainName *string

	// READ-ONLY; The maximum number of replicas that a primary server can have.
	ReplicaCapacity *int32

	// READ-ONLY; The state of a server.
	State *ServerState
}

ServerProperties - The properties of a server.

func (ServerProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ServerProperties.

func (*ServerProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ServerProperties.

type ServerPropertiesForUpdate

type ServerPropertiesForUpdate struct {
	// The password of the administrator login.
	AdministratorLoginPassword *string

	// Backup related properties of a server.
	Backup *Backup

	// The Data Encryption for CMK.
	DataEncryption *DataEncryption

	// High availability related properties of a server.
	HighAvailability *HighAvailability

	// Maintenance window of a server.
	MaintenanceWindow *MaintenanceWindow

	// The replication role of the server.
	ReplicationRole *ReplicationRole

	// Storage related properties of a server.
	Storage *Storage

	// Server version.
	Version *ServerVersion
}

ServerPropertiesForUpdate - The properties that can be updated for a server.

func (ServerPropertiesForUpdate) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ServerPropertiesForUpdate.

func (*ServerPropertiesForUpdate) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ServerPropertiesForUpdate.

type ServerRestartParameter

type ServerRestartParameter struct {
	// The maximum allowed failover time in seconds.
	MaxFailoverSeconds *int32

	// Whether or not failover to standby server when restarting a server with high availability enabled.
	RestartWithFailover *EnableStatusEnum
}

ServerRestartParameter - Server restart parameters.

func (ServerRestartParameter) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ServerRestartParameter.

func (*ServerRestartParameter) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ServerRestartParameter.

type ServerState

type ServerState string

ServerState - The state of a server.

const (
	ServerStateDisabled ServerState = "Disabled"
	ServerStateDropping ServerState = "Dropping"
	ServerStateReady    ServerState = "Ready"
	ServerStateStarting ServerState = "Starting"
	ServerStateStopped  ServerState = "Stopped"
	ServerStateStopping ServerState = "Stopping"
	ServerStateUpdating ServerState = "Updating"
)

func PossibleServerStateValues

func PossibleServerStateValues() []ServerState

PossibleServerStateValues returns the possible values for the ServerState const type.

type ServerVersion

type ServerVersion string

ServerVersion - The version of a server.

const (
	ServerVersionEight021 ServerVersion = "8.0.21"
	ServerVersionFive7    ServerVersion = "5.7"
)

func PossibleServerVersionValues

func PossibleServerVersionValues() []ServerVersion

PossibleServerVersionValues returns the possible values for the ServerVersion const type.

type ServerVersionCapability

type ServerVersionCapability struct {
	// READ-ONLY; server version
	Name *string

	// READ-ONLY; A list of supported Skus
	SupportedSKUs []*SKUCapability
}

ServerVersionCapability - Server version capabilities.

func (ServerVersionCapability) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ServerVersionCapability.

func (*ServerVersionCapability) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ServerVersionCapability.

type ServersClient

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

ServersClient contains the methods for the Servers group. Don't use this type directly, use NewServersClient() instead.

func NewServersClient

func NewServersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServersClient, error)

NewServersClient creates a new instance of ServersClient with the specified values.

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

func (*ServersClient) BeginCreate

func (client *ServersClient) BeginCreate(ctx context.Context, resourceGroupName string, serverName string, parameters Server, options *ServersClientBeginCreateOptions) (*runtime.Poller[ServersClientCreateResponse], error)

BeginCreate - Creates a new server or updates an existing server. The update action will overwrite the existing server. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-09-30-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serverName - The name of the server.
  • parameters - The required parameters for creating or updating a server.
  • options - ServersClientBeginCreateOptions contains the optional parameters for the ServersClient.BeginCreate method.
Example (CreateANewServer)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServerCreate.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewServersClient().BeginCreate(ctx, "testrg", "mysqltestserver", armmysqlflexibleservers.Server{
	Location: to.Ptr("southeastasia"),
	Tags: map[string]*string{
		"num": to.Ptr("1"),
	},
	Properties: &armmysqlflexibleservers.ServerProperties{
		AdministratorLogin:         to.Ptr("cloudsa"),
		AdministratorLoginPassword: to.Ptr("your_password"),
		AvailabilityZone:           to.Ptr("1"),
		Backup: &armmysqlflexibleservers.Backup{
			BackupRetentionDays: to.Ptr[int32](7),
			GeoRedundantBackup:  to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled),
		},
		CreateMode: to.Ptr(armmysqlflexibleservers.CreateModeDefault),
		HighAvailability: &armmysqlflexibleservers.HighAvailability{
			Mode:                    to.Ptr(armmysqlflexibleservers.HighAvailabilityModeZoneRedundant),
			StandbyAvailabilityZone: to.Ptr("3"),
		},
		Storage: &armmysqlflexibleservers.Storage{
			AutoGrow:      to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled),
			Iops:          to.Ptr[int32](600),
			StorageSizeGB: to.Ptr[int32](100),
		},
		Version: to.Ptr(armmysqlflexibleservers.ServerVersionFive7),
	},
	SKU: &armmysqlflexibleservers.SKU{
		Name: to.Ptr("Standard_D2ds_v4"),
		Tier: to.Ptr(armmysqlflexibleservers.SKUTierGeneralPurpose),
	},
}, 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.Server = armmysqlflexibleservers.Server{
// 	Name: to.Ptr("mysqltestserver"),
// 	Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers"),
// 	ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver"),
// 	Location: to.Ptr("Southeast Asia"),
// 	Tags: map[string]*string{
// 		"num": to.Ptr("1"),
// 	},
// 	Properties: &armmysqlflexibleservers.ServerProperties{
// 		AdministratorLogin: to.Ptr("cloudsa"),
// 		AvailabilityZone: to.Ptr("1"),
// 		Backup: &armmysqlflexibleservers.Backup{
// 			BackupRetentionDays: to.Ptr[int32](7),
// 			EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-17T06:11:38.415Z"); return t}()),
// 			GeoRedundantBackup: to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled),
// 		},
// 		FullyQualifiedDomainName: to.Ptr("mysqltestserver.database.mysql.azure.com"),
// 		HighAvailability: &armmysqlflexibleservers.HighAvailability{
// 			Mode: to.Ptr(armmysqlflexibleservers.HighAvailabilityModeZoneRedundant),
// 			StandbyAvailabilityZone: to.Ptr("3"),
// 			State: to.Ptr(armmysqlflexibleservers.HighAvailabilityStateHealthy),
// 		},
// 		MaintenanceWindow: &armmysqlflexibleservers.MaintenanceWindow{
// 			CustomWindow: to.Ptr("Disabled"),
// 			DayOfWeek: to.Ptr[int32](0),
// 			StartHour: to.Ptr[int32](0),
// 			StartMinute: to.Ptr[int32](0),
// 		},
// 		Network: &armmysqlflexibleservers.Network{
// 			PublicNetworkAccess: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled),
// 		},
// 		ReplicaCapacity: to.Ptr[int32](10),
// 		ReplicationRole: to.Ptr(armmysqlflexibleservers.ReplicationRoleNone),
// 		State: to.Ptr(armmysqlflexibleservers.ServerStateReady),
// 		Storage: &armmysqlflexibleservers.Storage{
// 			AutoGrow: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled),
// 			Iops: to.Ptr[int32](600),
// 			StorageSizeGB: to.Ptr[int32](100),
// 			StorageSKU: to.Ptr("Premium_LRS"),
// 		},
// 		Version: to.Ptr(armmysqlflexibleservers.ServerVersionFive7),
// 	},
// 	SKU: &armmysqlflexibleservers.SKU{
// 		Name: to.Ptr("Standard_D2ds_v4"),
// 		Tier: to.Ptr(armmysqlflexibleservers.SKUTierGeneralPurpose),
// 	},
// }
Output:

Example (CreateAReplicaServer)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServerCreateReplica.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewServersClient().BeginCreate(ctx, "testgr", "replica-server", armmysqlflexibleservers.Server{
	Location: to.Ptr("SoutheastAsia"),
	Properties: &armmysqlflexibleservers.ServerProperties{
		CreateMode:             to.Ptr(armmysqlflexibleservers.CreateModeReplica),
		SourceServerResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testgr/providers/Microsoft.DBforMySQL/flexibleServers/source-server"),
	},
}, 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.Server = armmysqlflexibleservers.Server{
// 	Name: to.Ptr("replica-server"),
// 	Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers"),
// 	ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testgr/providers/Microsoft.DBforMySQL/flexibleServers/replica-server"),
// 	Location: to.Ptr("Southeast Asia"),
// 	Tags: map[string]*string{
// 		"ElasticServer": to.Ptr("1"),
// 	},
// 	Properties: &armmysqlflexibleservers.ServerProperties{
// 		AdministratorLogin: to.Ptr("cloudsa"),
// 		AvailabilityZone: to.Ptr("3"),
// 		Backup: &armmysqlflexibleservers.Backup{
// 			BackupRetentionDays: to.Ptr[int32](7),
// 			EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-24T08:19:18.572Z"); return t}()),
// 			GeoRedundantBackup: to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled),
// 		},
// 		FullyQualifiedDomainName: to.Ptr("replica-server.database.mysql.azure.com"),
// 		HighAvailability: &armmysqlflexibleservers.HighAvailability{
// 			Mode: to.Ptr(armmysqlflexibleservers.HighAvailabilityModeDisabled),
// 			State: to.Ptr(armmysqlflexibleservers.HighAvailabilityStateNotEnabled),
// 		},
// 		MaintenanceWindow: &armmysqlflexibleservers.MaintenanceWindow{
// 			CustomWindow: to.Ptr("Disabled"),
// 			DayOfWeek: to.Ptr[int32](0),
// 			StartHour: to.Ptr[int32](0),
// 			StartMinute: to.Ptr[int32](0),
// 		},
// 		Network: &armmysqlflexibleservers.Network{
// 			PublicNetworkAccess: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled),
// 		},
// 		ReplicaCapacity: to.Ptr[int32](0),
// 		ReplicationRole: to.Ptr(armmysqlflexibleservers.ReplicationRoleReplica),
// 		SourceServerResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testgr/providers/Microsoft.DBforMySQL/flexibleServers/source-server"),
// 		State: to.Ptr(armmysqlflexibleservers.ServerStateReady),
// 		Storage: &armmysqlflexibleservers.Storage{
// 			AutoGrow: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled),
// 			Iops: to.Ptr[int32](360),
// 			StorageSizeGB: to.Ptr[int32](20),
// 			StorageSKU: to.Ptr("Premium_LRS"),
// 		},
// 		Version: to.Ptr(armmysqlflexibleservers.ServerVersionFive7),
// 	},
// 	SKU: &armmysqlflexibleservers.SKU{
// 		Name: to.Ptr("Standard_D2ds_v4"),
// 		Tier: to.Ptr(armmysqlflexibleservers.SKUTierGeneralPurpose),
// 	},
// }
Output:

Example (CreateAServerAsAPointInTimeRestore)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServerCreateWithPointInTimeRestore.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewServersClient().BeginCreate(ctx, "TargetResourceGroup", "targetserver", armmysqlflexibleservers.Server{
	Location: to.Ptr("SoutheastAsia"),
	Tags: map[string]*string{
		"num": to.Ptr("1"),
	},
	Properties: &armmysqlflexibleservers.ServerProperties{
		CreateMode:             to.Ptr(armmysqlflexibleservers.CreateModePointInTimeRestore),
		RestorePointInTime:     to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-24T00:00:37.467Z"); return t }()),
		SourceServerResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/SourceResourceGroup/providers/Microsoft.DBforMySQL/flexibleServers/sourceserver"),
	},
	SKU: &armmysqlflexibleservers.SKU{
		Name: to.Ptr("Standard_D14_v2"),
		Tier: to.Ptr(armmysqlflexibleservers.SKUTierGeneralPurpose),
	},
}, 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.Server = armmysqlflexibleservers.Server{
// 	Name: to.Ptr("targetserver"),
// 	Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers"),
// 	ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TargetResourceGroup/providers/Microsoft.DBforMySQL/flexibleServers/targetserver"),
// 	Location: to.Ptr("Southeast Asia"),
// 	Tags: map[string]*string{
// 		"num": to.Ptr("1"),
// 	},
// 	Properties: &armmysqlflexibleservers.ServerProperties{
// 		AdministratorLogin: to.Ptr("adminuser"),
// 		AvailabilityZone: to.Ptr("1"),
// 		Backup: &armmysqlflexibleservers.Backup{
// 			BackupRetentionDays: to.Ptr[int32](7),
// 			EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-24T00:15:24.000Z"); return t}()),
// 			GeoRedundantBackup: to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled),
// 		},
// 		FullyQualifiedDomainName: to.Ptr("targetserver.database.mysql.azure.com"),
// 		HighAvailability: &armmysqlflexibleservers.HighAvailability{
// 			Mode: to.Ptr(armmysqlflexibleservers.HighAvailabilityModeDisabled),
// 			State: to.Ptr(armmysqlflexibleservers.HighAvailabilityStateNotEnabled),
// 		},
// 		MaintenanceWindow: &armmysqlflexibleservers.MaintenanceWindow{
// 			CustomWindow: to.Ptr("Disabled"),
// 			DayOfWeek: to.Ptr[int32](0),
// 			StartHour: to.Ptr[int32](0),
// 			StartMinute: to.Ptr[int32](0),
// 		},
// 		Network: &armmysqlflexibleservers.Network{
// 			PublicNetworkAccess: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled),
// 		},
// 		ReplicaCapacity: to.Ptr[int32](10),
// 		ReplicationRole: to.Ptr(armmysqlflexibleservers.ReplicationRoleNone),
// 		State: to.Ptr(armmysqlflexibleservers.ServerStateReady),
// 		Storage: &armmysqlflexibleservers.Storage{
// 			AutoGrow: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled),
// 			Iops: to.Ptr[int32](360),
// 			StorageSizeGB: to.Ptr[int32](20),
// 			StorageSKU: to.Ptr("Premium_LRS"),
// 		},
// 		Version: to.Ptr(armmysqlflexibleservers.ServerVersionFive7),
// 	},
// 	SKU: &armmysqlflexibleservers.SKU{
// 		Name: to.Ptr("Standard_D2ds_v4"),
// 		Tier: to.Ptr(armmysqlflexibleservers.SKUTierGeneralPurpose),
// 	},
// }
Output:

Example (CreateAServerWithByok)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServerCreateWithBYOK.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewServersClient().BeginCreate(ctx, "testrg", "mysqltestserver", armmysqlflexibleservers.Server{
	Location: to.Ptr("southeastasia"),
	Tags: map[string]*string{
		"num": to.Ptr("1"),
	},
	Identity: &armmysqlflexibleservers.Identity{
		Type: to.Ptr(armmysqlflexibleservers.ManagedServiceIdentityTypeUserAssigned),
		UserAssignedIdentities: map[string]any{
			"/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-identity": map[string]any{},
		},
	},
	Properties: &armmysqlflexibleservers.ServerProperties{
		AdministratorLogin:         to.Ptr("cloudsa"),
		AdministratorLoginPassword: to.Ptr("your_password"),
		AvailabilityZone:           to.Ptr("1"),
		Backup: &armmysqlflexibleservers.Backup{
			BackupRetentionDays: to.Ptr[int32](7),
			GeoRedundantBackup:  to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled),
		},
		CreateMode: to.Ptr(armmysqlflexibleservers.CreateModeDefault),
		DataEncryption: &armmysqlflexibleservers.DataEncryption{
			Type:                            to.Ptr(armmysqlflexibleservers.DataEncryptionTypeAzureKeyVault),
			GeoBackupKeyURI:                 to.Ptr("https://test-geo.vault.azure.net/keys/key/c8a92236622244c0a4fdb892666f671a"),
			GeoBackupUserAssignedIdentityID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-geo-identity"),
			PrimaryKeyURI:                   to.Ptr("https://test.vault.azure.net/keys/key/c8a92236622244c0a4fdb892666f671a"),
			PrimaryUserAssignedIdentityID:   to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-identity"),
		},
		HighAvailability: &armmysqlflexibleservers.HighAvailability{
			Mode:                    to.Ptr(armmysqlflexibleservers.HighAvailabilityModeZoneRedundant),
			StandbyAvailabilityZone: to.Ptr("3"),
		},
		Storage: &armmysqlflexibleservers.Storage{
			AutoGrow:      to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled),
			Iops:          to.Ptr[int32](600),
			StorageSizeGB: to.Ptr[int32](100),
		},
		Version: to.Ptr(armmysqlflexibleservers.ServerVersionFive7),
	},
	SKU: &armmysqlflexibleservers.SKU{
		Name: to.Ptr("Standard_D2ds_v4"),
		Tier: to.Ptr(armmysqlflexibleservers.SKUTierGeneralPurpose),
	},
}, 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.Server = armmysqlflexibleservers.Server{
// 	Name: to.Ptr("mysqltestserver"),
// 	Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers"),
// 	ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver"),
// 	Location: to.Ptr("Southeast Asia"),
// 	Tags: map[string]*string{
// 		"num": to.Ptr("1"),
// 	},
// 	Properties: &armmysqlflexibleservers.ServerProperties{
// 		AdministratorLogin: to.Ptr("cloudsa"),
// 		AvailabilityZone: to.Ptr("1"),
// 		Backup: &armmysqlflexibleservers.Backup{
// 			BackupRetentionDays: to.Ptr[int32](7),
// 			EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-17T06:11:38.415Z"); return t}()),
// 			GeoRedundantBackup: to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled),
// 		},
// 		FullyQualifiedDomainName: to.Ptr("mysqltestserver.database.mysql.azure.com"),
// 		HighAvailability: &armmysqlflexibleservers.HighAvailability{
// 			Mode: to.Ptr(armmysqlflexibleservers.HighAvailabilityModeZoneRedundant),
// 			StandbyAvailabilityZone: to.Ptr("3"),
// 			State: to.Ptr(armmysqlflexibleservers.HighAvailabilityStateHealthy),
// 		},
// 		MaintenanceWindow: &armmysqlflexibleservers.MaintenanceWindow{
// 			CustomWindow: to.Ptr("Disabled"),
// 			DayOfWeek: to.Ptr[int32](0),
// 			StartHour: to.Ptr[int32](0),
// 			StartMinute: to.Ptr[int32](0),
// 		},
// 		Network: &armmysqlflexibleservers.Network{
// 			PublicNetworkAccess: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled),
// 		},
// 		ReplicaCapacity: to.Ptr[int32](10),
// 		ReplicationRole: to.Ptr(armmysqlflexibleservers.ReplicationRoleNone),
// 		State: to.Ptr(armmysqlflexibleservers.ServerStateReady),
// 		Storage: &armmysqlflexibleservers.Storage{
// 			AutoGrow: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled),
// 			Iops: to.Ptr[int32](600),
// 			StorageSizeGB: to.Ptr[int32](100),
// 			StorageSKU: to.Ptr("Premium_LRS"),
// 		},
// 		Version: to.Ptr(armmysqlflexibleservers.ServerVersionFive7),
// 	},
// 	SKU: &armmysqlflexibleservers.SKU{
// 		Name: to.Ptr("Standard_D2ds_v4"),
// 		Tier: to.Ptr(armmysqlflexibleservers.SKUTierGeneralPurpose),
// 	},
// }
Output:

func (*ServersClient) BeginDelete

func (client *ServersClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, options *ServersClientBeginDeleteOptions) (*runtime.Poller[ServersClientDeleteResponse], error)

BeginDelete - Deletes a server. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-09-30-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serverName - The name of the server.
  • options - ServersClientBeginDeleteOptions contains the optional parameters for the ServersClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServerDelete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewServersClient().BeginDelete(ctx, "TestGroup", "testserver", 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 (*ServersClient) BeginFailover

func (client *ServersClient) BeginFailover(ctx context.Context, resourceGroupName string, serverName string, options *ServersClientBeginFailoverOptions) (*runtime.Poller[ServersClientFailoverResponse], error)

BeginFailover - Manual failover a server. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-09-30-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serverName - The name of the server.
  • options - ServersClientBeginFailoverOptions contains the optional parameters for the ServersClient.BeginFailover method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServerFailover.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewServersClient().BeginFailover(ctx, "TestGroup", "testserver", 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 (*ServersClient) BeginResetGtid

func (client *ServersClient) BeginResetGtid(ctx context.Context, resourceGroupName string, serverName string, parameters ServerGtidSetParameter, options *ServersClientBeginResetGtidOptions) (*runtime.Poller[ServersClientResetGtidResponse], error)

BeginResetGtid - Resets GTID on a server. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-09-30-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serverName - The name of the server.
  • parameters - The required parameters for resetting GTID on a server.
  • options - ServersClientBeginResetGtidOptions contains the optional parameters for the ServersClient.BeginResetGtid method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServerResetGtid.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewServersClient().BeginResetGtid(ctx, "TestGroup", "testserver", armmysqlflexibleservers.ServerGtidSetParameter{
	GtidSet: to.Ptr("4aff5b51-97ba-11ed-a955-002248036acc:1-16"),
}, 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 (*ServersClient) BeginRestart

func (client *ServersClient) BeginRestart(ctx context.Context, resourceGroupName string, serverName string, parameters ServerRestartParameter, options *ServersClientBeginRestartOptions) (*runtime.Poller[ServersClientRestartResponse], error)

BeginRestart - Restarts a server. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-09-30-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serverName - The name of the server.
  • parameters - The required parameters for restarting a server.
  • options - ServersClientBeginRestartOptions contains the optional parameters for the ServersClient.BeginRestart method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServerRestart.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewServersClient().BeginRestart(ctx, "TestGroup", "testserver", armmysqlflexibleservers.ServerRestartParameter{
	MaxFailoverSeconds:  to.Ptr[int32](60),
	RestartWithFailover: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled),
}, 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 (*ServersClient) BeginStart

func (client *ServersClient) BeginStart(ctx context.Context, resourceGroupName string, serverName string, options *ServersClientBeginStartOptions) (*runtime.Poller[ServersClientStartResponse], error)

BeginStart - Starts a server. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-09-30-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serverName - The name of the server.
  • options - ServersClientBeginStartOptions contains the optional parameters for the ServersClient.BeginStart method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServerStart.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewServersClient().BeginStart(ctx, "TestGroup", "testserver", 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 (*ServersClient) BeginStop

func (client *ServersClient) BeginStop(ctx context.Context, resourceGroupName string, serverName string, options *ServersClientBeginStopOptions) (*runtime.Poller[ServersClientStopResponse], error)

BeginStop - Stops a server. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-09-30-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serverName - The name of the server.
  • options - ServersClientBeginStopOptions contains the optional parameters for the ServersClient.BeginStop method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServerStop.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewServersClient().BeginStop(ctx, "TestGroup", "testserver", 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 (*ServersClient) BeginUpdate

func (client *ServersClient) BeginUpdate(ctx context.Context, resourceGroupName string, serverName string, parameters ServerForUpdate, options *ServersClientBeginUpdateOptions) (*runtime.Poller[ServersClientUpdateResponse], error)

BeginUpdate - Updates an existing server. The request body can contain one to many of the properties present in the normal server definition. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-09-30-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serverName - The name of the server.
  • parameters - The required parameters for updating a server.
  • options - ServersClientBeginUpdateOptions contains the optional parameters for the ServersClient.BeginUpdate method.
Example (UpdateAServer)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServerUpdate.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewServersClient().BeginUpdate(ctx, "testrg", "mysqltestserver", armmysqlflexibleservers.ServerForUpdate{
	Properties: &armmysqlflexibleservers.ServerPropertiesForUpdate{
		Storage: &armmysqlflexibleservers.Storage{
			AutoGrow:      to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled),
			AutoIoScaling: to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled),
			Iops:          to.Ptr[int32](200),
			StorageSizeGB: to.Ptr[int32](30),
		},
	},
}, 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.Server = armmysqlflexibleservers.Server{
// 	Name: to.Ptr("mysqltestserver"),
// 	Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers"),
// 	ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver"),
// 	Location: to.Ptr("Southeast Asia"),
// 	Tags: map[string]*string{
// 		"num": to.Ptr("1"),
// 	},
// 	Properties: &armmysqlflexibleservers.ServerProperties{
// 		AdministratorLogin: to.Ptr("cloudsa"),
// 		AvailabilityZone: to.Ptr("3"),
// 		Backup: &armmysqlflexibleservers.Backup{
// 			BackupRetentionDays: to.Ptr[int32](7),
// 			EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-17T06:11:38.415Z"); return t}()),
// 			GeoRedundantBackup: to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled),
// 		},
// 		FullyQualifiedDomainName: to.Ptr("mysqltestserver.database.mysql.azure.com"),
// 		HighAvailability: &armmysqlflexibleservers.HighAvailability{
// 			Mode: to.Ptr(armmysqlflexibleservers.HighAvailabilityModeDisabled),
// 			State: to.Ptr(armmysqlflexibleservers.HighAvailabilityStateNotEnabled),
// 		},
// 		MaintenanceWindow: &armmysqlflexibleservers.MaintenanceWindow{
// 			CustomWindow: to.Ptr("Enabled"),
// 			DayOfWeek: to.Ptr[int32](1),
// 			StartHour: to.Ptr[int32](1),
// 			StartMinute: to.Ptr[int32](0),
// 		},
// 		Network: &armmysqlflexibleservers.Network{
// 			PublicNetworkAccess: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled),
// 		},
// 		ReplicaCapacity: to.Ptr[int32](10),
// 		ReplicationRole: to.Ptr(armmysqlflexibleservers.ReplicationRoleNone),
// 		State: to.Ptr(armmysqlflexibleservers.ServerStateReady),
// 		Storage: &armmysqlflexibleservers.Storage{
// 			AutoGrow: to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled),
// 			AutoIoScaling: to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled),
// 			Iops: to.Ptr[int32](200),
// 			StorageSizeGB: to.Ptr[int32](30),
// 			StorageSKU: to.Ptr("Premium_LRS"),
// 		},
// 		Version: to.Ptr(armmysqlflexibleservers.ServerVersionFive7),
// 	},
// 	SKU: &armmysqlflexibleservers.SKU{
// 		Name: to.Ptr("Standard_D2ds_v4"),
// 		Tier: to.Ptr(armmysqlflexibleservers.SKUTierGeneralPurpose),
// 	},
// }
Output:

Example (UpdateServerCustomerMaintenanceWindow)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServerUpdateWithCustomerMaintenanceWindow.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewServersClient().BeginUpdate(ctx, "testrg", "mysqltestserver", armmysqlflexibleservers.ServerForUpdate{
	Properties: &armmysqlflexibleservers.ServerPropertiesForUpdate{
		MaintenanceWindow: &armmysqlflexibleservers.MaintenanceWindow{
			CustomWindow: to.Ptr("Enabled"),
			DayOfWeek:    to.Ptr[int32](1),
			StartHour:    to.Ptr[int32](8),
			StartMinute:  to.Ptr[int32](0),
		},
	},
}, 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.Server = armmysqlflexibleservers.Server{
// 	Name: to.Ptr("mysqltestserver"),
// 	Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers"),
// 	ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver"),
// 	Location: to.Ptr("Southeast Asia"),
// 	Tags: map[string]*string{
// 		"num": to.Ptr("1"),
// 	},
// 	Properties: &armmysqlflexibleservers.ServerProperties{
// 		AdministratorLogin: to.Ptr("cloudsa"),
// 		AvailabilityZone: to.Ptr("3"),
// 		Backup: &armmysqlflexibleservers.Backup{
// 			BackupRetentionDays: to.Ptr[int32](7),
// 			EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-17T06:11:38.415Z"); return t}()),
// 			GeoRedundantBackup: to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled),
// 		},
// 		FullyQualifiedDomainName: to.Ptr("mysqltestserver.database.mysql.azure.com"),
// 		HighAvailability: &armmysqlflexibleservers.HighAvailability{
// 			Mode: to.Ptr(armmysqlflexibleservers.HighAvailabilityModeDisabled),
// 			State: to.Ptr(armmysqlflexibleservers.HighAvailabilityStateNotEnabled),
// 		},
// 		MaintenanceWindow: &armmysqlflexibleservers.MaintenanceWindow{
// 			CustomWindow: to.Ptr("Enabled"),
// 			DayOfWeek: to.Ptr[int32](1),
// 			StartHour: to.Ptr[int32](8),
// 			StartMinute: to.Ptr[int32](0),
// 		},
// 		Network: &armmysqlflexibleservers.Network{
// 			PublicNetworkAccess: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled),
// 		},
// 		ReplicaCapacity: to.Ptr[int32](10),
// 		ReplicationRole: to.Ptr(armmysqlflexibleservers.ReplicationRoleNone),
// 		State: to.Ptr(armmysqlflexibleservers.ServerStateReady),
// 		Storage: &armmysqlflexibleservers.Storage{
// 			AutoGrow: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled),
// 			Iops: to.Ptr[int32](600),
// 			StorageSizeGB: to.Ptr[int32](100),
// 			StorageSKU: to.Ptr("Premium_LRS"),
// 		},
// 		Version: to.Ptr(armmysqlflexibleservers.ServerVersionFive7),
// 	},
// 	SKU: &armmysqlflexibleservers.SKU{
// 		Name: to.Ptr("Standard_D2ds_v4"),
// 		Tier: to.Ptr(armmysqlflexibleservers.SKUTierGeneralPurpose),
// 	},
// }
Output:

Example (UpdateServerWithByok)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServerUpdateWithBYOK.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewServersClient().BeginUpdate(ctx, "testrg", "mysqltestserver", armmysqlflexibleservers.ServerForUpdate{
	Identity: &armmysqlflexibleservers.Identity{
		Type: to.Ptr(armmysqlflexibleservers.ManagedServiceIdentityTypeUserAssigned),
		UserAssignedIdentities: map[string]any{
			"/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-identity": map[string]any{},
		},
	},
	Properties: &armmysqlflexibleservers.ServerPropertiesForUpdate{
		DataEncryption: &armmysqlflexibleservers.DataEncryption{
			Type:                            to.Ptr(armmysqlflexibleservers.DataEncryptionTypeAzureKeyVault),
			GeoBackupKeyURI:                 to.Ptr("https://test-geo.vault.azure.net/keys/key/c8a92236622244c0a4fdb892666f671a"),
			GeoBackupUserAssignedIdentityID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-geo-identity"),
			PrimaryKeyURI:                   to.Ptr("https://test.vault.azure.net/keys/key/c8a92236622244c0a4fdb892666f671a"),
			PrimaryUserAssignedIdentityID:   to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-identity"),
		},
	},
}, 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.Server = armmysqlflexibleservers.Server{
// 	Name: to.Ptr("mysqltestserver"),
// 	Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers"),
// 	ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver"),
// 	Location: to.Ptr("Southeast Asia"),
// 	Tags: map[string]*string{
// 		"num": to.Ptr("1"),
// 	},
// 	Properties: &armmysqlflexibleservers.ServerProperties{
// 		AdministratorLogin: to.Ptr("cloudsa"),
// 		AvailabilityZone: to.Ptr("1"),
// 		Backup: &armmysqlflexibleservers.Backup{
// 			BackupRetentionDays: to.Ptr[int32](7),
// 			EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-17T06:11:38.415Z"); return t}()),
// 			GeoRedundantBackup: to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled),
// 		},
// 		FullyQualifiedDomainName: to.Ptr("mysqltestserver.database.mysql.azure.com"),
// 		HighAvailability: &armmysqlflexibleservers.HighAvailability{
// 			Mode: to.Ptr(armmysqlflexibleservers.HighAvailabilityModeZoneRedundant),
// 			StandbyAvailabilityZone: to.Ptr("3"),
// 			State: to.Ptr(armmysqlflexibleservers.HighAvailabilityStateHealthy),
// 		},
// 		MaintenanceWindow: &armmysqlflexibleservers.MaintenanceWindow{
// 			CustomWindow: to.Ptr("Disabled"),
// 			DayOfWeek: to.Ptr[int32](0),
// 			StartHour: to.Ptr[int32](0),
// 			StartMinute: to.Ptr[int32](0),
// 		},
// 		Network: &armmysqlflexibleservers.Network{
// 			PublicNetworkAccess: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled),
// 		},
// 		ReplicaCapacity: to.Ptr[int32](10),
// 		ReplicationRole: to.Ptr(armmysqlflexibleservers.ReplicationRoleNone),
// 		State: to.Ptr(armmysqlflexibleservers.ServerStateReady),
// 		Storage: &armmysqlflexibleservers.Storage{
// 			AutoGrow: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled),
// 			Iops: to.Ptr[int32](600),
// 			StorageSizeGB: to.Ptr[int32](100),
// 			StorageSKU: to.Ptr("Premium_LRS"),
// 		},
// 		Version: to.Ptr(armmysqlflexibleservers.ServerVersionFive7),
// 	},
// 	SKU: &armmysqlflexibleservers.SKU{
// 		Name: to.Ptr("Standard_D2ds_v4"),
// 		Tier: to.Ptr(armmysqlflexibleservers.SKUTierGeneralPurpose),
// 	},
// }
Output:

func (*ServersClient) Get

func (client *ServersClient) Get(ctx context.Context, resourceGroupName string, serverName string, options *ServersClientGetOptions) (ServersClientGetResponse, error)

Get - Gets information about a server. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-09-30-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serverName - The name of the server.
  • options - ServersClientGetOptions contains the optional parameters for the ServersClient.Get method.
Example (GetAServer)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServerGet.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewServersClient().Get(ctx, "testrg", "mysqltestserver", 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.Server = armmysqlflexibleservers.Server{
// 	Name: to.Ptr("mysqltestserver"),
// 	Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers"),
// 	ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver"),
// 	Location: to.Ptr("Southeast Asia"),
// 	Tags: map[string]*string{
// 		"num": to.Ptr("1"),
// 	},
// 	Properties: &armmysqlflexibleservers.ServerProperties{
// 		AdministratorLogin: to.Ptr("cloudsa"),
// 		AvailabilityZone: to.Ptr("3"),
// 		Backup: &armmysqlflexibleservers.Backup{
// 			BackupRetentionDays: to.Ptr[int32](7),
// 			EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-17T06:11:38.415Z"); return t}()),
// 			GeoRedundantBackup: to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled),
// 		},
// 		FullyQualifiedDomainName: to.Ptr("mysqltestserver.database.mysql.azure.com"),
// 		HighAvailability: &armmysqlflexibleservers.HighAvailability{
// 			Mode: to.Ptr(armmysqlflexibleservers.HighAvailabilityModeDisabled),
// 			State: to.Ptr(armmysqlflexibleservers.HighAvailabilityStateNotEnabled),
// 		},
// 		MaintenanceWindow: &armmysqlflexibleservers.MaintenanceWindow{
// 			CustomWindow: to.Ptr("Enabled"),
// 			DayOfWeek: to.Ptr[int32](1),
// 			StartHour: to.Ptr[int32](1),
// 			StartMinute: to.Ptr[int32](0),
// 		},
// 		Network: &armmysqlflexibleservers.Network{
// 			PublicNetworkAccess: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled),
// 		},
// 		ReplicaCapacity: to.Ptr[int32](10),
// 		ReplicationRole: to.Ptr(armmysqlflexibleservers.ReplicationRoleNone),
// 		State: to.Ptr(armmysqlflexibleservers.ServerStateReady),
// 		Storage: &armmysqlflexibleservers.Storage{
// 			AutoGrow: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled),
// 			AutoIoScaling: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled),
// 			Iops: to.Ptr[int32](600),
// 			StorageSizeGB: to.Ptr[int32](100),
// 			StorageSKU: to.Ptr("Premium_LRS"),
// 		},
// 		Version: to.Ptr(armmysqlflexibleservers.ServerVersionFive7),
// 	},
// 	SKU: &armmysqlflexibleservers.SKU{
// 		Name: to.Ptr("Standard_D2ds_v4"),
// 		Tier: to.Ptr(armmysqlflexibleservers.SKUTierGeneralPurpose),
// 	},
// }
Output:

Example (GetAServerWithVnet)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServerGetWithVnet.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewServersClient().Get(ctx, "testrg", "mysqltestserver", 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.Server = armmysqlflexibleservers.Server{
// 	Name: to.Ptr("mysqltestserver"),
// 	Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers"),
// 	ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver"),
// 	Location: to.Ptr("Southeast Asia"),
// 	Tags: map[string]*string{
// 		"num": to.Ptr("1"),
// 	},
// 	Properties: &armmysqlflexibleservers.ServerProperties{
// 		AdministratorLogin: to.Ptr("cloudsa"),
// 		AvailabilityZone: to.Ptr("3"),
// 		Backup: &armmysqlflexibleservers.Backup{
// 			BackupRetentionDays: to.Ptr[int32](7),
// 			EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-17T06:11:38.415Z"); return t}()),
// 			GeoRedundantBackup: to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled),
// 		},
// 		FullyQualifiedDomainName: to.Ptr("mysqltestserver.database.mysql.azure.com"),
// 		HighAvailability: &armmysqlflexibleservers.HighAvailability{
// 			Mode: to.Ptr(armmysqlflexibleservers.HighAvailabilityModeDisabled),
// 			State: to.Ptr(armmysqlflexibleservers.HighAvailabilityStateNotEnabled),
// 		},
// 		MaintenanceWindow: &armmysqlflexibleservers.MaintenanceWindow{
// 			CustomWindow: to.Ptr("Disabled"),
// 			DayOfWeek: to.Ptr[int32](0),
// 			StartHour: to.Ptr[int32](0),
// 			StartMinute: to.Ptr[int32](0),
// 		},
// 		Network: &armmysqlflexibleservers.Network{
// 			DelegatedSubnetResourceID: to.Ptr("/subscriptions/2941a09d-7bcf-42fe-91ca-1765f521c829/resourceGroups/OrcabrCI-Vnet-Resource-Group/providers/Microsoft.Network/virtualNetworks/OrcabrCI-Vnet/subnets/mysql-subnet"),
// 			PublicNetworkAccess: to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled),
// 		},
// 		ReplicaCapacity: to.Ptr[int32](10),
// 		ReplicationRole: to.Ptr(armmysqlflexibleservers.ReplicationRoleNone),
// 		State: to.Ptr(armmysqlflexibleservers.ServerStateReady),
// 		Storage: &armmysqlflexibleservers.Storage{
// 			AutoGrow: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled),
// 			Iops: to.Ptr[int32](600),
// 			StorageSizeGB: to.Ptr[int32](100),
// 			StorageSKU: to.Ptr("Premium_LRS"),
// 		},
// 		Version: to.Ptr(armmysqlflexibleservers.ServerVersionFive7),
// 	},
// 	SKU: &armmysqlflexibleservers.SKU{
// 		Name: to.Ptr("Standard_D2ds_v4"),
// 		Tier: to.Ptr(armmysqlflexibleservers.SKUTierGeneralPurpose),
// 	},
// }
Output:

func (*ServersClient) NewListByResourceGroupPager

func (client *ServersClient) NewListByResourceGroupPager(resourceGroupName string, options *ServersClientListByResourceGroupOptions) *runtime.Pager[ServersClientListByResourceGroupResponse]

NewListByResourceGroupPager - List all the servers in a given resource group.

Generated from API version 2022-09-30-preview

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

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServersListByResourceGroup.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewServersClient().NewListByResourceGroupPager("TestGroup", 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.ServerListResult = armmysqlflexibleservers.ServerListResult{
	// 	Value: []*armmysqlflexibleservers.Server{
	// 		{
	// 			Name: to.Ptr("mysqltestserver1"),
	// 			Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers"),
	// 			ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver1"),
	// 			Location: to.Ptr("Southeast Asia"),
	// 			Tags: map[string]*string{
	// 				"num": to.Ptr("1"),
	// 			},
	// 			Properties: &armmysqlflexibleservers.ServerProperties{
	// 				AdministratorLogin: to.Ptr("cloudsa"),
	// 				AvailabilityZone: to.Ptr("1"),
	// 				Backup: &armmysqlflexibleservers.Backup{
	// 					BackupRetentionDays: to.Ptr[int32](7),
	// 					EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-17T07:08:17.425Z"); return t}()),
	// 					GeoRedundantBackup: to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled),
	// 				},
	// 				FullyQualifiedDomainName: to.Ptr("mysqltestserver1.database.mysql.azure.com"),
	// 				HighAvailability: &armmysqlflexibleservers.HighAvailability{
	// 					Mode: to.Ptr(armmysqlflexibleservers.HighAvailabilityModeDisabled),
	// 					State: to.Ptr(armmysqlflexibleservers.HighAvailabilityStateNotEnabled),
	// 				},
	// 				MaintenanceWindow: &armmysqlflexibleservers.MaintenanceWindow{
	// 					CustomWindow: to.Ptr("Disabled"),
	// 					DayOfWeek: to.Ptr[int32](0),
	// 					StartHour: to.Ptr[int32](0),
	// 					StartMinute: to.Ptr[int32](0),
	// 				},
	// 				Network: &armmysqlflexibleservers.Network{
	// 					PublicNetworkAccess: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled),
	// 				},
	// 				ReplicaCapacity: to.Ptr[int32](10),
	// 				ReplicationRole: to.Ptr(armmysqlflexibleservers.ReplicationRoleNone),
	// 				State: to.Ptr(armmysqlflexibleservers.ServerStateReady),
	// 				Storage: &armmysqlflexibleservers.Storage{
	// 					AutoGrow: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled),
	// 					Iops: to.Ptr[int32](369),
	// 					StorageSizeGB: to.Ptr[int32](23),
	// 					StorageSKU: to.Ptr("Premium_LRS"),
	// 				},
	// 				Version: to.Ptr(armmysqlflexibleservers.ServerVersionFive7),
	// 			},
	// 			SKU: &armmysqlflexibleservers.SKU{
	// 				Name: to.Ptr("Standard_B1ms"),
	// 				Tier: to.Ptr(armmysqlflexibleservers.SKUTierBurstable),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("mysqltestserver2"),
	// 			Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers"),
	// 			ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver2"),
	// 			Location: to.Ptr("Southeast Asia"),
	// 			Tags: map[string]*string{
	// 				"num": to.Ptr("1"),
	// 			},
	// 			Properties: &armmysqlflexibleservers.ServerProperties{
	// 				AdministratorLogin: to.Ptr("cloudsa"),
	// 				AvailabilityZone: to.Ptr("2"),
	// 				Backup: &armmysqlflexibleservers.Backup{
	// 					BackupRetentionDays: to.Ptr[int32](7),
	// 					EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-17T07:08:17.425Z"); return t}()),
	// 					GeoRedundantBackup: to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled),
	// 				},
	// 				FullyQualifiedDomainName: to.Ptr("mysqltestserver2.mysql.database.azure.com"),
	// 				HighAvailability: &armmysqlflexibleservers.HighAvailability{
	// 					Mode: to.Ptr(armmysqlflexibleservers.HighAvailabilityModeDisabled),
	// 					State: to.Ptr(armmysqlflexibleservers.HighAvailabilityStateNotEnabled),
	// 				},
	// 				MaintenanceWindow: &armmysqlflexibleservers.MaintenanceWindow{
	// 					CustomWindow: to.Ptr("Disabled"),
	// 					DayOfWeek: to.Ptr[int32](0),
	// 					StartHour: to.Ptr[int32](0),
	// 					StartMinute: to.Ptr[int32](0),
	// 				},
	// 				Network: &armmysqlflexibleservers.Network{
	// 					PublicNetworkAccess: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled),
	// 				},
	// 				ReplicaCapacity: to.Ptr[int32](10),
	// 				ReplicationRole: to.Ptr(armmysqlflexibleservers.ReplicationRoleNone),
	// 				State: to.Ptr(armmysqlflexibleservers.ServerStateReady),
	// 				Storage: &armmysqlflexibleservers.Storage{
	// 					AutoGrow: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled),
	// 					Iops: to.Ptr[int32](369),
	// 					StorageSizeGB: to.Ptr[int32](23),
	// 					StorageSKU: to.Ptr("Premium_LRS"),
	// 				},
	// 				Version: to.Ptr(armmysqlflexibleservers.ServerVersionFive7),
	// 			},
	// 			SKU: &armmysqlflexibleservers.SKU{
	// 				Name: to.Ptr("Standard_B1ms"),
	// 				Tier: to.Ptr(armmysqlflexibleservers.SKUTierBurstable),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("mysqltestserver3"),
	// 			Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers"),
	// 			ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver3"),
	// 			Location: to.Ptr("Southeast Asia"),
	// 			Tags: map[string]*string{
	// 				"num": to.Ptr("1"),
	// 			},
	// 			Properties: &armmysqlflexibleservers.ServerProperties{
	// 				AdministratorLogin: to.Ptr("cloudsa"),
	// 				AvailabilityZone: to.Ptr("1"),
	// 				Backup: &armmysqlflexibleservers.Backup{
	// 					BackupRetentionDays: to.Ptr[int32](7),
	// 					EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-24T06:28:19.061Z"); return t}()),
	// 					GeoRedundantBackup: to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled),
	// 				},
	// 				FullyQualifiedDomainName: to.Ptr("mysqltestserver3.mysql.database.azure.com"),
	// 				HighAvailability: &armmysqlflexibleservers.HighAvailability{
	// 					Mode: to.Ptr(armmysqlflexibleservers.HighAvailabilityModeDisabled),
	// 					State: to.Ptr(armmysqlflexibleservers.HighAvailabilityStateNotEnabled),
	// 				},
	// 				MaintenanceWindow: &armmysqlflexibleservers.MaintenanceWindow{
	// 					CustomWindow: to.Ptr("Disabled"),
	// 					DayOfWeek: to.Ptr[int32](0),
	// 					StartHour: to.Ptr[int32](0),
	// 					StartMinute: to.Ptr[int32](0),
	// 				},
	// 				Network: &armmysqlflexibleservers.Network{
	// 					PublicNetworkAccess: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled),
	// 				},
	// 				ReplicaCapacity: to.Ptr[int32](10),
	// 				ReplicationRole: to.Ptr(armmysqlflexibleservers.ReplicationRoleNone),
	// 				State: to.Ptr(armmysqlflexibleservers.ServerStateReady),
	// 				Storage: &armmysqlflexibleservers.Storage{
	// 					AutoGrow: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled),
	// 					Iops: to.Ptr[int32](600),
	// 					StorageSizeGB: to.Ptr[int32](100),
	// 					StorageSKU: to.Ptr("Premium_LRS"),
	// 				},
	// 				Version: to.Ptr(armmysqlflexibleservers.ServerVersionFive7),
	// 			},
	// 			SKU: &armmysqlflexibleservers.SKU{
	// 				Name: to.Ptr("Standard_E2ds_v4"),
	// 				Tier: to.Ptr(armmysqlflexibleservers.SKUTierMemoryOptimized),
	// 			},
	// 	}},
	// }
}
Output:

func (*ServersClient) NewListPager

NewListPager - List all the servers in a given subscription.

Generated from API version 2022-09-30-preview

  • options - ServersClientListOptions contains the optional parameters for the ServersClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServersList.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewServersClient().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.ServerListResult = armmysqlflexibleservers.ServerListResult{
	// 	Value: []*armmysqlflexibleservers.Server{
	// 		{
	// 			Name: to.Ptr("mysqltestserver1"),
	// 			Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers"),
	// 			ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver1"),
	// 			Location: to.Ptr("Southeast Asia"),
	// 			Tags: map[string]*string{
	// 				"num": to.Ptr("1"),
	// 			},
	// 			Properties: &armmysqlflexibleservers.ServerProperties{
	// 				AdministratorLogin: to.Ptr("cloudsa"),
	// 				AvailabilityZone: to.Ptr("1"),
	// 				Backup: &armmysqlflexibleservers.Backup{
	// 					BackupRetentionDays: to.Ptr[int32](7),
	// 					EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-17T07:08:17.425Z"); return t}()),
	// 					GeoRedundantBackup: to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled),
	// 				},
	// 				FullyQualifiedDomainName: to.Ptr("mysqltestserver1.database.mysql.azure.com"),
	// 				HighAvailability: &armmysqlflexibleservers.HighAvailability{
	// 					Mode: to.Ptr(armmysqlflexibleservers.HighAvailabilityModeDisabled),
	// 					State: to.Ptr(armmysqlflexibleservers.HighAvailabilityStateNotEnabled),
	// 				},
	// 				MaintenanceWindow: &armmysqlflexibleservers.MaintenanceWindow{
	// 					CustomWindow: to.Ptr("Disabled"),
	// 					DayOfWeek: to.Ptr[int32](0),
	// 					StartHour: to.Ptr[int32](0),
	// 					StartMinute: to.Ptr[int32](0),
	// 				},
	// 				Network: &armmysqlflexibleservers.Network{
	// 					PublicNetworkAccess: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled),
	// 				},
	// 				ReplicaCapacity: to.Ptr[int32](10),
	// 				ReplicationRole: to.Ptr(armmysqlflexibleservers.ReplicationRoleNone),
	// 				State: to.Ptr(armmysqlflexibleservers.ServerStateReady),
	// 				Storage: &armmysqlflexibleservers.Storage{
	// 					AutoGrow: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled),
	// 					Iops: to.Ptr[int32](369),
	// 					StorageSizeGB: to.Ptr[int32](23),
	// 					StorageSKU: to.Ptr("Premium_LRS"),
	// 				},
	// 				Version: to.Ptr(armmysqlflexibleservers.ServerVersionFive7),
	// 			},
	// 			SKU: &armmysqlflexibleservers.SKU{
	// 				Name: to.Ptr("Standard_B1ms"),
	// 				Tier: to.Ptr(armmysqlflexibleservers.SKUTierBurstable),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("mysqltestserver2"),
	// 			Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers"),
	// 			ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup2/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver2"),
	// 			Location: to.Ptr("Southeast Asia"),
	// 			Tags: map[string]*string{
	// 				"num": to.Ptr("1"),
	// 			},
	// 			Properties: &armmysqlflexibleservers.ServerProperties{
	// 				AdministratorLogin: to.Ptr("cloudsa"),
	// 				AvailabilityZone: to.Ptr("2"),
	// 				Backup: &armmysqlflexibleservers.Backup{
	// 					BackupRetentionDays: to.Ptr[int32](7),
	// 					EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-17T07:08:17.425Z"); return t}()),
	// 					GeoRedundantBackup: to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled),
	// 				},
	// 				FullyQualifiedDomainName: to.Ptr("mysqltestserver2.mysql.database.azure.com"),
	// 				HighAvailability: &armmysqlflexibleservers.HighAvailability{
	// 					Mode: to.Ptr(armmysqlflexibleservers.HighAvailabilityModeDisabled),
	// 					State: to.Ptr(armmysqlflexibleservers.HighAvailabilityStateNotEnabled),
	// 				},
	// 				MaintenanceWindow: &armmysqlflexibleservers.MaintenanceWindow{
	// 					CustomWindow: to.Ptr("Disabled"),
	// 					DayOfWeek: to.Ptr[int32](0),
	// 					StartHour: to.Ptr[int32](0),
	// 					StartMinute: to.Ptr[int32](0),
	// 				},
	// 				Network: &armmysqlflexibleservers.Network{
	// 					PublicNetworkAccess: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled),
	// 				},
	// 				ReplicaCapacity: to.Ptr[int32](10),
	// 				ReplicationRole: to.Ptr(armmysqlflexibleservers.ReplicationRoleNone),
	// 				State: to.Ptr(armmysqlflexibleservers.ServerStateReady),
	// 				Storage: &armmysqlflexibleservers.Storage{
	// 					AutoGrow: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled),
	// 					Iops: to.Ptr[int32](369),
	// 					StorageSizeGB: to.Ptr[int32](23),
	// 					StorageSKU: to.Ptr("Premium_LRS"),
	// 				},
	// 				Version: to.Ptr(armmysqlflexibleservers.ServerVersionFive7),
	// 			},
	// 			SKU: &armmysqlflexibleservers.SKU{
	// 				Name: to.Ptr("Standard_B1ms"),
	// 				Tier: to.Ptr(armmysqlflexibleservers.SKUTierBurstable),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("mysqltestserver3"),
	// 			Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers"),
	// 			ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup3/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver3"),
	// 			Location: to.Ptr("Southeast Asia"),
	// 			Tags: map[string]*string{
	// 				"num": to.Ptr("1"),
	// 			},
	// 			Properties: &armmysqlflexibleservers.ServerProperties{
	// 				AdministratorLogin: to.Ptr("cloudsa"),
	// 				AvailabilityZone: to.Ptr("1"),
	// 				Backup: &armmysqlflexibleservers.Backup{
	// 					BackupRetentionDays: to.Ptr[int32](7),
	// 					EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-24T06:28:19.061Z"); return t}()),
	// 					GeoRedundantBackup: to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled),
	// 				},
	// 				FullyQualifiedDomainName: to.Ptr("mysqltestserver3.mysql.database.azure.com"),
	// 				HighAvailability: &armmysqlflexibleservers.HighAvailability{
	// 					Mode: to.Ptr(armmysqlflexibleservers.HighAvailabilityModeDisabled),
	// 					State: to.Ptr(armmysqlflexibleservers.HighAvailabilityStateNotEnabled),
	// 				},
	// 				MaintenanceWindow: &armmysqlflexibleservers.MaintenanceWindow{
	// 					CustomWindow: to.Ptr("Disabled"),
	// 					DayOfWeek: to.Ptr[int32](0),
	// 					StartHour: to.Ptr[int32](0),
	// 					StartMinute: to.Ptr[int32](0),
	// 				},
	// 				Network: &armmysqlflexibleservers.Network{
	// 					PublicNetworkAccess: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled),
	// 				},
	// 				ReplicaCapacity: to.Ptr[int32](10),
	// 				ReplicationRole: to.Ptr(armmysqlflexibleservers.ReplicationRoleNone),
	// 				State: to.Ptr(armmysqlflexibleservers.ServerStateReady),
	// 				Storage: &armmysqlflexibleservers.Storage{
	// 					AutoGrow: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled),
	// 					Iops: to.Ptr[int32](600),
	// 					StorageSizeGB: to.Ptr[int32](100),
	// 					StorageSKU: to.Ptr("Premium_LRS"),
	// 				},
	// 				Version: to.Ptr(armmysqlflexibleservers.ServerVersionFive7),
	// 			},
	// 			SKU: &armmysqlflexibleservers.SKU{
	// 				Name: to.Ptr("Standard_E2ds_v4"),
	// 				Tier: to.Ptr(armmysqlflexibleservers.SKUTierMemoryOptimized),
	// 			},
	// 	}},
	// }
}
Output:

type ServersClientBeginCreateOptions

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

ServersClientBeginCreateOptions contains the optional parameters for the ServersClient.BeginCreate method.

type ServersClientBeginDeleteOptions

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

ServersClientBeginDeleteOptions contains the optional parameters for the ServersClient.BeginDelete method.

type ServersClientBeginFailoverOptions

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

ServersClientBeginFailoverOptions contains the optional parameters for the ServersClient.BeginFailover method.

type ServersClientBeginResetGtidOptions

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

ServersClientBeginResetGtidOptions contains the optional parameters for the ServersClient.BeginResetGtid method.

type ServersClientBeginRestartOptions

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

ServersClientBeginRestartOptions contains the optional parameters for the ServersClient.BeginRestart method.

type ServersClientBeginStartOptions

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

ServersClientBeginStartOptions contains the optional parameters for the ServersClient.BeginStart method.

type ServersClientBeginStopOptions

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

ServersClientBeginStopOptions contains the optional parameters for the ServersClient.BeginStop method.

type ServersClientBeginUpdateOptions

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

ServersClientBeginUpdateOptions contains the optional parameters for the ServersClient.BeginUpdate method.

type ServersClientCreateResponse

type ServersClientCreateResponse struct {
	// Represents a server.
	Server
}

ServersClientCreateResponse contains the response from method ServersClient.BeginCreate.

type ServersClientDeleteResponse

type ServersClientDeleteResponse struct {
}

ServersClientDeleteResponse contains the response from method ServersClient.BeginDelete.

type ServersClientFailoverResponse

type ServersClientFailoverResponse struct {
}

ServersClientFailoverResponse contains the response from method ServersClient.BeginFailover.

type ServersClientGetOptions

type ServersClientGetOptions struct {
}

ServersClientGetOptions contains the optional parameters for the ServersClient.Get method.

type ServersClientGetResponse

type ServersClientGetResponse struct {
	// Represents a server.
	Server
}

ServersClientGetResponse contains the response from method ServersClient.Get.

type ServersClientListByResourceGroupOptions

type ServersClientListByResourceGroupOptions struct {
}

ServersClientListByResourceGroupOptions contains the optional parameters for the ServersClient.NewListByResourceGroupPager method.

type ServersClientListByResourceGroupResponse

type ServersClientListByResourceGroupResponse struct {
	// A list of servers.
	ServerListResult
}

ServersClientListByResourceGroupResponse contains the response from method ServersClient.NewListByResourceGroupPager.

type ServersClientListOptions

type ServersClientListOptions struct {
}

ServersClientListOptions contains the optional parameters for the ServersClient.NewListPager method.

type ServersClientListResponse

type ServersClientListResponse struct {
	// A list of servers.
	ServerListResult
}

ServersClientListResponse contains the response from method ServersClient.NewListPager.

type ServersClientResetGtidResponse

type ServersClientResetGtidResponse struct {
}

ServersClientResetGtidResponse contains the response from method ServersClient.BeginResetGtid.

type ServersClientRestartResponse

type ServersClientRestartResponse struct {
}

ServersClientRestartResponse contains the response from method ServersClient.BeginRestart.

type ServersClientStartResponse

type ServersClientStartResponse struct {
}

ServersClientStartResponse contains the response from method ServersClient.BeginStart.

type ServersClientStopResponse

type ServersClientStopResponse struct {
}

ServersClientStopResponse contains the response from method ServersClient.BeginStop.

type ServersClientUpdateResponse

type ServersClientUpdateResponse struct {
	// Represents a server.
	Server
}

ServersClientUpdateResponse contains the response from method ServersClient.BeginUpdate.

type Storage

type Storage struct {
	// Enable Storage Auto Grow or not.
	AutoGrow *EnableStatusEnum

	// Enable IO Auto Scaling or not.
	AutoIoScaling *EnableStatusEnum

	// Storage IOPS for a server.
	Iops *int32

	// Enable Log On Disk or not.
	LogOnDisk *EnableStatusEnum

	// Max storage size allowed for a server.
	StorageSizeGB *int32

	// READ-ONLY; The sku name of the server storage.
	StorageSKU *string
}

Storage Profile properties of a server

func (Storage) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Storage.

func (*Storage) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type Storage.

type StorageEditionCapability

type StorageEditionCapability struct {
	// READ-ONLY; Maximum backup retention days
	MaxBackupRetentionDays *int64

	// READ-ONLY; The maximum supported storage size.
	MaxStorageSize *int64

	// READ-ONLY; Minimal backup retention days
	MinBackupRetentionDays *int64

	// READ-ONLY; The minimal supported storage size.
	MinStorageSize *int64

	// READ-ONLY; storage edition name
	Name *string
}

StorageEditionCapability - storage edition capability

func (StorageEditionCapability) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type StorageEditionCapability.

func (*StorageEditionCapability) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type StorageEditionCapability.

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 TrackedResource

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

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

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

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

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

TrackedResource - The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'

func (TrackedResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type TrackedResource.

func (*TrackedResource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type TrackedResource.

type UserAssignedIdentity

type UserAssignedIdentity struct {
	// READ-ONLY; Client Id of user assigned identity
	ClientID *string

	// READ-ONLY; Principal Id of user assigned identity
	PrincipalID *string
}

UserAssignedIdentity - Metadata of user assigned identity.

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 ValidateBackupResponse

type ValidateBackupResponse struct {
	// The response properties of a pre backup operation.
	Properties *ValidateBackupResponseProperties
}

ValidateBackupResponse - Represents ValidateBackup API Response

func (ValidateBackupResponse) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ValidateBackupResponse.

func (*ValidateBackupResponse) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ValidateBackupResponse.

type ValidateBackupResponseProperties

type ValidateBackupResponseProperties struct {
	// Estimated no of storage containers required for resource data to be backed up.
	NumberOfContainers *int32
}

ValidateBackupResponseProperties - ValidateBackup Response Properties

func (ValidateBackupResponseProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ValidateBackupResponseProperties.

func (*ValidateBackupResponseProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ValidateBackupResponseProperties.

type VirtualNetworkSubnetUsageParameter

type VirtualNetworkSubnetUsageParameter struct {
	// Virtual network resource id.
	VirtualNetworkResourceID *string
}

VirtualNetworkSubnetUsageParameter - Virtual network subnet usage parameter

func (VirtualNetworkSubnetUsageParameter) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type VirtualNetworkSubnetUsageParameter.

func (*VirtualNetworkSubnetUsageParameter) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkSubnetUsageParameter.

type VirtualNetworkSubnetUsageResult

type VirtualNetworkSubnetUsageResult struct {
	// READ-ONLY; A list of delegated subnet usage
	DelegatedSubnetsUsage []*DelegatedSubnetUsage

	// READ-ONLY; The location name.
	Location *string

	// READ-ONLY; The subscription id.
	SubscriptionID *string
}

VirtualNetworkSubnetUsageResult - Virtual network subnet usage data.

func (VirtualNetworkSubnetUsageResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type VirtualNetworkSubnetUsageResult.

func (*VirtualNetworkSubnetUsageResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkSubnetUsageResult.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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