Documentation
¶
Index ¶
- type AdministratorListResult
- type AdministratorName
- type AdministratorProperties
- type AdministratorType
- type AdvancedThreatProtection
- type AdvancedThreatProtectionForUpdate
- type AdvancedThreatProtectionListResult
- type AdvancedThreatProtectionName
- type AdvancedThreatProtectionProperties
- type AdvancedThreatProtectionProvisioningState
- type AdvancedThreatProtectionSettingsClient
- func (client *AdvancedThreatProtectionSettingsClient) BeginUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[AdvancedThreatProtectionSettingsClientUpdateResponse], error)
- func (client *AdvancedThreatProtectionSettingsClient) BeginUpdatePut(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[AdvancedThreatProtectionSettingsClientUpdatePutResponse], ...)
- func (client *AdvancedThreatProtectionSettingsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (AdvancedThreatProtectionSettingsClientGetResponse, error)
- func (client *AdvancedThreatProtectionSettingsClient) NewListPager(resourceGroupName string, serverName string, ...) *runtime.Pager[AdvancedThreatProtectionSettingsClientListResponse]
- type AdvancedThreatProtectionSettingsClientBeginUpdateOptions
- type AdvancedThreatProtectionSettingsClientBeginUpdatePutOptions
- type AdvancedThreatProtectionSettingsClientGetOptions
- type AdvancedThreatProtectionSettingsClientGetResponse
- type AdvancedThreatProtectionSettingsClientListOptions
- type AdvancedThreatProtectionSettingsClientListResponse
- type AdvancedThreatProtectionSettingsClientUpdatePutResponse
- type AdvancedThreatProtectionSettingsClientUpdateResponse
- type AdvancedThreatProtectionState
- type AdvancedThreatProtectionUpdateProperties
- type AzureADAdministrator
- type AzureADAdministratorsClient
- func (client *AzureADAdministratorsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[AzureADAdministratorsClientCreateOrUpdateResponse], error)
- func (client *AzureADAdministratorsClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[AzureADAdministratorsClientDeleteResponse], error)
- func (client *AzureADAdministratorsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (AzureADAdministratorsClientGetResponse, error)
- func (client *AzureADAdministratorsClient) NewListByServerPager(resourceGroupName string, serverName string, ...) *runtime.Pager[AzureADAdministratorsClientListByServerResponse]
- type AzureADAdministratorsClientBeginCreateOrUpdateOptions
- type AzureADAdministratorsClientBeginDeleteOptions
- type AzureADAdministratorsClientCreateOrUpdateResponse
- type AzureADAdministratorsClientDeleteResponse
- type AzureADAdministratorsClientGetOptions
- type AzureADAdministratorsClientGetResponse
- type AzureADAdministratorsClientListByServerOptions
- type AzureADAdministratorsClientListByServerResponse
- type Backup
- type BackupAndExportClient
- func (client *BackupAndExportClient) BeginCreate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[BackupAndExportClientCreateResponse], error)
- func (client *BackupAndExportClient) ValidateBackup(ctx context.Context, resourceGroupName string, serverName string, ...) (BackupAndExportClientValidateBackupResponse, error)
- type BackupAndExportClientBeginCreateOptions
- type BackupAndExportClientCreateResponse
- type BackupAndExportClientValidateBackupOptions
- type BackupAndExportClientValidateBackupResponse
- type BackupAndExportRequest
- type BackupAndExportResponse
- type BackupAndExportResponseProperties
- type BackupAndExportResponseType
- type BackupFormat
- type BackupRequestBase
- type BackupSettings
- type BackupStoreDetails
- type BackupStoreDetailsClassification
- type BackupType
- type BackupsClient
- func (client *BackupsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (BackupsClientGetResponse, error)
- func (client *BackupsClient) NewListByServerPager(resourceGroupName string, serverName string, ...) *runtime.Pager[BackupsClientListByServerResponse]
- func (client *BackupsClient) Put(ctx context.Context, resourceGroupName string, serverName string, ...) (BackupsClientPutResponse, error)
- type BackupsClientGetOptions
- type BackupsClientGetResponse
- type BackupsClientListByServerOptions
- type BackupsClientListByServerResponse
- type BackupsClientPutOptions
- type BackupsClientPutResponse
- type CapabilitiesListResult
- type Capability
- type CapabilityProperties
- type CapabilityPropertiesV2
- type CapabilitySetsList
- type CheckNameAvailabilityClient
- type CheckNameAvailabilityClientExecuteOptions
- type CheckNameAvailabilityClientExecuteResponse
- type CheckNameAvailabilityWithoutLocationClient
- type CheckNameAvailabilityWithoutLocationClientExecuteOptions
- type CheckNameAvailabilityWithoutLocationClientExecuteResponse
- type CheckVirtualNetworkSubnetUsageClient
- type CheckVirtualNetworkSubnetUsageClientExecuteOptions
- type CheckVirtualNetworkSubnetUsageClientExecuteResponse
- type ClientFactory
- func (c *ClientFactory) NewAdvancedThreatProtectionSettingsClient() *AdvancedThreatProtectionSettingsClient
- func (c *ClientFactory) NewAzureADAdministratorsClient() *AzureADAdministratorsClient
- func (c *ClientFactory) NewBackupAndExportClient() *BackupAndExportClient
- func (c *ClientFactory) NewBackupsClient() *BackupsClient
- func (c *ClientFactory) NewCheckNameAvailabilityClient() *CheckNameAvailabilityClient
- func (c *ClientFactory) NewCheckNameAvailabilityWithoutLocationClient() *CheckNameAvailabilityWithoutLocationClient
- func (c *ClientFactory) NewCheckVirtualNetworkSubnetUsageClient() *CheckVirtualNetworkSubnetUsageClient
- func (c *ClientFactory) NewConfigurationsClient() *ConfigurationsClient
- func (c *ClientFactory) NewDatabasesClient() *DatabasesClient
- func (c *ClientFactory) NewFirewallRulesClient() *FirewallRulesClient
- func (c *ClientFactory) NewGetPrivateDNSZoneSuffixClient() *GetPrivateDNSZoneSuffixClient
- func (c *ClientFactory) NewLocationBasedCapabilitiesClient() *LocationBasedCapabilitiesClient
- func (c *ClientFactory) NewLocationBasedCapabilitySetClient() *LocationBasedCapabilitySetClient
- func (c *ClientFactory) NewLogFilesClient() *LogFilesClient
- func (c *ClientFactory) NewLongRunningBackupClient() *LongRunningBackupClient
- func (c *ClientFactory) NewLongRunningBackupsClient() *LongRunningBackupsClient
- func (c *ClientFactory) NewMaintenancesClient() *MaintenancesClient
- func (c *ClientFactory) NewOperationProgressClient() *OperationProgressClient
- func (c *ClientFactory) NewOperationResultsClient() *OperationResultsClient
- func (c *ClientFactory) NewOperationsClient() *OperationsClient
- func (c *ClientFactory) NewReplicasClient() *ReplicasClient
- func (c *ClientFactory) NewServersClient() *ServersClient
- func (c *ClientFactory) NewServersMigrationClient() *ServersMigrationClient
- type Configuration
- type ConfigurationForBatchUpdate
- type ConfigurationForBatchUpdateProperties
- type ConfigurationListForBatchUpdate
- type ConfigurationListResult
- type ConfigurationProperties
- type ConfigurationSource
- type ConfigurationsClient
- func (client *ConfigurationsClient) BeginBatchUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[ConfigurationsClientBatchUpdateResponse], error)
- func (client *ConfigurationsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[ConfigurationsClientCreateOrUpdateResponse], error)
- func (client *ConfigurationsClient) BeginUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[ConfigurationsClientUpdateResponse], error)
- func (client *ConfigurationsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (ConfigurationsClientGetResponse, error)
- func (client *ConfigurationsClient) NewListByServerPager(resourceGroupName string, serverName string, ...) *runtime.Pager[ConfigurationsClientListByServerResponse]
- type ConfigurationsClientBatchUpdateResponse
- type ConfigurationsClientBeginBatchUpdateOptions
- type ConfigurationsClientBeginCreateOrUpdateOptions
- type ConfigurationsClientBeginUpdateOptions
- type ConfigurationsClientCreateOrUpdateResponse
- type ConfigurationsClientGetOptions
- type ConfigurationsClientGetResponse
- type ConfigurationsClientListByServerOptions
- type ConfigurationsClientListByServerResponse
- type ConfigurationsClientUpdateResponse
- type CreateMode
- type CreatedByType
- type DataEncryption
- type DataEncryptionType
- type Database
- type DatabaseListResult
- type DatabaseProperties
- type DatabasesClient
- func (client *DatabasesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[DatabasesClientCreateOrUpdateResponse], error)
- func (client *DatabasesClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[DatabasesClientDeleteResponse], error)
- func (client *DatabasesClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (DatabasesClientGetResponse, error)
- func (client *DatabasesClient) NewListByServerPager(resourceGroupName string, serverName string, ...) *runtime.Pager[DatabasesClientListByServerResponse]
- type DatabasesClientBeginCreateOrUpdateOptions
- type DatabasesClientBeginDeleteOptions
- type DatabasesClientCreateOrUpdateResponse
- type DatabasesClientDeleteResponse
- type DatabasesClientGetOptions
- type DatabasesClientGetResponse
- type DatabasesClientListByServerOptions
- type DatabasesClientListByServerResponse
- type DelegatedSubnetUsage
- type EnableStatusEnum
- type ErrorAdditionalInfo
- type ErrorDetail
- type ErrorResponse
- type FirewallRule
- type FirewallRuleListResult
- type FirewallRuleProperties
- type FirewallRulesClient
- func (client *FirewallRulesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[FirewallRulesClientCreateOrUpdateResponse], error)
- func (client *FirewallRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[FirewallRulesClientDeleteResponse], error)
- func (client *FirewallRulesClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (FirewallRulesClientGetResponse, error)
- func (client *FirewallRulesClient) NewListByServerPager(resourceGroupName string, serverName string, ...) *runtime.Pager[FirewallRulesClientListByServerResponse]
- type FirewallRulesClientBeginCreateOrUpdateOptions
- type FirewallRulesClientBeginDeleteOptions
- type FirewallRulesClientCreateOrUpdateResponse
- type FirewallRulesClientDeleteResponse
- type FirewallRulesClientGetOptions
- type FirewallRulesClientGetResponse
- type FirewallRulesClientListByServerOptions
- type FirewallRulesClientListByServerResponse
- type FullBackupStoreDetails
- type GetPrivateDNSZoneSuffixClient
- type GetPrivateDNSZoneSuffixClientExecuteOptions
- type GetPrivateDNSZoneSuffixClientExecuteResponse
- type GetPrivateDNSZoneSuffixResponse
- type HighAvailability
- type HighAvailabilityMode
- type HighAvailabilityState
- type HighAvailabilityValidationEstimation
- type ImportFromStorageResponseType
- type ImportSourceProperties
- type ImportSourceStorageType
- type IsConfigPendingRestart
- type IsDynamicConfig
- type IsReadOnly
- type LocationBasedCapabilitiesClient
- type LocationBasedCapabilitiesClientListOptions
- type LocationBasedCapabilitiesClientListResponse
- type LocationBasedCapabilitySetClient
- func (client *LocationBasedCapabilitySetClient) Get(ctx context.Context, locationName string, capabilitySetName string, ...) (LocationBasedCapabilitySetClientGetResponse, error)
- func (client *LocationBasedCapabilitySetClient) NewListPager(locationName string, options *LocationBasedCapabilitySetClientListOptions) *runtime.Pager[LocationBasedCapabilitySetClientListResponse]
- type LocationBasedCapabilitySetClientGetOptions
- type LocationBasedCapabilitySetClientGetResponse
- type LocationBasedCapabilitySetClientListOptions
- type LocationBasedCapabilitySetClientListResponse
- type LogFile
- type LogFileListResult
- type LogFileProperties
- type LogFilesClient
- type LogFilesClientListByServerOptions
- type LogFilesClientListByServerResponse
- type LongRunningBackupClient
- type LongRunningBackupClientBeginCreateOptions
- type LongRunningBackupClientCreateResponse
- type LongRunningBackupsClient
- func (client *LongRunningBackupsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (LongRunningBackupsClientGetResponse, error)
- func (client *LongRunningBackupsClient) NewListPager(resourceGroupName string, serverName string, ...) *runtime.Pager[LongRunningBackupsClientListResponse]
- type LongRunningBackupsClientGetOptions
- type LongRunningBackupsClientGetResponse
- type LongRunningBackupsClientListOptions
- type LongRunningBackupsClientListResponse
- type Maintenance
- type MaintenanceListResult
- type MaintenanceProperties
- type MaintenancePropertiesForUpdate
- type MaintenanceProvisioningState
- type MaintenanceState
- type MaintenanceType
- type MaintenanceUpdate
- type MaintenanceWindow
- type MaintenancesClient
- func (client *MaintenancesClient) BeginUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[MaintenancesClientUpdateResponse], error)
- func (client *MaintenancesClient) NewListPager(resourceGroupName string, serverName string, ...) *runtime.Pager[MaintenancesClientListResponse]
- func (client *MaintenancesClient) Read(ctx context.Context, resourceGroupName string, serverName string, ...) (MaintenancesClientReadResponse, error)
- type MaintenancesClientBeginUpdateOptions
- type MaintenancesClientListOptions
- type MaintenancesClientListResponse
- type MaintenancesClientReadOptions
- type MaintenancesClientReadResponse
- type MaintenancesClientUpdateResponse
- type ManagedServiceIdentityType
- type MySQLServerIdentity
- type MySQLServerSKU
- type NameAvailability
- type NameAvailabilityRequest
- type Network
- type ObjectType
- type Operation
- type OperationDisplay
- type OperationListResult
- type OperationProgressClient
- type OperationProgressClientGetOptions
- type OperationProgressClientGetResponse
- type OperationProgressResponseType
- type OperationProgressResponseTypeClassification
- type OperationProgressResult
- type OperationResultsClient
- type OperationResultsClientGetOptions
- type OperationResultsClientGetResponse
- type OperationStatus
- type OperationStatusExtendedResult
- type OperationStatusResult
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type PrivateEndpoint
- type PrivateEndpointConnection
- type PrivateEndpointConnectionProperties
- type PrivateEndpointConnectionProvisioningState
- type PrivateEndpointServiceConnectionStatus
- type PrivateLinkServiceConnectionState
- type Provisioning
- type ProvisioningState
- type ProvisioningStateProperties
- type ProxyResource
- type ReplicasClient
- type ReplicasClientListByServerOptions
- type ReplicasClientListByServerResponse
- type ReplicationRole
- type ResetAllToDefault
- type Resource
- type SKUCapability
- type SKUCapabilityV2
- type Server
- type ServerBackup
- type ServerBackupListResult
- type ServerBackupProperties
- type ServerBackupPropertiesV2
- type ServerBackupV2
- type ServerBackupV2ListResult
- type ServerEditionCapability
- type ServerEditionCapabilityV2
- type ServerForUpdate
- type ServerGtidSetParameter
- type ServerListResult
- type ServerProperties
- type ServerPropertiesForUpdate
- type ServerRestartParameter
- type ServerSKUTier
- type ServerState
- type ServerVersion
- type ServerVersionCapability
- type ServerVersionCapabilityV2
- type ServersClient
- func (client *ServersClient) BeginCreate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[ServersClientCreateResponse], error)
- func (client *ServersClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[ServersClientDeleteResponse], error)
- func (client *ServersClient) BeginFailover(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[ServersClientFailoverResponse], error)
- func (client *ServersClient) BeginResetGtid(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[ServersClientResetGtidResponse], error)
- func (client *ServersClient) BeginRestart(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[ServersClientRestartResponse], error)
- func (client *ServersClient) BeginStart(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[ServersClientStartResponse], error)
- func (client *ServersClient) BeginStop(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[ServersClientStopResponse], error)
- func (client *ServersClient) BeginUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[ServersClientUpdateResponse], error)
- func (client *ServersClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (ServersClientGetResponse, error)
- func (client *ServersClient) NewListByResourceGroupPager(resourceGroupName string, options *ServersClientListByResourceGroupOptions) *runtime.Pager[ServersClientListByResourceGroupResponse]
- func (client *ServersClient) NewListPager(options *ServersClientListOptions) *runtime.Pager[ServersClientListResponse]
- func (client *ServersClient) ValidateEstimateHighAvailability(ctx context.Context, resourceGroupName string, serverName string, ...) (ServersClientValidateEstimateHighAvailabilityResponse, error)
- type ServersClientBeginCreateOptions
- type ServersClientBeginDeleteOptions
- type ServersClientBeginFailoverOptions
- type ServersClientBeginResetGtidOptions
- type ServersClientBeginRestartOptions
- type ServersClientBeginStartOptions
- type ServersClientBeginStopOptions
- type ServersClientBeginUpdateOptions
- type ServersClientCreateResponse
- type ServersClientDeleteResponse
- type ServersClientFailoverResponse
- type ServersClientGetOptions
- type ServersClientGetResponse
- type ServersClientListByResourceGroupOptions
- type ServersClientListByResourceGroupResponse
- type ServersClientListOptions
- type ServersClientListResponse
- type ServersClientResetGtidResponse
- type ServersClientRestartResponse
- type ServersClientStartResponse
- type ServersClientStopResponse
- type ServersClientUpdateResponse
- type ServersClientValidateEstimateHighAvailabilityOptions
- type ServersClientValidateEstimateHighAvailabilityResponse
- type ServersMigrationClient
- type ServersMigrationClientBeginCutoverMigrationOptions
- type ServersMigrationClientCutoverMigrationResponse
- type Storage
- type StorageEditionCapability
- type SystemData
- type TrackedResource
- type UserAssignedIdentity
- type ValidateBackupResponse
- type ValidateBackupResponseProperties
- type VirtualNetworkSubnetUsageParameter
- type VirtualNetworkSubnetUsageResult
Examples ¶
- AdvancedThreatProtectionSettingsClient.BeginUpdate (DisableAServersAdvancedThreatProtectionSettingsWithAllParameters)
- AdvancedThreatProtectionSettingsClient.BeginUpdate (EnableAServersAdvancedThreatProtectionSettings)
- AdvancedThreatProtectionSettingsClient.BeginUpdatePut (DisableAServersAdvancedThreatProtectionSettingsWithAllParametersUsingPut)
- AdvancedThreatProtectionSettingsClient.BeginUpdatePut (EnableAServersAdvancedThreatProtectionSettingsUsingPut)
- AdvancedThreatProtectionSettingsClient.Get
- AdvancedThreatProtectionSettingsClient.NewListPager
- AzureADAdministratorsClient.BeginCreateOrUpdate
- AzureADAdministratorsClient.BeginDelete
- AzureADAdministratorsClient.Get
- AzureADAdministratorsClient.NewListByServerPager
- BackupAndExportClient.BeginCreate
- BackupAndExportClient.ValidateBackup
- BackupsClient.Get
- BackupsClient.NewListByServerPager
- BackupsClient.Put
- CheckNameAvailabilityClient.Execute
- CheckNameAvailabilityWithoutLocationClient.Execute
- CheckVirtualNetworkSubnetUsageClient.Execute
- ConfigurationsClient.BeginBatchUpdate
- ConfigurationsClient.BeginCreateOrUpdate
- ConfigurationsClient.BeginUpdate
- ConfigurationsClient.Get
- ConfigurationsClient.NewListByServerPager
- DatabasesClient.BeginCreateOrUpdate
- DatabasesClient.BeginDelete
- DatabasesClient.Get
- DatabasesClient.NewListByServerPager
- FirewallRulesClient.BeginCreateOrUpdate
- FirewallRulesClient.BeginDelete
- FirewallRulesClient.Get
- FirewallRulesClient.NewListByServerPager
- GetPrivateDNSZoneSuffixClient.Execute
- LocationBasedCapabilitiesClient.NewListPager
- LocationBasedCapabilitySetClient.Get
- LocationBasedCapabilitySetClient.NewListPager
- LogFilesClient.NewListByServerPager
- LongRunningBackupClient.BeginCreate
- LongRunningBackupsClient.Get
- LongRunningBackupsClient.NewListPager
- MaintenancesClient.BeginUpdate
- MaintenancesClient.NewListPager
- MaintenancesClient.Read
- OperationProgressClient.Get (OperationProgressGetBackupAndExport)
- OperationProgressClient.Get (OperationProgressGetImportFromStorage)
- OperationResultsClient.Get
- OperationsClient.NewListPager
- ReplicasClient.NewListByServerPager
- ServersClient.BeginCreate (CreateANewServer)
- ServersClient.BeginCreate (CreateAReplicaServer)
- ServersClient.BeginCreate (CreateAServerAsAPointInTimeRestore)
- ServersClient.BeginCreate (CreateAServerWithByok)
- ServersClient.BeginDelete
- ServersClient.BeginFailover
- ServersClient.BeginResetGtid
- ServersClient.BeginRestart
- ServersClient.BeginStart
- ServersClient.BeginStop
- ServersClient.BeginUpdate (UpdateAServer)
- ServersClient.BeginUpdate (UpdateServerCustomerMaintenanceWindow)
- ServersClient.BeginUpdate (UpdateServerWithByok)
- ServersClient.Get (GetAServer)
- ServersClient.Get (GetAServerWithVnet)
- ServersClient.NewListByResourceGroupPager
- ServersClient.NewListPager
- ServersClient.ValidateEstimateHighAvailability
- ServersMigrationClient.BeginCutoverMigration
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 AdvancedThreatProtection ¶
type AdvancedThreatProtection struct { // Resource properties. Properties *AdvancedThreatProtectionProperties // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
AdvancedThreatProtection - A server's Advanced Threat Protection.
func (AdvancedThreatProtection) MarshalJSON ¶
func (a AdvancedThreatProtection) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AdvancedThreatProtection.
func (*AdvancedThreatProtection) UnmarshalJSON ¶
func (a *AdvancedThreatProtection) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AdvancedThreatProtection.
type AdvancedThreatProtectionForUpdate ¶
type AdvancedThreatProtectionForUpdate struct { // Resource update properties. Properties *AdvancedThreatProtectionUpdateProperties }
AdvancedThreatProtectionForUpdate - Parameters allowed to update advanced threat protection for a server.
func (AdvancedThreatProtectionForUpdate) MarshalJSON ¶
func (a AdvancedThreatProtectionForUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AdvancedThreatProtectionForUpdate.
func (*AdvancedThreatProtectionForUpdate) UnmarshalJSON ¶
func (a *AdvancedThreatProtectionForUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AdvancedThreatProtectionForUpdate.
type AdvancedThreatProtectionListResult ¶
type AdvancedThreatProtectionListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*AdvancedThreatProtection }
AdvancedThreatProtectionListResult - A list of the server's Advanced Threat Protection configurations.
func (AdvancedThreatProtectionListResult) MarshalJSON ¶
func (a AdvancedThreatProtectionListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AdvancedThreatProtectionListResult.
func (*AdvancedThreatProtectionListResult) UnmarshalJSON ¶
func (a *AdvancedThreatProtectionListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AdvancedThreatProtectionListResult.
type AdvancedThreatProtectionName ¶
type AdvancedThreatProtectionName string
const (
AdvancedThreatProtectionNameDefault AdvancedThreatProtectionName = "Default"
)
func PossibleAdvancedThreatProtectionNameValues ¶
func PossibleAdvancedThreatProtectionNameValues() []AdvancedThreatProtectionName
PossibleAdvancedThreatProtectionNameValues returns the possible values for the AdvancedThreatProtectionName const type.
type AdvancedThreatProtectionProperties ¶
type AdvancedThreatProtectionProperties struct { // Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled or a state has not been applied // yet on the specific database or server. State *AdvancedThreatProtectionState // READ-ONLY; Specifies the UTC creation time of the policy. CreationTime *time.Time // READ-ONLY; Provisioning state of the Threat Protection. ProvisioningState *AdvancedThreatProtectionProvisioningState }
AdvancedThreatProtectionProperties - Properties of an Advanced Threat Protection setting.
func (AdvancedThreatProtectionProperties) MarshalJSON ¶
func (a AdvancedThreatProtectionProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AdvancedThreatProtectionProperties.
func (*AdvancedThreatProtectionProperties) UnmarshalJSON ¶
func (a *AdvancedThreatProtectionProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AdvancedThreatProtectionProperties.
type AdvancedThreatProtectionProvisioningState ¶
type AdvancedThreatProtectionProvisioningState string
AdvancedThreatProtectionProvisioningState - The current provisioning state.
const ( AdvancedThreatProtectionProvisioningStateCanceled AdvancedThreatProtectionProvisioningState = "Canceled" AdvancedThreatProtectionProvisioningStateFailed AdvancedThreatProtectionProvisioningState = "Failed" AdvancedThreatProtectionProvisioningStateSucceeded AdvancedThreatProtectionProvisioningState = "Succeeded" AdvancedThreatProtectionProvisioningStateUpdating AdvancedThreatProtectionProvisioningState = "Updating" )
func PossibleAdvancedThreatProtectionProvisioningStateValues ¶
func PossibleAdvancedThreatProtectionProvisioningStateValues() []AdvancedThreatProtectionProvisioningState
PossibleAdvancedThreatProtectionProvisioningStateValues returns the possible values for the AdvancedThreatProtectionProvisioningState const type.
type AdvancedThreatProtectionSettingsClient ¶
type AdvancedThreatProtectionSettingsClient struct {
// contains filtered or unexported fields
}
AdvancedThreatProtectionSettingsClient contains the methods for the AdvancedThreatProtectionSettings group. Don't use this type directly, use NewAdvancedThreatProtectionSettingsClient() instead.
func NewAdvancedThreatProtectionSettingsClient ¶
func NewAdvancedThreatProtectionSettingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AdvancedThreatProtectionSettingsClient, error)
NewAdvancedThreatProtectionSettingsClient creates a new instance of AdvancedThreatProtectionSettingsClient with the specified values.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*AdvancedThreatProtectionSettingsClient) BeginUpdate ¶
func (client *AdvancedThreatProtectionSettingsClient) BeginUpdate(ctx context.Context, resourceGroupName string, serverName string, advancedThreatProtectionName AdvancedThreatProtectionName, parameters AdvancedThreatProtectionForUpdate, options *AdvancedThreatProtectionSettingsClientBeginUpdateOptions) (*runtime.Poller[AdvancedThreatProtectionSettingsClientUpdateResponse], error)
BeginUpdate - Updates a server's Advanced Threat Protection state. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-12-30
- resourceGroupName - The name of the resource group. The name is case insensitive.
- serverName - The name of the server.
- advancedThreatProtectionName - The name of the Advanced Threat Protection state.
- parameters - The server's Advanced Threat Protection body to update.
- options - AdvancedThreatProtectionSettingsClientBeginUpdateOptions contains the optional parameters for the AdvancedThreatProtectionSettingsClient.BeginUpdate method.
Example (DisableAServersAdvancedThreatProtectionSettingsWithAllParameters) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/AdvancedThreatProtectionSettingsPatchDisabled.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.NewAdvancedThreatProtectionSettingsClient().BeginUpdate(ctx, "threatprotection-4799", "threatprotection-6440", armmysqlflexibleservers.AdvancedThreatProtectionNameDefault, armmysqlflexibleservers.AdvancedThreatProtectionForUpdate{ Properties: &armmysqlflexibleservers.AdvancedThreatProtectionUpdateProperties{ State: to.Ptr(armmysqlflexibleservers.AdvancedThreatProtectionStateDisabled), }, }, 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.AdvancedThreatProtection = armmysqlflexibleservers.AdvancedThreatProtection{ // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers/advancedThreatProtectionSettings"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/threatprotection-4799/providers/Microsoft.DBforMySQL/flexibleServers/threatprotection-6440/advancedThreatProtectionSettings/Default"), // SystemData: &armmysqlflexibleservers.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-03T04:41:33.937Z"); return t}()), // CreatedBy: to.Ptr("string"), // CreatedByType: to.Ptr(armmysqlflexibleservers.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-03T04:41:33.937Z"); return t}()), // LastModifiedBy: to.Ptr("string"), // LastModifiedByType: to.Ptr(armmysqlflexibleservers.CreatedByTypeUser), // }, // Properties: &armmysqlflexibleservers.AdvancedThreatProtectionProperties{ // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-03T04:41:33.937Z"); return t}()), // ProvisioningState: to.Ptr(armmysqlflexibleservers.AdvancedThreatProtectionProvisioningStateSucceeded), // State: to.Ptr(armmysqlflexibleservers.AdvancedThreatProtectionStateDisabled), // }, // }
Output:
Example (EnableAServersAdvancedThreatProtectionSettings) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/AdvancedThreatProtectionSettingsPatchEnabled.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.NewAdvancedThreatProtectionSettingsClient().BeginUpdate(ctx, "threatprotection-4799", "threatprotection-6440", armmysqlflexibleservers.AdvancedThreatProtectionNameDefault, armmysqlflexibleservers.AdvancedThreatProtectionForUpdate{ Properties: &armmysqlflexibleservers.AdvancedThreatProtectionUpdateProperties{ State: to.Ptr(armmysqlflexibleservers.AdvancedThreatProtectionStateEnabled), }, }, 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.AdvancedThreatProtection = armmysqlflexibleservers.AdvancedThreatProtection{ // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers/advancedThreatProtectionSettings"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/threatprotection-4799/providers/Microsoft.DBforMySQL/flexibleServers/threatprotection-6440/advancedThreatProtectionSettings/Default"), // SystemData: &armmysqlflexibleservers.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-03T04:41:33.937Z"); return t}()), // CreatedBy: to.Ptr("string"), // CreatedByType: to.Ptr(armmysqlflexibleservers.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-03T04:41:33.937Z"); return t}()), // LastModifiedBy: to.Ptr("string"), // LastModifiedByType: to.Ptr(armmysqlflexibleservers.CreatedByTypeUser), // }, // Properties: &armmysqlflexibleservers.AdvancedThreatProtectionProperties{ // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-03T04:41:33.937Z"); return t}()), // ProvisioningState: to.Ptr(armmysqlflexibleservers.AdvancedThreatProtectionProvisioningStateSucceeded), // State: to.Ptr(armmysqlflexibleservers.AdvancedThreatProtectionStateEnabled), // }, // }
Output:
func (*AdvancedThreatProtectionSettingsClient) BeginUpdatePut ¶
func (client *AdvancedThreatProtectionSettingsClient) BeginUpdatePut(ctx context.Context, resourceGroupName string, serverName string, advancedThreatProtectionName AdvancedThreatProtectionName, parameters AdvancedThreatProtection, options *AdvancedThreatProtectionSettingsClientBeginUpdatePutOptions) (*runtime.Poller[AdvancedThreatProtectionSettingsClientUpdatePutResponse], error)
BeginUpdatePut - Updates a server's Advanced Threat Protection state. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-12-30
- resourceGroupName - The name of the resource group. The name is case insensitive.
- serverName - The name of the server.
- advancedThreatProtectionName - The name of the Advanced Threat Protection state.
- parameters - The server's Advanced Threat Protection body to update.
- options - AdvancedThreatProtectionSettingsClientBeginUpdatePutOptions contains the optional parameters for the AdvancedThreatProtectionSettingsClient.BeginUpdatePut method.
Example (DisableAServersAdvancedThreatProtectionSettingsWithAllParametersUsingPut) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/AdvancedThreatProtectionSettingsPutDisabled.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.NewAdvancedThreatProtectionSettingsClient().BeginUpdatePut(ctx, "threatprotection-4799", "threatprotection-6440", armmysqlflexibleservers.AdvancedThreatProtectionNameDefault, armmysqlflexibleservers.AdvancedThreatProtection{ Properties: &armmysqlflexibleservers.AdvancedThreatProtectionProperties{ State: to.Ptr(armmysqlflexibleservers.AdvancedThreatProtectionStateDisabled), }, }, 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.AdvancedThreatProtection = armmysqlflexibleservers.AdvancedThreatProtection{ // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers/advancedThreatProtectionSettings"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/threatprotection-4799/providers/Microsoft.DBforMySQL/flexibleServers/threatprotection-6440/advancedThreatProtectionSettings/Default"), // SystemData: &armmysqlflexibleservers.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-03T04:41:33.937Z"); return t}()), // CreatedBy: to.Ptr("string"), // CreatedByType: to.Ptr(armmysqlflexibleservers.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-03T04:41:33.937Z"); return t}()), // LastModifiedBy: to.Ptr("string"), // LastModifiedByType: to.Ptr(armmysqlflexibleservers.CreatedByTypeUser), // }, // Properties: &armmysqlflexibleservers.AdvancedThreatProtectionProperties{ // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-03T04:41:33.937Z"); return t}()), // ProvisioningState: to.Ptr(armmysqlflexibleservers.AdvancedThreatProtectionProvisioningStateSucceeded), // State: to.Ptr(armmysqlflexibleservers.AdvancedThreatProtectionStateDisabled), // }, // }
Output:
Example (EnableAServersAdvancedThreatProtectionSettingsUsingPut) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/AdvancedThreatProtectionSettingsPutEnabled.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.NewAdvancedThreatProtectionSettingsClient().BeginUpdatePut(ctx, "threatprotection-4799", "threatprotection-6440", armmysqlflexibleservers.AdvancedThreatProtectionNameDefault, armmysqlflexibleservers.AdvancedThreatProtection{ Properties: &armmysqlflexibleservers.AdvancedThreatProtectionProperties{ State: to.Ptr(armmysqlflexibleservers.AdvancedThreatProtectionStateEnabled), }, }, 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.AdvancedThreatProtection = armmysqlflexibleservers.AdvancedThreatProtection{ // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers/advancedThreatProtectionSettings"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/threatprotection-4799/providers/Microsoft.DBforMySQL/flexibleServers/threatprotection-6440/advancedThreatProtectionSettings/Default"), // SystemData: &armmysqlflexibleservers.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-03T04:41:33.937Z"); return t}()), // CreatedBy: to.Ptr("string"), // CreatedByType: to.Ptr(armmysqlflexibleservers.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-03T04:41:33.937Z"); return t}()), // LastModifiedBy: to.Ptr("string"), // LastModifiedByType: to.Ptr(armmysqlflexibleservers.CreatedByTypeUser), // }, // Properties: &armmysqlflexibleservers.AdvancedThreatProtectionProperties{ // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-03T04:41:33.937Z"); return t}()), // ProvisioningState: to.Ptr(armmysqlflexibleservers.AdvancedThreatProtectionProvisioningStateSucceeded), // State: to.Ptr(armmysqlflexibleservers.AdvancedThreatProtectionStateEnabled), // }, // }
Output:
func (*AdvancedThreatProtectionSettingsClient) Get ¶
func (client *AdvancedThreatProtectionSettingsClient) Get(ctx context.Context, resourceGroupName string, serverName string, advancedThreatProtectionName AdvancedThreatProtectionName, options *AdvancedThreatProtectionSettingsClientGetOptions) (AdvancedThreatProtectionSettingsClientGetResponse, error)
Get - Get a server's Advanced Threat Protection state If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-12-30
- resourceGroupName - The name of the resource group. The name is case insensitive.
- serverName - The name of the server.
- advancedThreatProtectionName - The name of the Advanced Threat Protection state.
- options - AdvancedThreatProtectionSettingsClientGetOptions contains the optional parameters for the AdvancedThreatProtectionSettingsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/AdvancedThreatProtectionSettingsGet.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.NewAdvancedThreatProtectionSettingsClient().Get(ctx, "threatprotection-6852", "threatprotection-2080", armmysqlflexibleservers.AdvancedThreatProtectionNameDefault, 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.AdvancedThreatProtection = armmysqlflexibleservers.AdvancedThreatProtection{ // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers/advancedThreatProtectionSettings"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/threatprotection-4799/providers/Microsoft.DBforMySQL/flexibleServers/threatprotection-6440/advancedThreatProtectionSettings/Default"), // SystemData: &armmysqlflexibleservers.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-03T04:41:33.937Z"); return t}()), // CreatedBy: to.Ptr("string"), // CreatedByType: to.Ptr(armmysqlflexibleservers.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-03T04:41:33.937Z"); return t}()), // LastModifiedBy: to.Ptr("string"), // LastModifiedByType: to.Ptr(armmysqlflexibleservers.CreatedByTypeUser), // }, // Properties: &armmysqlflexibleservers.AdvancedThreatProtectionProperties{ // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-03T04:41:33.937Z"); return t}()), // ProvisioningState: to.Ptr(armmysqlflexibleservers.AdvancedThreatProtectionProvisioningStateSucceeded), // State: to.Ptr(armmysqlflexibleservers.AdvancedThreatProtectionStateEnabled), // }, // }
Output:
func (*AdvancedThreatProtectionSettingsClient) NewListPager ¶
func (client *AdvancedThreatProtectionSettingsClient) NewListPager(resourceGroupName string, serverName string, options *AdvancedThreatProtectionSettingsClientListOptions) *runtime.Pager[AdvancedThreatProtectionSettingsClientListResponse]
NewListPager - Gets a list of server's Advanced Threat Protection states.
Generated from API version 2023-12-30
- resourceGroupName - The name of the resource group. The name is case insensitive.
- serverName - The name of the server.
- options - AdvancedThreatProtectionSettingsClientListOptions contains the optional parameters for the AdvancedThreatProtectionSettingsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/AdvancedThreatProtectionSettingsList.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.NewAdvancedThreatProtectionSettingsClient().NewListPager("threatprotection-6852", "threatprotection-2080", 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.AdvancedThreatProtectionListResult = armmysqlflexibleservers.AdvancedThreatProtectionListResult{ // Value: []*armmysqlflexibleservers.AdvancedThreatProtection{ // { // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers/advancedThreatProtectionSettings"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/threatprotection-6852/providers/Microsoft.DBforMySQL/flexibleServers/threatprotection-2080/advancedThreatProtectionSettings/Default"), // SystemData: &armmysqlflexibleservers.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-03T04:41:33.937Z"); return t}()), // CreatedBy: to.Ptr("string"), // CreatedByType: to.Ptr(armmysqlflexibleservers.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-03T04:41:33.937Z"); return t}()), // LastModifiedBy: to.Ptr("string"), // LastModifiedByType: to.Ptr(armmysqlflexibleservers.CreatedByTypeUser), // }, // Properties: &armmysqlflexibleservers.AdvancedThreatProtectionProperties{ // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-03T04:41:33.937Z"); return t}()), // ProvisioningState: to.Ptr(armmysqlflexibleservers.AdvancedThreatProtectionProvisioningStateSucceeded), // State: to.Ptr(armmysqlflexibleservers.AdvancedThreatProtectionStateEnabled), // }, // }}, // } }
Output:
type AdvancedThreatProtectionSettingsClientBeginUpdateOptions ¶
type AdvancedThreatProtectionSettingsClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
AdvancedThreatProtectionSettingsClientBeginUpdateOptions contains the optional parameters for the AdvancedThreatProtectionSettingsClient.BeginUpdate method.
type AdvancedThreatProtectionSettingsClientBeginUpdatePutOptions ¶
type AdvancedThreatProtectionSettingsClientBeginUpdatePutOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
AdvancedThreatProtectionSettingsClientBeginUpdatePutOptions contains the optional parameters for the AdvancedThreatProtectionSettingsClient.BeginUpdatePut method.
type AdvancedThreatProtectionSettingsClientGetOptions ¶
type AdvancedThreatProtectionSettingsClientGetOptions struct { }
AdvancedThreatProtectionSettingsClientGetOptions contains the optional parameters for the AdvancedThreatProtectionSettingsClient.Get method.
type AdvancedThreatProtectionSettingsClientGetResponse ¶
type AdvancedThreatProtectionSettingsClientGetResponse struct { // A server's Advanced Threat Protection. AdvancedThreatProtection }
AdvancedThreatProtectionSettingsClientGetResponse contains the response from method AdvancedThreatProtectionSettingsClient.Get.
type AdvancedThreatProtectionSettingsClientListOptions ¶
type AdvancedThreatProtectionSettingsClientListOptions struct { }
AdvancedThreatProtectionSettingsClientListOptions contains the optional parameters for the AdvancedThreatProtectionSettingsClient.NewListPager method.
type AdvancedThreatProtectionSettingsClientListResponse ¶
type AdvancedThreatProtectionSettingsClientListResponse struct { // A list of the server's Advanced Threat Protection configurations. AdvancedThreatProtectionListResult }
AdvancedThreatProtectionSettingsClientListResponse contains the response from method AdvancedThreatProtectionSettingsClient.NewListPager.
type AdvancedThreatProtectionSettingsClientUpdatePutResponse ¶
type AdvancedThreatProtectionSettingsClientUpdatePutResponse struct { // A server's Advanced Threat Protection. AdvancedThreatProtection }
AdvancedThreatProtectionSettingsClientUpdatePutResponse contains the response from method AdvancedThreatProtectionSettingsClient.BeginUpdatePut.
type AdvancedThreatProtectionSettingsClientUpdateResponse ¶
type AdvancedThreatProtectionSettingsClientUpdateResponse struct { // A server's Advanced Threat Protection. AdvancedThreatProtection }
AdvancedThreatProtectionSettingsClientUpdateResponse contains the response from method AdvancedThreatProtectionSettingsClient.BeginUpdate.
type AdvancedThreatProtectionState ¶
type AdvancedThreatProtectionState string
AdvancedThreatProtectionState - Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled on the server.
const ( AdvancedThreatProtectionStateDisabled AdvancedThreatProtectionState = "Disabled" AdvancedThreatProtectionStateEnabled AdvancedThreatProtectionState = "Enabled" )
func PossibleAdvancedThreatProtectionStateValues ¶
func PossibleAdvancedThreatProtectionStateValues() []AdvancedThreatProtectionState
PossibleAdvancedThreatProtectionStateValues returns the possible values for the AdvancedThreatProtectionState const type.
type AdvancedThreatProtectionUpdateProperties ¶
type AdvancedThreatProtectionUpdateProperties struct { // REQUIRED; Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled or a state has not been // applied yet on the specific database or server. State *AdvancedThreatProtectionState }
AdvancedThreatProtectionUpdateProperties - Properties of Advanced Threat Protection that can be updated.
func (AdvancedThreatProtectionUpdateProperties) MarshalJSON ¶
func (a AdvancedThreatProtectionUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AdvancedThreatProtectionUpdateProperties.
func (*AdvancedThreatProtectionUpdateProperties) UnmarshalJSON ¶
func (a *AdvancedThreatProtectionUpdateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AdvancedThreatProtectionUpdateProperties.
type AzureADAdministrator ¶
type AzureADAdministrator struct { // The properties of an administrator. Properties *AdministratorProperties // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
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. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*AzureADAdministratorsClient) BeginCreateOrUpdate ¶
func (client *AzureADAdministratorsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, administratorName AdministratorName, parameters AzureADAdministrator, options *AzureADAdministratorsClientBeginCreateOrUpdateOptions) (*runtime.Poller[AzureADAdministratorsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates an existing Azure Active Directory administrator. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-06-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/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/preview/2023-06-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 ¶
func (client *AzureADAdministratorsClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, administratorName AdministratorName, options *AzureADAdministratorsClientBeginDeleteOptions) (*runtime.Poller[AzureADAdministratorsClientDeleteResponse], error)
BeginDelete - Deletes an Azure AD Administrator. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-06-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/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/preview/2023-06-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 ¶
func (client *AzureADAdministratorsClient) Get(ctx context.Context, resourceGroupName string, serverName string, administratorName AdministratorName, options *AzureADAdministratorsClientGetOptions) (AzureADAdministratorsClientGetResponse, error)
Get - Gets information about an azure ad administrator. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-06-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/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/preview/2023-06-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 ¶
func (client *AzureADAdministratorsClient) NewListByServerPager(resourceGroupName string, serverName string, options *AzureADAdministratorsClientListByServerOptions) *runtime.Pager[AzureADAdministratorsClientListByServerResponse]
NewListByServerPager - List all the AAD administrators in a given server.
Generated from API version 2023-06-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/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/preview/2023-06-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 interval hours for the server. BackupIntervalHours *int32 // 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 ¶
MarshalJSON implements the json.Marshaller interface for type Backup.
func (*Backup) UnmarshalJSON ¶
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. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*BackupAndExportClient) BeginCreate ¶
func (client *BackupAndExportClient) BeginCreate(ctx context.Context, resourceGroupName string, serverName string, parameters BackupAndExportRequest, options *BackupAndExportClientBeginCreateOptions) (*runtime.Poller[BackupAndExportClientCreateResponse], error)
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 2023-10-01-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/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-10-01-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{ // Error: &armmysqlflexibleservers.ErrorDetail{ // Code: to.Ptr("AggregateException"), // Message: to.Ptr("System.AggregateException: One or more errors occurred. (Mismatch in count of number of Commited-Blocks from service.)"), // }, // 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}()), // 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 ¶
func (client *BackupAndExportClient) ValidateBackup(ctx context.Context, resourceGroupName string, serverName string, options *BackupAndExportClientValidateBackupOptions) (BackupAndExportClientValidateBackupResponse, error)
ValidateBackup - Validates if backup can be performed for given server. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-10-01-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/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-10-01-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 error object. Error *ErrorDetail // 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. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
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 BackupAndExportResponseType ¶
type BackupAndExportResponseType struct { // REQUIRED; Identifies the type of source operation ObjectType *ObjectType // 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 }
BackupAndExportResponseType - BackupAndExport Response Properties
func (*BackupAndExportResponseType) GetOperationProgressResponseType ¶
func (b *BackupAndExportResponseType) GetOperationProgressResponseType() *OperationProgressResponseType
GetOperationProgressResponseType implements the OperationProgressResponseTypeClassification interface for type BackupAndExportResponseType.
func (BackupAndExportResponseType) MarshalJSON ¶
func (b BackupAndExportResponseType) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BackupAndExportResponseType.
func (*BackupAndExportResponseType) UnmarshalJSON ¶
func (b *BackupAndExportResponseType) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BackupAndExportResponseType.
type BackupFormat ¶
type BackupFormat string
BackupFormat - Backup Format for the current backup. (CollatedFormat is INTERNAL – DO NOT USE)
const ( BackupFormatCollatedFormat BackupFormat = "CollatedFormat" BackupFormatRaw BackupFormat = "Raw" )
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 BackupType ¶
type BackupType string
const (
BackupTypeFULL BackupType = "FULL"
)
func PossibleBackupTypeValues ¶
func PossibleBackupTypeValues() []BackupType
PossibleBackupTypeValues returns the possible values for the BackupType const type.
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. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*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 2023-10-01-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/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-10-01-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 2023-10-01-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/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-10-01-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 2023-10-01-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/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-10-01-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 Capability ¶
type Capability struct { // The properties of a location capability set. Properties *CapabilityPropertiesV2 // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
Capability - Represents a location capability set.
func (Capability) MarshalJSON ¶
func (c Capability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type Capability.
func (*Capability) UnmarshalJSON ¶
func (c *Capability) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type Capability.
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 CapabilityPropertiesV2 ¶
type CapabilityPropertiesV2 struct { // READ-ONLY; A list of supported flexible server editions. SupportedFlexibleServerEditions []*ServerEditionCapabilityV2 // READ-ONLY; supported geo backup regions SupportedGeoBackupRegions []*string // READ-ONLY; A list of supported server versions. SupportedServerVersions []*ServerVersionCapabilityV2 }
CapabilityPropertiesV2 - Location capability.
func (CapabilityPropertiesV2) MarshalJSON ¶
func (c CapabilityPropertiesV2) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CapabilityPropertiesV2.
func (*CapabilityPropertiesV2) UnmarshalJSON ¶
func (c *CapabilityPropertiesV2) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CapabilityPropertiesV2.
type CapabilitySetsList ¶
type CapabilitySetsList struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; A list of supported capability sets. Value []*Capability }
CapabilitySetsList - location capability set
func (CapabilitySetsList) MarshalJSON ¶
func (c CapabilitySetsList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CapabilitySetsList.
func (*CapabilitySetsList) UnmarshalJSON ¶
func (c *CapabilitySetsList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CapabilitySetsList.
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. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*CheckNameAvailabilityClient) Execute ¶
func (client *CheckNameAvailabilityClient) Execute(ctx context.Context, locationName string, nameAvailabilityRequest NameAvailabilityRequest, options *CheckNameAvailabilityClientExecuteOptions) (CheckNameAvailabilityClientExecuteResponse, error)
Execute - Check the availability of name for server If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-12-30
- 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/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/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. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*CheckNameAvailabilityWithoutLocationClient) Execute ¶
func (client *CheckNameAvailabilityWithoutLocationClient) Execute(ctx context.Context, nameAvailabilityRequest NameAvailabilityRequest, options *CheckNameAvailabilityWithoutLocationClientExecuteOptions) (CheckNameAvailabilityWithoutLocationClientExecuteResponse, error)
Execute - Check the availability of name for server If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-12-30
- 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/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/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. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*CheckVirtualNetworkSubnetUsageClient) Execute ¶
func (client *CheckVirtualNetworkSubnetUsageClient) Execute(ctx context.Context, locationName string, parameters VirtualNetworkSubnetUsageParameter, options *CheckVirtualNetworkSubnetUsageClientExecuteOptions) (CheckVirtualNetworkSubnetUsageClientExecuteResponse, error)
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 2023-12-30
- 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/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/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. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ClientFactory) NewAdvancedThreatProtectionSettingsClient ¶
func (c *ClientFactory) NewAdvancedThreatProtectionSettingsClient() *AdvancedThreatProtectionSettingsClient
NewAdvancedThreatProtectionSettingsClient creates a new instance of AdvancedThreatProtectionSettingsClient.
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) NewLocationBasedCapabilitySetClient ¶
func (c *ClientFactory) NewLocationBasedCapabilitySetClient() *LocationBasedCapabilitySetClient
NewLocationBasedCapabilitySetClient creates a new instance of LocationBasedCapabilitySetClient.
func (*ClientFactory) NewLogFilesClient ¶
func (c *ClientFactory) NewLogFilesClient() *LogFilesClient
NewLogFilesClient creates a new instance of LogFilesClient.
func (*ClientFactory) NewLongRunningBackupClient ¶
func (c *ClientFactory) NewLongRunningBackupClient() *LongRunningBackupClient
NewLongRunningBackupClient creates a new instance of LongRunningBackupClient.
func (*ClientFactory) NewLongRunningBackupsClient ¶
func (c *ClientFactory) NewLongRunningBackupsClient() *LongRunningBackupsClient
NewLongRunningBackupsClient creates a new instance of LongRunningBackupsClient.
func (*ClientFactory) NewMaintenancesClient ¶
func (c *ClientFactory) NewMaintenancesClient() *MaintenancesClient
NewMaintenancesClient creates a new instance of MaintenancesClient.
func (*ClientFactory) NewOperationProgressClient ¶
func (c *ClientFactory) NewOperationProgressClient() *OperationProgressClient
NewOperationProgressClient creates a new instance of OperationProgressClient.
func (*ClientFactory) NewOperationResultsClient ¶
func (c *ClientFactory) NewOperationResultsClient() *OperationResultsClient
NewOperationResultsClient creates a new instance of OperationResultsClient.
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.
func (*ClientFactory) NewServersMigrationClient ¶
func (c *ClientFactory) NewServersMigrationClient() *ServersMigrationClient
NewServersMigrationClient creates a new instance of ServersMigrationClient.
type Configuration ¶
type Configuration struct { // The properties of a configuration. Properties *ConfigurationProperties // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
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. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ConfigurationsClient) BeginBatchUpdate ¶
func (client *ConfigurationsClient) BeginBatchUpdate(ctx context.Context, resourceGroupName string, serverName string, parameters ConfigurationListForBatchUpdate, options *ConfigurationsClientBeginBatchUpdateOptions) (*runtime.Poller[ConfigurationsClientBatchUpdateResponse], error)
BeginBatchUpdate - Update a list of configurations in a given server. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-06-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/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2023-06-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 2023-06-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/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2023-06-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 2023-06-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/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2023-06-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 2023-06-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/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2023-06-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 2023-06-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/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2023-06-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. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
Database - Represents a Database.
func (Database) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Database.
func (*Database) UnmarshalJSON ¶
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. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*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 2023-06-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/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/preview/2023-06-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 2023-06-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/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/preview/2023-06-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 2023-06-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/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/preview/2023-06-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 2023-06-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/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/preview/2023-06-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 ErrorDetail ¶
type ErrorDetail struct { // READ-ONLY; The error additional info. AdditionalInfo []*ErrorAdditionalInfo // READ-ONLY; The error code. Code *string // READ-ONLY; The error details. Details []*ErrorDetail // READ-ONLY; The error message. Message *string // READ-ONLY; The error target. Target *string }
ErrorDetail - The error detail.
func (ErrorDetail) MarshalJSON ¶
func (e ErrorDetail) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorDetail.
func (*ErrorDetail) UnmarshalJSON ¶
func (e *ErrorDetail) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDetail.
type ErrorResponse ¶
type ErrorResponse struct { // The error object. Error *ErrorDetail }
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. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
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. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*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 2023-06-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/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/preview/2023-06-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 2023-06-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/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/preview/2023-06-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 2023-06-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/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/preview/2023-06-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 2023-06-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/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/preview/2023-06-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 ¶
func (client *GetPrivateDNSZoneSuffixClient) Execute(ctx context.Context, options *GetPrivateDNSZoneSuffixClientExecuteOptions) (GetPrivateDNSZoneSuffixClientExecuteResponse, error)
Execute - Get private DNS zone suffix in the cloud. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-12-30
- 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/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/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 - High availability 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 HighAvailabilityValidationEstimation ¶
type HighAvailabilityValidationEstimation struct { // Expected Availability zone of the standby server. ExpectedStandbyAvailabilityZone *string // READ-ONLY; Estimated seconds of downtime for the deployment. EstimatedDowntime *int32 // READ-ONLY; Scheduled Availability zone of the standby server. ScheduledStandbyAvailabilityZone *string }
HighAvailabilityValidationEstimation - High availability validation properties of a server
func (HighAvailabilityValidationEstimation) MarshalJSON ¶
func (h HighAvailabilityValidationEstimation) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type HighAvailabilityValidationEstimation.
func (*HighAvailabilityValidationEstimation) UnmarshalJSON ¶
func (h *HighAvailabilityValidationEstimation) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type HighAvailabilityValidationEstimation.
type ImportFromStorageResponseType ¶
type ImportFromStorageResponseType struct { // REQUIRED; Identifies the type of source operation ObjectType *ObjectType // The estimated time of operation completion. EstimatedCompletionTime *time.Time }
ImportFromStorageResponseType - ImportFromStorage Response Properties
func (*ImportFromStorageResponseType) GetOperationProgressResponseType ¶
func (i *ImportFromStorageResponseType) GetOperationProgressResponseType() *OperationProgressResponseType
GetOperationProgressResponseType implements the OperationProgressResponseTypeClassification interface for type ImportFromStorageResponseType.
func (ImportFromStorageResponseType) MarshalJSON ¶
func (i ImportFromStorageResponseType) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImportFromStorageResponseType.
func (*ImportFromStorageResponseType) UnmarshalJSON ¶
func (i *ImportFromStorageResponseType) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImportFromStorageResponseType.
type ImportSourceProperties ¶
type ImportSourceProperties struct { // Relative path of data directory in storage. DataDirPath *string // Sas token for accessing source storage. Read and list permissions are required for sas token. SasToken *string // Storage type of import source. StorageType *ImportSourceStorageType // Uri of the import source storage. StorageURL *string }
ImportSourceProperties - Import source related properties.
func (ImportSourceProperties) MarshalJSON ¶
func (i ImportSourceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImportSourceProperties.
func (*ImportSourceProperties) UnmarshalJSON ¶
func (i *ImportSourceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImportSourceProperties.
type ImportSourceStorageType ¶
type ImportSourceStorageType string
ImportSourceStorageType - Storage type of import source.
const (
ImportSourceStorageTypeAzureBlob ImportSourceStorageType = "AzureBlob"
)
func PossibleImportSourceStorageTypeValues ¶
func PossibleImportSourceStorageTypeValues() []ImportSourceStorageType
PossibleImportSourceStorageTypeValues returns the possible values for the ImportSourceStorageType const type.
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. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*LocationBasedCapabilitiesClient) NewListPager ¶
func (client *LocationBasedCapabilitiesClient) NewListPager(locationName string, options *LocationBasedCapabilitiesClientListOptions) *runtime.Pager[LocationBasedCapabilitiesClientListResponse]
NewListPager - Get capabilities at specified location in a given subscription.
Generated from API version 2023-12-30
- 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/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/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 LocationBasedCapabilitySetClient ¶
type LocationBasedCapabilitySetClient struct {
// contains filtered or unexported fields
}
LocationBasedCapabilitySetClient contains the methods for the LocationBasedCapabilitySet group. Don't use this type directly, use NewLocationBasedCapabilitySetClient() instead.
func NewLocationBasedCapabilitySetClient ¶
func NewLocationBasedCapabilitySetClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LocationBasedCapabilitySetClient, error)
NewLocationBasedCapabilitySetClient creates a new instance of LocationBasedCapabilitySetClient with the specified values.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*LocationBasedCapabilitySetClient) Get ¶
func (client *LocationBasedCapabilitySetClient) Get(ctx context.Context, locationName string, capabilitySetName string, options *LocationBasedCapabilitySetClientGetOptions) (LocationBasedCapabilitySetClientGetResponse, error)
Get - Get capabilities at specified location in a given subscription. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-12-30
- locationName - The name of the location.
- capabilitySetName - Name of capability set
- options - LocationBasedCapabilitySetClientGetOptions contains the optional parameters for the LocationBasedCapabilitySetClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/CapabilitySetByLocation.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.NewLocationBasedCapabilitySetClient().Get(ctx, "WestUS", "default", 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.Capability = armmysqlflexibleservers.Capability{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.DBforMySQL/capabilities"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforMySQL/locations/WestUS/capabilitySets/default"), // Properties: &armmysqlflexibleservers.CapabilityPropertiesV2{ // SupportedFlexibleServerEditions: []*armmysqlflexibleservers.ServerEditionCapabilityV2{ // { // Name: to.Ptr("Burstable"), // DefaultSKU: to.Ptr("Standard_B1s"), // DefaultStorageSize: to.Ptr[int32](20480), // SupportedSKUs: []*armmysqlflexibleservers.SKUCapabilityV2{ // { // Name: to.Ptr("Standard_B1s"), // SupportedHAMode: []*string{ // }, // SupportedIops: to.Ptr[int64](400), // SupportedMemoryPerVCoreMB: to.Ptr[int64](1024), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](1), // }, // { // Name: to.Ptr("Standard_B1ms"), // SupportedHAMode: []*string{ // }, // SupportedIops: to.Ptr[int64](640), // SupportedMemoryPerVCoreMB: to.Ptr[int64](2048), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](1), // }, // { // Name: to.Ptr("Standard_B2s"), // SupportedHAMode: []*string{ // }, // SupportedIops: to.Ptr[int64](1280), // SupportedMemoryPerVCoreMB: to.Ptr[int64](2048), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](2), // }, // { // Name: to.Ptr("Standard_B2ms"), // SupportedHAMode: []*string{ // }, // SupportedIops: to.Ptr[int64](1700), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](2), // }, // { // Name: to.Ptr("Standard_B4ms"), // SupportedHAMode: []*string{ // }, // SupportedIops: to.Ptr[int64](2400), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](4), // }, // { // Name: to.Ptr("Standard_B8ms"), // SupportedHAMode: []*string{ // }, // SupportedIops: to.Ptr[int64](3100), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](8), // }, // { // Name: to.Ptr("Standard_B12ms"), // SupportedHAMode: []*string{ // }, // SupportedIops: to.Ptr[int64](3800), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](12), // }, // { // Name: to.Ptr("Standard_B16ms"), // SupportedHAMode: []*string{ // }, // SupportedIops: to.Ptr[int64](4300), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](16), // }, // { // Name: to.Ptr("Standard_B20ms"), // SupportedHAMode: []*string{ // }, // SupportedIops: to.Ptr[int64](5000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](20), // }}, // SupportedStorageEditions: []*armmysqlflexibleservers.StorageEditionCapability{ // { // Name: to.Ptr("Premium"), // MaxBackupIntervalHours: to.Ptr[int64](24), // MaxBackupRetentionDays: to.Ptr[int64](35), // MaxStorageSize: to.Ptr[int64](16777216), // MinBackupIntervalHours: to.Ptr[int64](1), // MinBackupRetentionDays: to.Ptr[int64](7), // MinStorageSize: to.Ptr[int64](20480), // }}, // }, // { // Name: to.Ptr("GeneralPurpose"), // DefaultSKU: to.Ptr("Standard_D2ds_v4"), // DefaultStorageSize: to.Ptr[int32](65536), // SupportedSKUs: []*armmysqlflexibleservers.SKUCapabilityV2{ // { // Name: to.Ptr("Standard_D2ds_v4"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](3200), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](2), // }, // { // Name: to.Ptr("Standard_D4ds_v4"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](6400), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](4), // }, // { // Name: to.Ptr("Standard_D8ds_v4"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](12800), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](8), // }, // { // Name: to.Ptr("Standard_D16ds_v4"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](20000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](16), // }, // { // Name: to.Ptr("Standard_D32ds_v4"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](20000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](32), // }, // { // Name: to.Ptr("Standard_D48ds_v4"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](20000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](48), // }, // { // Name: to.Ptr("Standard_D64ds_v4"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](20000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](64), // }, // { // Name: to.Ptr("Standard_D2ds_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](3200), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](2), // }, // { // Name: to.Ptr("Standard_D4ds_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](6400), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](4), // }, // { // Name: to.Ptr("Standard_D8ds_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](12800), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](8), // }, // { // Name: to.Ptr("Standard_D16ds_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](20000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](16), // }, // { // Name: to.Ptr("Standard_D32ds_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](20000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](32), // }, // { // Name: to.Ptr("Standard_D48ds_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](20000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](48), // }, // { // Name: to.Ptr("Standard_D64ds_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](20000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](64), // }, // { // Name: to.Ptr("Standard_D96ds_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](20000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](64), // }, // { // Name: to.Ptr("Standard_D2ads_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](3200), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](2), // }, // { // Name: to.Ptr("Standard_D4ads_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](6400), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](4), // }, // { // Name: to.Ptr("Standard_D8ads_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](12800), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](8), // }, // { // Name: to.Ptr("Standard_D16ads_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](20000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](16), // }, // { // Name: to.Ptr("Standard_D32ads_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](20000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](32), // }, // { // Name: to.Ptr("Standard_D48ads_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](20000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](48), // }, // { // Name: to.Ptr("Standard_D64ads_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](20000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](64), // }, // { // Name: to.Ptr("Standard_D96ads_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](20000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](96), // }, // { // Name: to.Ptr("Standard_D2s_v3"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](3200), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](2), // }, // { // Name: to.Ptr("Standard_D4s_v3"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](6400), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](4), // }, // { // Name: to.Ptr("Standard_D8s_v3"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](12800), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](8), // }, // { // Name: to.Ptr("Standard_D16s_v3"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](20000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](16), // }, // { // Name: to.Ptr("Standard_D32s_v3"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](20000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](32), // }, // { // Name: to.Ptr("Standard_D48s_v3"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](20000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](48), // }, // { // Name: to.Ptr("Standard_D64s_v3"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](20000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](64), // }}, // SupportedStorageEditions: []*armmysqlflexibleservers.StorageEditionCapability{ // { // Name: to.Ptr("Premium"), // MaxBackupIntervalHours: to.Ptr[int64](24), // MaxBackupRetentionDays: to.Ptr[int64](35), // MaxStorageSize: to.Ptr[int64](16777216), // MinBackupIntervalHours: to.Ptr[int64](1), // MinBackupRetentionDays: to.Ptr[int64](7), // MinStorageSize: to.Ptr[int64](20480), // }}, // }, // { // Name: to.Ptr("MemoryOptimized"), // DefaultSKU: to.Ptr("Standard_E2ds_v4"), // DefaultStorageSize: to.Ptr[int32](131072), // SupportedSKUs: []*armmysqlflexibleservers.SKUCapabilityV2{ // { // Name: to.Ptr("Standard_E2ds_v4"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](5000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](8192), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](2), // }, // { // Name: to.Ptr("Standard_E4ds_v4"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](10000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](8192), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](4), // }, // { // Name: to.Ptr("Standard_E8ds_v4"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](18000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](8192), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](8), // }, // { // Name: to.Ptr("Standard_E16ds_v4"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](28000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](8192), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](16), // }, // { // Name: to.Ptr("Standard_E32ds_v4"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](38000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](8192), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](32), // }, // { // Name: to.Ptr("Standard_E48ds_v4"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](48000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](8192), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](48), // }, // { // Name: to.Ptr("Standard_E64ds_v4"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](64000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](8192), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](64), // }, // { // Name: to.Ptr("Standard_E80ids_v4"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](72000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](6451), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](80), // }, // { // Name: to.Ptr("Standard_E2ds_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](5000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](8192), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](2), // }, // { // Name: to.Ptr("Standard_E4ds_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](10000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](8192), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](4), // }, // { // Name: to.Ptr("Standard_E8ds_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](18000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](8192), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](8), // }, // { // Name: to.Ptr("Standard_E16ds_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](28000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](8192), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](16), // }, // { // Name: to.Ptr("Standard_E32ds_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](38000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](8192), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](32), // }, // { // Name: to.Ptr("Standard_E48ds_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](48000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](8192), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](48), // }, // { // Name: to.Ptr("Standard_E64ds_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](64000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](8192), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](64), // }, // { // Name: to.Ptr("Standard_E96ds_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](80000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](7168), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](96), // }, // { // Name: to.Ptr("Standard_E2ads_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](5000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](8192), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](2), // }, // { // Name: to.Ptr("Standard_E4ads_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](10000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](8192), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](4), // }, // { // Name: to.Ptr("Standard_E8ads_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](18000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](8192), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](8), // }, // { // Name: to.Ptr("Standard_E16ads_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](28000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](8192), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](16), // }, // { // Name: to.Ptr("Standard_E32ads_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](38000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](8192), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](32), // }, // { // Name: to.Ptr("Standard_E48ads_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](48000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](8192), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](48), // }, // { // Name: to.Ptr("Standard_E64ads_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](64000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](8192), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](64), // }, // { // Name: to.Ptr("Standard_E96ads_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](80000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](7168), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](96), // }, // { // Name: to.Ptr("Standard_E2s_v3"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](5000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](8192), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](2), // }, // { // Name: to.Ptr("Standard_E4s_v3"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](10000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](8192), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](4), // }, // { // Name: to.Ptr("Standard_E8s_v3"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](18000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](8192), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](8), // }, // { // Name: to.Ptr("Standard_E16s_v3"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](28000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](8192), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](16), // }, // { // Name: to.Ptr("Standard_E32s_v3"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](38000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](8192), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](32), // }, // { // Name: to.Ptr("Standard_E48s_v3"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](20000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](8192), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](48), // }, // { // Name: to.Ptr("Standard_E64s_v3"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](64000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](8192), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](64), // }}, // SupportedStorageEditions: []*armmysqlflexibleservers.StorageEditionCapability{ // { // Name: to.Ptr("Premium"), // MaxBackupIntervalHours: to.Ptr[int64](24), // MaxBackupRetentionDays: to.Ptr[int64](35), // MaxStorageSize: to.Ptr[int64](16777216), // MinBackupIntervalHours: to.Ptr[int64](1), // MinBackupRetentionDays: to.Ptr[int64](7), // MinStorageSize: to.Ptr[int64](20480), // }}, // }}, // SupportedGeoBackupRegions: []*string{ // to.Ptr("southcentralus")}, // SupportedServerVersions: []*armmysqlflexibleservers.ServerVersionCapabilityV2{ // { // Name: to.Ptr("5.7"), // }, // { // Name: to.Ptr("8.0.21"), // }}, // }, // }
Output:
func (*LocationBasedCapabilitySetClient) NewListPager ¶
func (client *LocationBasedCapabilitySetClient) NewListPager(locationName string, options *LocationBasedCapabilitySetClientListOptions) *runtime.Pager[LocationBasedCapabilitySetClientListResponse]
NewListPager - Get capabilities at specified location in a given subscription.
Generated from API version 2023-12-30
- locationName - The name of the location.
- options - LocationBasedCapabilitySetClientListOptions contains the optional parameters for the LocationBasedCapabilitySetClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/CapabilitySetListByLocation.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.NewLocationBasedCapabilitySetClient().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.CapabilitySetsList = armmysqlflexibleservers.CapabilitySetsList{ // Value: []*armmysqlflexibleservers.Capability{ // { // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.DBforMySQL/capacitysets"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforMySQL/locations/WestUS/capabilitySets/default"), // Properties: &armmysqlflexibleservers.CapabilityPropertiesV2{ // SupportedFlexibleServerEditions: []*armmysqlflexibleservers.ServerEditionCapabilityV2{ // { // Name: to.Ptr("Burstable"), // DefaultSKU: to.Ptr("Standard_B1s"), // DefaultStorageSize: to.Ptr[int32](20480), // SupportedSKUs: []*armmysqlflexibleservers.SKUCapabilityV2{ // { // Name: to.Ptr("Standard_B1s"), // SupportedHAMode: []*string{ // }, // SupportedIops: to.Ptr[int64](400), // SupportedMemoryPerVCoreMB: to.Ptr[int64](1024), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](1), // }, // { // Name: to.Ptr("Standard_B1ms"), // SupportedHAMode: []*string{ // }, // SupportedIops: to.Ptr[int64](640), // SupportedMemoryPerVCoreMB: to.Ptr[int64](2048), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](1), // }, // { // Name: to.Ptr("Standard_B2s"), // SupportedHAMode: []*string{ // }, // SupportedIops: to.Ptr[int64](1280), // SupportedMemoryPerVCoreMB: to.Ptr[int64](2048), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](2), // }, // { // Name: to.Ptr("Standard_B2ms"), // SupportedHAMode: []*string{ // }, // SupportedIops: to.Ptr[int64](1700), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](2), // }, // { // Name: to.Ptr("Standard_B4ms"), // SupportedHAMode: []*string{ // }, // SupportedIops: to.Ptr[int64](2400), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](4), // }, // { // Name: to.Ptr("Standard_B8ms"), // SupportedHAMode: []*string{ // }, // SupportedIops: to.Ptr[int64](3100), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](8), // }, // { // Name: to.Ptr("Standard_B12ms"), // SupportedHAMode: []*string{ // }, // SupportedIops: to.Ptr[int64](3800), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](12), // }, // { // Name: to.Ptr("Standard_B16ms"), // SupportedHAMode: []*string{ // }, // SupportedIops: to.Ptr[int64](4300), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](16), // }, // { // Name: to.Ptr("Standard_B20ms"), // SupportedHAMode: []*string{ // }, // SupportedIops: to.Ptr[int64](5000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](20), // }}, // SupportedStorageEditions: []*armmysqlflexibleservers.StorageEditionCapability{ // { // Name: to.Ptr("Premium"), // MaxBackupIntervalHours: to.Ptr[int64](24), // MaxBackupRetentionDays: to.Ptr[int64](35), // MaxStorageSize: to.Ptr[int64](16777216), // MinBackupIntervalHours: to.Ptr[int64](1), // MinBackupRetentionDays: to.Ptr[int64](7), // MinStorageSize: to.Ptr[int64](20480), // }}, // }, // { // Name: to.Ptr("GeneralPurpose"), // DefaultSKU: to.Ptr("Standard_D2ds_v4"), // DefaultStorageSize: to.Ptr[int32](65536), // SupportedSKUs: []*armmysqlflexibleservers.SKUCapabilityV2{ // { // Name: to.Ptr("Standard_D2ds_v4"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](3200), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](2), // }, // { // Name: to.Ptr("Standard_D4ds_v4"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](6400), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](4), // }, // { // Name: to.Ptr("Standard_D8ds_v4"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](12800), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](8), // }, // { // Name: to.Ptr("Standard_D16ds_v4"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](20000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](16), // }, // { // Name: to.Ptr("Standard_D32ds_v4"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](20000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](32), // }, // { // Name: to.Ptr("Standard_D48ds_v4"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](20000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](48), // }, // { // Name: to.Ptr("Standard_D64ds_v4"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](20000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](64), // }, // { // Name: to.Ptr("Standard_D2ds_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](3200), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](2), // }, // { // Name: to.Ptr("Standard_D4ds_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](6400), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](4), // }, // { // Name: to.Ptr("Standard_D8ds_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](12800), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](8), // }, // { // Name: to.Ptr("Standard_D16ds_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](20000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](16), // }, // { // Name: to.Ptr("Standard_D32ds_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](20000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](32), // }, // { // Name: to.Ptr("Standard_D48ds_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](20000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](48), // }, // { // Name: to.Ptr("Standard_D64ds_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](20000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](64), // }, // { // Name: to.Ptr("Standard_D96ds_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](20000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](64), // }, // { // Name: to.Ptr("Standard_D2ads_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](3200), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](2), // }, // { // Name: to.Ptr("Standard_D4ads_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](6400), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](4), // }, // { // Name: to.Ptr("Standard_D8ads_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](12800), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](8), // }, // { // Name: to.Ptr("Standard_D16ads_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](20000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](16), // }, // { // Name: to.Ptr("Standard_D32ads_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](20000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](32), // }, // { // Name: to.Ptr("Standard_D48ads_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](20000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](48), // }, // { // Name: to.Ptr("Standard_D64ads_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](20000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](64), // }, // { // Name: to.Ptr("Standard_D96ads_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](20000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](96), // }, // { // Name: to.Ptr("Standard_D2s_v3"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](3200), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](2), // }, // { // Name: to.Ptr("Standard_D4s_v3"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](6400), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](4), // }, // { // Name: to.Ptr("Standard_D8s_v3"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](12800), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](8), // }, // { // Name: to.Ptr("Standard_D16s_v3"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](20000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](16), // }, // { // Name: to.Ptr("Standard_D32s_v3"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](20000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](32), // }, // { // Name: to.Ptr("Standard_D48s_v3"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](20000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](48), // }, // { // Name: to.Ptr("Standard_D64s_v3"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](20000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](4096), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](64), // }}, // SupportedStorageEditions: []*armmysqlflexibleservers.StorageEditionCapability{ // { // Name: to.Ptr("Premium"), // MaxBackupIntervalHours: to.Ptr[int64](24), // MaxBackupRetentionDays: to.Ptr[int64](35), // MaxStorageSize: to.Ptr[int64](16777216), // MinBackupIntervalHours: to.Ptr[int64](1), // MinBackupRetentionDays: to.Ptr[int64](7), // MinStorageSize: to.Ptr[int64](20480), // }}, // }, // { // Name: to.Ptr("MemoryOptimized"), // DefaultSKU: to.Ptr("Standard_E2ds_v4"), // DefaultStorageSize: to.Ptr[int32](131072), // SupportedSKUs: []*armmysqlflexibleservers.SKUCapabilityV2{ // { // Name: to.Ptr("Standard_E2ds_v4"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](5000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](8192), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](2), // }, // { // Name: to.Ptr("Standard_E4ds_v4"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](10000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](8192), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](4), // }, // { // Name: to.Ptr("Standard_E8ds_v4"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](18000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](8192), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](8), // }, // { // Name: to.Ptr("Standard_E16ds_v4"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](28000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](8192), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](16), // }, // { // Name: to.Ptr("Standard_E32ds_v4"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](38000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](8192), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](32), // }, // { // Name: to.Ptr("Standard_E48ds_v4"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](48000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](8192), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](48), // }, // { // Name: to.Ptr("Standard_E64ds_v4"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](64000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](8192), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](64), // }, // { // Name: to.Ptr("Standard_E80ids_v4"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](72000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](6451), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](80), // }, // { // Name: to.Ptr("Standard_E2ds_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](5000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](8192), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](2), // }, // { // Name: to.Ptr("Standard_E4ds_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](10000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](8192), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](4), // }, // { // Name: to.Ptr("Standard_E8ds_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](18000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](8192), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](8), // }, // { // Name: to.Ptr("Standard_E16ds_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](28000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](8192), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](16), // }, // { // Name: to.Ptr("Standard_E32ds_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](38000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](8192), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](32), // }, // { // Name: to.Ptr("Standard_E48ds_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](48000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](8192), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](48), // }, // { // Name: to.Ptr("Standard_E64ds_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](64000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](8192), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](64), // }, // { // Name: to.Ptr("Standard_E96ds_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](80000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](7168), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](96), // }, // { // Name: to.Ptr("Standard_E2ads_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](5000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](8192), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](2), // }, // { // Name: to.Ptr("Standard_E4ads_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](10000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](8192), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](4), // }, // { // Name: to.Ptr("Standard_E8ads_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](18000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](8192), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](8), // }, // { // Name: to.Ptr("Standard_E16ads_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](28000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](8192), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](16), // }, // { // Name: to.Ptr("Standard_E32ads_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](38000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](8192), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](32), // }, // { // Name: to.Ptr("Standard_E48ads_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](48000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](8192), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](48), // }, // { // Name: to.Ptr("Standard_E64ads_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](64000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](8192), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](64), // }, // { // Name: to.Ptr("Standard_E96ads_v5"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](80000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](7168), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](96), // }, // { // Name: to.Ptr("Standard_E2s_v3"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](5000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](8192), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](2), // }, // { // Name: to.Ptr("Standard_E4s_v3"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](10000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](8192), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](4), // }, // { // Name: to.Ptr("Standard_E8s_v3"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](18000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](8192), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](8), // }, // { // Name: to.Ptr("Standard_E16s_v3"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](28000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](8192), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](16), // }, // { // Name: to.Ptr("Standard_E32s_v3"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](38000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](8192), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](32), // }, // { // Name: to.Ptr("Standard_E48s_v3"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](20000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](8192), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](48), // }, // { // Name: to.Ptr("Standard_E64s_v3"), // SupportedHAMode: []*string{ // to.Ptr("SameZone"), // to.Ptr("ZoneRedundant")}, // SupportedIops: to.Ptr[int64](64000), // SupportedMemoryPerVCoreMB: to.Ptr[int64](8192), // SupportedZones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // VCores: to.Ptr[int64](64), // }}, // SupportedStorageEditions: []*armmysqlflexibleservers.StorageEditionCapability{ // { // Name: to.Ptr("Premium"), // MaxBackupIntervalHours: to.Ptr[int64](24), // MaxBackupRetentionDays: to.Ptr[int64](35), // MaxStorageSize: to.Ptr[int64](16777216), // MinBackupIntervalHours: to.Ptr[int64](1), // MinBackupRetentionDays: to.Ptr[int64](7), // MinStorageSize: to.Ptr[int64](20480), // }}, // }}, // SupportedGeoBackupRegions: []*string{ // to.Ptr("southcentralus")}, // SupportedServerVersions: []*armmysqlflexibleservers.ServerVersionCapabilityV2{ // { // Name: to.Ptr("5.7"), // }, // { // Name: to.Ptr("8.0.21"), // }}, // }, // }}, // } }
Output:
type LocationBasedCapabilitySetClientGetOptions ¶
type LocationBasedCapabilitySetClientGetOptions struct { }
LocationBasedCapabilitySetClientGetOptions contains the optional parameters for the LocationBasedCapabilitySetClient.Get method.
type LocationBasedCapabilitySetClientGetResponse ¶
type LocationBasedCapabilitySetClientGetResponse struct { // Represents a location capability set. Capability }
LocationBasedCapabilitySetClientGetResponse contains the response from method LocationBasedCapabilitySetClient.Get.
type LocationBasedCapabilitySetClientListOptions ¶
type LocationBasedCapabilitySetClientListOptions struct { }
LocationBasedCapabilitySetClientListOptions contains the optional parameters for the LocationBasedCapabilitySetClient.NewListPager method.
type LocationBasedCapabilitySetClientListResponse ¶
type LocationBasedCapabilitySetClientListResponse struct { // location capability set CapabilitySetsList }
LocationBasedCapabilitySetClientListResponse contains the response from method LocationBasedCapabilitySetClient.NewListPager.
type LogFile ¶
type LogFile struct { // The properties of a logFile. Properties *LogFileProperties // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
LogFile - Represents a logFile.
func (LogFile) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type LogFile.
func (*LogFile) UnmarshalJSON ¶
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. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*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 2023-06-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/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/LogFiles/preview/2023-06-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=XXXXXXX&se=X&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 LongRunningBackupClient ¶
type LongRunningBackupClient struct {
// contains filtered or unexported fields
}
LongRunningBackupClient contains the methods for the LongRunningBackup group. Don't use this type directly, use NewLongRunningBackupClient() instead.
func NewLongRunningBackupClient ¶
func NewLongRunningBackupClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LongRunningBackupClient, error)
NewLongRunningBackupClient creates a new instance of LongRunningBackupClient with the specified values.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*LongRunningBackupClient) BeginCreate ¶
func (client *LongRunningBackupClient) BeginCreate(ctx context.Context, resourceGroupName string, serverName string, backupName string, options *LongRunningBackupClientBeginCreateOptions) (*runtime.Poller[LongRunningBackupClientCreateResponse], error)
BeginCreate - Create backup for a given server with specified backup name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-10-01-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 - LongRunningBackupClientBeginCreateOptions contains the optional parameters for the LongRunningBackupClient.BeginCreate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-10-01-preview/examples/LongRunningBackup.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.NewLongRunningBackupClient().BeginCreate(ctx, "TestGroup", "mysqltestserver", "testback", &armmysqlflexibleservers.LongRunningBackupClientBeginCreateOptions{Parameters: 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.ServerBackupV2 = armmysqlflexibleservers.ServerBackupV2{ // 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/backupsV2/customer_20220507t073755_bb392c3b-17c6-4d3f-9742-8479ca87b3ac_mybackup"), // Properties: &armmysqlflexibleservers.ServerBackupPropertiesV2{ // BackupType: to.Ptr(armmysqlflexibleservers.BackupTypeFULL), // CompletedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-05-07T07:38:01.149Z"); return t}()), // ProvisioningState: to.Ptr(armmysqlflexibleservers.ProvisioningStateSucceeded), // Source: to.Ptr("Automatic"), // }, // }
Output:
type LongRunningBackupClientBeginCreateOptions ¶
type LongRunningBackupClientBeginCreateOptions struct { // The required parameters for creating and exporting backup of the given server. Parameters *ServerBackupV2 // Resumes the LRO from the provided token. ResumeToken string }
LongRunningBackupClientBeginCreateOptions contains the optional parameters for the LongRunningBackupClient.BeginCreate method.
type LongRunningBackupClientCreateResponse ¶
type LongRunningBackupClientCreateResponse struct { // Server backup properties ServerBackupV2 }
LongRunningBackupClientCreateResponse contains the response from method LongRunningBackupClient.BeginCreate.
type LongRunningBackupsClient ¶
type LongRunningBackupsClient struct {
// contains filtered or unexported fields
}
LongRunningBackupsClient contains the methods for the LongRunningBackups group. Don't use this type directly, use NewLongRunningBackupsClient() instead.
func NewLongRunningBackupsClient ¶
func NewLongRunningBackupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LongRunningBackupsClient, error)
NewLongRunningBackupsClient creates a new instance of LongRunningBackupsClient with the specified values.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*LongRunningBackupsClient) Get ¶
func (client *LongRunningBackupsClient) Get(ctx context.Context, resourceGroupName string, serverName string, backupName string, options *LongRunningBackupsClientGetOptions) (LongRunningBackupsClientGetResponse, error)
Get - Get backup for a given server. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-10-01-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 - LongRunningBackupsClientGetOptions contains the optional parameters for the LongRunningBackupsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-10-01-preview/examples/LongRunningBackupGet.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.NewLongRunningBackupsClient().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.ServerBackupV2 = armmysqlflexibleservers.ServerBackupV2{ // Name: to.Ptr("daily_20210615T160516"), // Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers/backupsV2"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver/backupsV2/daily_20210615T160516"), // Properties: &armmysqlflexibleservers.ServerBackupPropertiesV2{ // BackupType: to.Ptr(armmysqlflexibleservers.BackupTypeFULL), // CompletedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-15T16:05:19.902Z"); return t}()), // ProvisioningState: to.Ptr(armmysqlflexibleservers.ProvisioningStateSucceeded), // Source: to.Ptr("Automatic"), // }, // }
Output:
func (*LongRunningBackupsClient) NewListPager ¶
func (client *LongRunningBackupsClient) NewListPager(resourceGroupName string, serverName string, options *LongRunningBackupsClientListOptions) *runtime.Pager[LongRunningBackupsClientListResponse]
NewListPager - List all the backups for a given server.
Generated from API version 2023-10-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- serverName - The name of the server.
- options - LongRunningBackupsClientListOptions contains the optional parameters for the LongRunningBackupsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-10-01-preview/examples/LongRunningBackupsListByServer.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.NewLongRunningBackupsClient().NewListPager("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.ServerBackupV2ListResult = armmysqlflexibleservers.ServerBackupV2ListResult{ // Value: []*armmysqlflexibleservers.ServerBackupV2{ // { // Name: to.Ptr("daily_20210615T160516"), // Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers/backupsV2"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver/backupsV2/daily_20210615T160516"), // Properties: &armmysqlflexibleservers.ServerBackupPropertiesV2{ // BackupType: to.Ptr(armmysqlflexibleservers.BackupTypeFULL), // CompletedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-15T16:05:19.902Z"); return t}()), // ProvisioningState: to.Ptr(armmysqlflexibleservers.ProvisioningStateSucceeded), // Source: to.Ptr("Automatic"), // }, // }}, // } }
Output:
type LongRunningBackupsClientGetOptions ¶
type LongRunningBackupsClientGetOptions struct { }
LongRunningBackupsClientGetOptions contains the optional parameters for the LongRunningBackupsClient.Get method.
type LongRunningBackupsClientGetResponse ¶
type LongRunningBackupsClientGetResponse struct { // Server backup properties ServerBackupV2 }
LongRunningBackupsClientGetResponse contains the response from method LongRunningBackupsClient.Get.
type LongRunningBackupsClientListOptions ¶
type LongRunningBackupsClientListOptions struct { }
LongRunningBackupsClientListOptions contains the optional parameters for the LongRunningBackupsClient.NewListPager method.
type LongRunningBackupsClientListResponse ¶
type LongRunningBackupsClientListResponse struct { // A list of server backups. ServerBackupV2ListResult }
LongRunningBackupsClientListResponse contains the response from method LongRunningBackupsClient.NewListPager.
type Maintenance ¶
type Maintenance struct { // REQUIRED; The properties of a maintenance Properties *MaintenanceProperties // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
Maintenance - Represents a maintenance.
func (Maintenance) MarshalJSON ¶
func (m Maintenance) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type Maintenance.
func (*Maintenance) UnmarshalJSON ¶
func (m *Maintenance) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type Maintenance.
type MaintenanceListResult ¶
type MaintenanceListResult struct { // The link used to get the next page of operations. NextLink *string // The list of maintenances in a server. Value []*Maintenance }
MaintenanceListResult - A list of maintenances.
func (MaintenanceListResult) MarshalJSON ¶
func (m MaintenanceListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MaintenanceListResult.
func (*MaintenanceListResult) UnmarshalJSON ¶
func (m *MaintenanceListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MaintenanceListResult.
type MaintenanceProperties ¶
type MaintenanceProperties struct { // The start time for a maintenance. MaintenanceStartTime *time.Time // READ-ONLY; The max time the maintenance can be rescheduled. MaintenanceAvailableScheduleMaxTime *time.Time // READ-ONLY; The min time the maintenance can be rescheduled. MaintenanceAvailableScheduleMinTime *time.Time // READ-ONLY; The maintenance description. MaintenanceDescription *string // READ-ONLY; The end time for a maintenance. MaintenanceEndTime *time.Time // READ-ONLY; The end time for a maintenance execution. MaintenanceExecutionEndTime *time.Time // READ-ONLY; The start time for a maintenance execution. MaintenanceExecutionStartTime *time.Time // READ-ONLY; A string describes the maintenance status MaintenanceState *MaintenanceState // READ-ONLY; The maintenance title. MaintenanceTitle *string // READ-ONLY; A string defines maintenance type. MaintenanceType *MaintenanceType // READ-ONLY; Provisioning state of the Maintenance. ProvisioningState *MaintenanceProvisioningState }
MaintenanceProperties - The properties of a maintenance resource.
func (MaintenanceProperties) MarshalJSON ¶
func (m MaintenanceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MaintenanceProperties.
func (*MaintenanceProperties) UnmarshalJSON ¶
func (m *MaintenanceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MaintenanceProperties.
type MaintenancePropertiesForUpdate ¶
type MaintenancePropertiesForUpdate struct { // The start time for a maintenance. MaintenanceStartTime *time.Time }
MaintenancePropertiesForUpdate - The properties of a maintenance update parameter.
func (MaintenancePropertiesForUpdate) MarshalJSON ¶
func (m MaintenancePropertiesForUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MaintenancePropertiesForUpdate.
func (*MaintenancePropertiesForUpdate) UnmarshalJSON ¶
func (m *MaintenancePropertiesForUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MaintenancePropertiesForUpdate.
type MaintenanceProvisioningState ¶
type MaintenanceProvisioningState string
MaintenanceProvisioningState - The current provisioning state.
const ( MaintenanceProvisioningStateCreating MaintenanceProvisioningState = "Creating" MaintenanceProvisioningStateDeleting MaintenanceProvisioningState = "Deleting" MaintenanceProvisioningStateFailed MaintenanceProvisioningState = "Failed" MaintenanceProvisioningStateSucceeded MaintenanceProvisioningState = "Succeeded" )
func PossibleMaintenanceProvisioningStateValues ¶
func PossibleMaintenanceProvisioningStateValues() []MaintenanceProvisioningState
PossibleMaintenanceProvisioningStateValues returns the possible values for the MaintenanceProvisioningState const type.
type MaintenanceState ¶
type MaintenanceState string
MaintenanceState - The current status of this maintenance.
const ( MaintenanceStateCanceled MaintenanceState = "Canceled" MaintenanceStateCompleted MaintenanceState = "Completed" MaintenanceStateInPreparation MaintenanceState = "InPreparation" MaintenanceStateProcessing MaintenanceState = "Processing" MaintenanceStateReScheduled MaintenanceState = "ReScheduled" MaintenanceStateScheduled MaintenanceState = "Scheduled" )
func PossibleMaintenanceStateValues ¶
func PossibleMaintenanceStateValues() []MaintenanceState
PossibleMaintenanceStateValues returns the possible values for the MaintenanceState const type.
type MaintenanceType ¶
type MaintenanceType string
MaintenanceType - The type of this maintenance.
const ( MaintenanceTypeHotFixes MaintenanceType = "HotFixes" MaintenanceTypeMinorVersionUpgrade MaintenanceType = "MinorVersionUpgrade" MaintenanceTypeRoutineMaintenance MaintenanceType = "RoutineMaintenance" MaintenanceTypeSecurityPatches MaintenanceType = "SecurityPatches" )
func PossibleMaintenanceTypeValues ¶
func PossibleMaintenanceTypeValues() []MaintenanceType
PossibleMaintenanceTypeValues returns the possible values for the MaintenanceType const type.
type MaintenanceUpdate ¶
type MaintenanceUpdate struct { // The properties of a maintenance update parameter Properties *MaintenancePropertiesForUpdate }
MaintenanceUpdate - Represents a maintenance update parameter.
func (MaintenanceUpdate) MarshalJSON ¶
func (m MaintenanceUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MaintenanceUpdate.
func (*MaintenanceUpdate) UnmarshalJSON ¶
func (m *MaintenanceUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MaintenanceUpdate.
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 MaintenancesClient ¶
type MaintenancesClient struct {
// contains filtered or unexported fields
}
MaintenancesClient contains the methods for the Maintenances group. Don't use this type directly, use NewMaintenancesClient() instead.
func NewMaintenancesClient ¶
func NewMaintenancesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MaintenancesClient, error)
NewMaintenancesClient creates a new instance of MaintenancesClient with the specified values.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*MaintenancesClient) BeginUpdate ¶
func (client *MaintenancesClient) BeginUpdate(ctx context.Context, resourceGroupName string, serverName string, maintenanceName string, options *MaintenancesClientBeginUpdateOptions) (*runtime.Poller[MaintenancesClientUpdateResponse], error)
BeginUpdate - Update maintenances. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-10-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- serverName - The name of the server.
- maintenanceName - The name of the maintenance.
- options - MaintenancesClientBeginUpdateOptions contains the optional parameters for the MaintenancesClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/Maintenance/preview/2023-10-01-preview/examples/MaintenanceUpdate.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.NewMaintenancesClient().BeginUpdate(ctx, "TestGroup", "testserver", "_T9Q-TS8", &armmysqlflexibleservers.MaintenancesClientBeginUpdateOptions{Parameters: &armmysqlflexibleservers.MaintenanceUpdate{ Properties: &armmysqlflexibleservers.MaintenancePropertiesForUpdate{ MaintenanceStartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-19T16:00:00.000Z"); return t }()), }, }, }) 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.Maintenance = armmysqlflexibleservers.Maintenance{ // Name: to.Ptr("_T9Q-TS8"), // Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers/maintenances"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/testserver/maintenances/_T9Q-TS8"), // Properties: &armmysqlflexibleservers.MaintenanceProperties{ // MaintenanceAvailableScheduleMaxTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-30T16:00:00.000Z"); return t}()), // MaintenanceAvailableScheduleMinTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-04T17:23:45.000Z"); return t}()), // MaintenanceDescription: to.Ptr("Your Azure Database For MySQL routine maintenance will be performed on the scheduled maintenance window between Sat, 20 Jan 2024 00:00:00 GMT and Sat, 20 Jan 2024 01:00:00 GMT. During the maintenance window, your instance may experience temporary service interruption. Our team will minimize any impact and ensure a smooth transition"), // MaintenanceEndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-19T17:00:00.000Z"); return t}()), // MaintenanceStartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-19T16:00:00.000Z"); return t}()), // MaintenanceState: to.Ptr(armmysqlflexibleservers.MaintenanceStateReScheduled), // MaintenanceTitle: to.Ptr("Routine Maintenance: Rescheduled to Sat, 20 Jan 2024 00:00:00 GMT"), // MaintenanceType: to.Ptr(armmysqlflexibleservers.MaintenanceTypeRoutineMaintenance), // }, // }
Output:
func (*MaintenancesClient) NewListPager ¶
func (client *MaintenancesClient) NewListPager(resourceGroupName string, serverName string, options *MaintenancesClientListOptions) *runtime.Pager[MaintenancesClientListResponse]
NewListPager - List maintenances.
Generated from API version 2023-10-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- serverName - The name of the server.
- options - MaintenancesClientListOptions contains the optional parameters for the MaintenancesClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/Maintenance/preview/2023-10-01-preview/examples/MaintenancesListByServer.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.NewMaintenancesClient().NewListPager("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.MaintenanceListResult = armmysqlflexibleservers.MaintenanceListResult{ // Value: []*armmysqlflexibleservers.Maintenance{ // { // Name: to.Ptr("YL4X-3CG"), // Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers/maintenances"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/testserver/maintenances/YL4X-3CG"), // Properties: &armmysqlflexibleservers.MaintenanceProperties{ // MaintenanceDescription: to.Ptr("Your Azure Database For MySQL routine maintenance has been successfully completed and your instance is running on the upgraded version. If you have any additional questions or concerns, please contact support."), // MaintenanceEndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-12-10T21:00:00.000Z"); return t}()), // MaintenanceExecutionEndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-12-10T20:22:38.000Z"); return t}()), // MaintenanceExecutionStartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-12-10T20:03:21.000Z"); return t}()), // MaintenanceStartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-12-10T20:00:00.000Z"); return t}()), // MaintenanceState: to.Ptr(armmysqlflexibleservers.MaintenanceStateCompleted), // MaintenanceTitle: to.Ptr("Routine Maintenance: Completed on Mon, 11 Dec 2023 04:22:38 GMT"), // MaintenanceType: to.Ptr(armmysqlflexibleservers.MaintenanceTypeRoutineMaintenance), // }, // }, // { // Name: to.Ptr("_T9Q-TS8"), // Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers/maintenances"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/testserver/maintenances/_T9Q-TS8"), // Properties: &armmysqlflexibleservers.MaintenanceProperties{ // MaintenanceAvailableScheduleMaxTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-30T16:00:00.000Z"); return t}()), // MaintenanceAvailableScheduleMinTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-04T17:23:45.000Z"); return t}()), // MaintenanceDescription: to.Ptr("Your Azure Database For MySQL routine maintenance will be performed on the scheduled maintenance window between Mon, 15 Jan 2024 05:00:00 GMT and Mon, 15 Jan 2024 06:00:00 GMT. During the maintenance window, your instance may experience temporary service interruption. Our team will minimize any impact and ensure a smooth transition"), // MaintenanceEndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-14T22:00:00.000Z"); return t}()), // MaintenanceStartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-14T21:00:00.000Z"); return t}()), // MaintenanceState: to.Ptr(armmysqlflexibleservers.MaintenanceStateScheduled), // MaintenanceTitle: to.Ptr("Routine Maintenance: Scheduled on Mon, 15 Jan 2024 05:00:00 GMT - Mon, 15 Jan 2024 06:00:00 GMT"), // MaintenanceType: to.Ptr(armmysqlflexibleservers.MaintenanceTypeRoutineMaintenance), // }, // }}, // } }
Output:
func (*MaintenancesClient) Read ¶
func (client *MaintenancesClient) Read(ctx context.Context, resourceGroupName string, serverName string, maintenanceName string, options *MaintenancesClientReadOptions) (MaintenancesClientReadResponse, error)
Read - Read maintenance. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-10-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- serverName - The name of the server.
- maintenanceName - The name of the maintenance.
- options - MaintenancesClientReadOptions contains the optional parameters for the MaintenancesClient.Read method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/Maintenance/preview/2023-10-01-preview/examples/MaintenanceRead.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.NewMaintenancesClient().Read(ctx, "TestGroup", "testserver", "_T9Q-TS8", 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.Maintenance = armmysqlflexibleservers.Maintenance{ // Name: to.Ptr("_T9Q-TS8"), // Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers/maintenances"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/testserver/maintenances/_T9Q-TS8"), // Properties: &armmysqlflexibleservers.MaintenanceProperties{ // MaintenanceAvailableScheduleMaxTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-30T16:00:00.000Z"); return t}()), // MaintenanceAvailableScheduleMinTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-04T17:23:45.000Z"); return t}()), // MaintenanceDescription: to.Ptr("Your Azure Database For MySQL routine maintenance will be performed on the scheduled maintenance window between Mon, 15 Jan 2024 05:00:00 GMT and Mon, 15 Jan 2024 06:00:00 GMT. During the maintenance window, your instance may experience temporary service interruption. Our team will minimize any impact and ensure a smooth transition"), // MaintenanceEndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-14T22:00:00.000Z"); return t}()), // MaintenanceStartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-14T21:00:00.000Z"); return t}()), // MaintenanceState: to.Ptr(armmysqlflexibleservers.MaintenanceStateScheduled), // MaintenanceTitle: to.Ptr("Routine Maintenance: Scheduled on Mon, 15 Jan 2024 05:00:00 GMT - Mon, 15 Jan 2024 06:00:00 GMT"), // MaintenanceType: to.Ptr(armmysqlflexibleservers.MaintenanceTypeRoutineMaintenance), // }, // }
Output:
type MaintenancesClientBeginUpdateOptions ¶
type MaintenancesClientBeginUpdateOptions struct { // The required parameters for update maintenance on a server. Parameters *MaintenanceUpdate // Resumes the LRO from the provided token. ResumeToken string }
MaintenancesClientBeginUpdateOptions contains the optional parameters for the MaintenancesClient.BeginUpdate method.
type MaintenancesClientListOptions ¶
type MaintenancesClientListOptions struct { }
MaintenancesClientListOptions contains the optional parameters for the MaintenancesClient.NewListPager method.
type MaintenancesClientListResponse ¶
type MaintenancesClientListResponse struct { // A list of maintenances. MaintenanceListResult }
MaintenancesClientListResponse contains the response from method MaintenancesClient.NewListPager.
type MaintenancesClientReadOptions ¶
type MaintenancesClientReadOptions struct { }
MaintenancesClientReadOptions contains the optional parameters for the MaintenancesClient.Read method.
type MaintenancesClientReadResponse ¶
type MaintenancesClientReadResponse struct { // Represents a maintenance. Maintenance }
MaintenancesClientReadResponse contains the response from method MaintenancesClient.Read.
type MaintenancesClientUpdateResponse ¶
type MaintenancesClientUpdateResponse struct { // Represents a maintenance. Maintenance }
MaintenancesClientUpdateResponse contains the response from method MaintenancesClient.BeginUpdate.
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 MySQLServerIdentity ¶
type MySQLServerIdentity 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 }
MySQLServerIdentity - Properties to configure Identity for Bring your Own Keys
func (MySQLServerIdentity) MarshalJSON ¶
func (m MySQLServerIdentity) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MySQLServerIdentity.
func (*MySQLServerIdentity) UnmarshalJSON ¶
func (m *MySQLServerIdentity) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MySQLServerIdentity.
type MySQLServerSKU ¶
type MySQLServerSKU struct { // REQUIRED; The name of the sku, e.g. StandardD32sv3. Name *string // REQUIRED; The tier of the particular SKU, e.g. GeneralPurpose. Tier *ServerSKUTier }
MySQLServerSKU - Billing information related properties of a server.
func (MySQLServerSKU) MarshalJSON ¶
func (m MySQLServerSKU) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MySQLServerSKU.
func (*MySQLServerSKU) UnmarshalJSON ¶
func (m *MySQLServerSKU) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MySQLServerSKU.
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 ¶
MarshalJSON implements the json.Marshaller interface for type Network.
func (*Network) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Network.
type ObjectType ¶
type ObjectType string
ObjectType - Identifies the type of source operation
const ( ObjectTypeBackupAndExportResponse ObjectType = "BackupAndExportResponse" ObjectTypeImportFromStorageResponse ObjectType = "ImportFromStorageResponse" )
func PossibleObjectTypeValues ¶
func PossibleObjectTypeValues() []ObjectType
PossibleObjectTypeValues returns the possible values for the ObjectType const type.
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 ¶
MarshalJSON implements the json.Marshaller interface for type Operation.
func (*Operation) UnmarshalJSON ¶
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 OperationProgressClient ¶
type OperationProgressClient struct {
// contains filtered or unexported fields
}
OperationProgressClient contains the methods for the OperationProgress group. Don't use this type directly, use NewOperationProgressClient() instead.
func NewOperationProgressClient ¶
func NewOperationProgressClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationProgressClient, error)
NewOperationProgressClient creates a new instance of OperationProgressClient with the specified values.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*OperationProgressClient) Get ¶
func (client *OperationProgressClient) Get(ctx context.Context, locationName string, operationID string, options *OperationProgressClientGetOptions) (OperationProgressClientGetResponse, error)
Get - Get the operation result for a long running operation. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-12-30
- locationName - The name of the location.
- operationID - The ID of an ongoing async operation.
- options - OperationProgressClientGetOptions contains the optional parameters for the OperationProgressClient.Get method.
Example (OperationProgressGetBackupAndExport) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/OperationProgress_Get_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) } res, err := clientFactory.NewOperationProgressClient().Get(ctx, "westus", "00000000-0000-0000-0000-000000000000", 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.OperationProgressResult = armmysqlflexibleservers.OperationProgressResult{ // Name: to.Ptr("00000000-0000-0000-0000-000000000000"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforMySQL/locations/westus/operationProgress/00000000-0000-0000-0000-000000000000"), // PercentComplete: to.Ptr[float32](10), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-11-29T07:34:02.328Z"); return t}()), // Status: to.Ptr("InProgress"), // Properties: &armmysqlflexibleservers.BackupAndExportResponseType{ // ObjectType: to.Ptr(armmysqlflexibleservers.ObjectTypeBackupAndExportResponse), // BackupMetadata: to.Ptr("{\"key1\":\"value1\",\"key2\":\"value2\"}"), // DataTransferredInBytes: to.Ptr[int64](102), // DatasourceSizeInBytes: to.Ptr[int64](1024), // }, // }
Output:
Example (OperationProgressGetImportFromStorage) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/OperationProgress_Get_ImportFromStorage.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.NewOperationProgressClient().Get(ctx, "westus", "00000000-0000-0000-0000-000000000000", 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.OperationProgressResult = armmysqlflexibleservers.OperationProgressResult{ // Name: to.Ptr("00000000-0000-0000-0000-000000000000"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforMySQL/locations/westus/operationProgress/00000000-0000-0000-0000-000000000000"), // PercentComplete: to.Ptr[float32](10), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-11-29T07:34:02.328Z"); return t}()), // Status: to.Ptr("InProgress"), // Properties: &armmysqlflexibleservers.ImportFromStorageResponseType{ // ObjectType: to.Ptr(armmysqlflexibleservers.ObjectTypeImportFromStorageResponse), // EstimatedCompletionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-11-29T08:34:02.328Z"); return t}()), // }, // }
Output:
type OperationProgressClientGetOptions ¶
type OperationProgressClientGetOptions struct { }
OperationProgressClientGetOptions contains the optional parameters for the OperationProgressClient.Get method.
type OperationProgressClientGetResponse ¶
type OperationProgressClientGetResponse struct { // Represents Operation Results API Response OperationProgressResult }
OperationProgressClientGetResponse contains the response from method OperationProgressClient.Get.
type OperationProgressResponseType ¶
type OperationProgressResponseType struct { // REQUIRED; Identifies the type of source operation ObjectType *ObjectType }
OperationProgressResponseType - Represents the response properties specific to the operation
func (*OperationProgressResponseType) GetOperationProgressResponseType ¶
func (o *OperationProgressResponseType) GetOperationProgressResponseType() *OperationProgressResponseType
GetOperationProgressResponseType implements the OperationProgressResponseTypeClassification interface for type OperationProgressResponseType.
func (OperationProgressResponseType) MarshalJSON ¶
func (o OperationProgressResponseType) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationProgressResponseType.
func (*OperationProgressResponseType) UnmarshalJSON ¶
func (o *OperationProgressResponseType) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationProgressResponseType.
type OperationProgressResponseTypeClassification ¶
type OperationProgressResponseTypeClassification interface { // GetOperationProgressResponseType returns the OperationProgressResponseType content of the underlying type. GetOperationProgressResponseType() *OperationProgressResponseType }
OperationProgressResponseTypeClassification provides polymorphic access to related types. Call the interface's GetOperationProgressResponseType() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *BackupAndExportResponseType, *ImportFromStorageResponseType, *OperationProgressResponseType
type OperationProgressResult ¶
type OperationProgressResult struct { // REQUIRED; Operation status. Status *string // The end time of the operation. EndTime *time.Time // If present, details of the operation error. Error *ErrorDetail // Fully qualified ID for the async operation. ID *string // Name of the async operation. Name *string // The operations list. Operations []*OperationStatusResult // Percent of the operation that is complete. PercentComplete *float32 // The response properties specific to the operation Properties OperationProgressResponseTypeClassification // The start time of the operation. StartTime *time.Time // READ-ONLY; Fully qualified ID of the resource against which the original async operation was started. ResourceID *string }
OperationProgressResult - Represents Operation Results API Response
func (OperationProgressResult) MarshalJSON ¶
func (o OperationProgressResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationProgressResult.
func (*OperationProgressResult) UnmarshalJSON ¶
func (o *OperationProgressResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationProgressResult.
type OperationResultsClient ¶
type OperationResultsClient struct {
// contains filtered or unexported fields
}
OperationResultsClient contains the methods for the OperationResults group. Don't use this type directly, use NewOperationResultsClient() instead.
func NewOperationResultsClient ¶
func NewOperationResultsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationResultsClient, error)
NewOperationResultsClient creates a new instance of OperationResultsClient with the specified values.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*OperationResultsClient) Get ¶
func (client *OperationResultsClient) Get(ctx context.Context, locationName string, operationID string, options *OperationResultsClientGetOptions) (OperationResultsClientGetResponse, error)
Get - Get the operation result for a long running operation. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-12-30
- locationName - The name of the location.
- operationID - The operation Id.
- options - OperationResultsClientGetOptions contains the optional parameters for the OperationResultsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/OperationResults_Get.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.NewOperationResultsClient().Get(ctx, "westus", "00000000-0000-0000-0000-000000000000", 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.OperationStatusExtendedResult = armmysqlflexibleservers.OperationStatusExtendedResult{ // Name: to.Ptr("00000000-0000-0000-0000-000000000000"), // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-11-29T07:37:05.640Z"); return t}()), // Error: &armmysqlflexibleservers.ErrorDetail{ // Code: to.Ptr("AggregateException"), // Message: to.Ptr("System.AggregateException: One or more errors occurred. (Mismatch in count of number of Commited-Blocks from service.)"), // }, // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforMySQL/locations/westus/operationResults/00000000-0000-0000-0000-000000000000"), // PercentComplete: to.Ptr[float32](0), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-11-29T07:34:02.328Z"); return t}()), // Status: to.Ptr("Failed"), // Properties: map[string]any{ // "backupMetadata": "{\"key1\":\"value1\",\"key2\":\"value2\"}", // "dataTransferredInBytes": float64(0), // "datasourceSizeInBytes": float64(1024), // }, // }
Output:
type OperationResultsClientGetOptions ¶
type OperationResultsClientGetOptions struct { }
OperationResultsClientGetOptions contains the optional parameters for the OperationResultsClient.Get method.
type OperationResultsClientGetResponse ¶
type OperationResultsClientGetResponse struct { // Represents Operation Results API Response OperationStatusExtendedResult }
OperationResultsClientGetResponse contains the response from method OperationResultsClient.Get.
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 OperationStatusExtendedResult ¶
type OperationStatusExtendedResult struct { // REQUIRED; Operation status. Status *string // The end time of the operation. EndTime *time.Time // If present, details of the operation error. Error *ErrorDetail // Fully qualified ID for the async operation. ID *string // Name of the async operation. Name *string // The operations list. Operations []*OperationStatusResult // Percent of the operation that is complete. PercentComplete *float32 // The extended properties of Operation Results Properties map[string]any // The start time of the operation. StartTime *time.Time // READ-ONLY; Fully qualified ID of the resource against which the original async operation was started. ResourceID *string }
OperationStatusExtendedResult - Represents Operation Results API Response
func (OperationStatusExtendedResult) MarshalJSON ¶
func (o OperationStatusExtendedResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationStatusExtendedResult.
func (*OperationStatusExtendedResult) UnmarshalJSON ¶
func (o *OperationStatusExtendedResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationStatusExtendedResult.
type OperationStatusResult ¶
type OperationStatusResult struct { // REQUIRED; Operation status. Status *string // The end time of the operation. EndTime *time.Time // If present, details of the operation error. Error *ErrorDetail // Fully qualified ID for the async operation. ID *string // Name of the async operation. Name *string // The operations list. Operations []*OperationStatusResult // Percent of the operation that is complete. PercentComplete *float32 // The start time of the operation. StartTime *time.Time // READ-ONLY; Fully qualified ID of the resource against which the original async operation was started. ResourceID *string }
OperationStatusResult - The current status of an async operation.
func (OperationStatusResult) MarshalJSON ¶
func (o OperationStatusResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationStatusResult.
func (*OperationStatusResult) UnmarshalJSON ¶
func (o *OperationStatusResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationStatusResult.
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 ¶
func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse]
NewListPager - Lists all of the available REST API operations.
Generated from API version 2023-12-30
- 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/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/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 PrivateEndpoint ¶
type PrivateEndpoint struct { // READ-ONLY; The ARM identifier for private endpoint. ID *string }
PrivateEndpoint - The private endpoint resource.
func (PrivateEndpoint) MarshalJSON ¶
func (p PrivateEndpoint) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateEndpoint.
func (*PrivateEndpoint) UnmarshalJSON ¶
func (p *PrivateEndpoint) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpoint.
type PrivateEndpointConnection ¶
type PrivateEndpointConnection struct { // Resource properties. Properties *PrivateEndpointConnectionProperties // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
PrivateEndpointConnection - The private endpoint connection resource.
func (PrivateEndpointConnection) MarshalJSON ¶
func (p PrivateEndpointConnection) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnection.
func (*PrivateEndpointConnection) UnmarshalJSON ¶
func (p *PrivateEndpointConnection) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnection.
type PrivateEndpointConnectionProperties ¶
type PrivateEndpointConnectionProperties struct { // REQUIRED; A collection of information about the state of the connection between service consumer and provider. PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState // The private endpoint resource. PrivateEndpoint *PrivateEndpoint // READ-ONLY; The group ids for the private endpoint resource. GroupIDs []*string // READ-ONLY; The provisioning state of the private endpoint connection resource. ProvisioningState *PrivateEndpointConnectionProvisioningState }
PrivateEndpointConnectionProperties - Properties of the private endpoint connection.
func (PrivateEndpointConnectionProperties) MarshalJSON ¶
func (p PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionProperties.
func (*PrivateEndpointConnectionProperties) UnmarshalJSON ¶
func (p *PrivateEndpointConnectionProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionProperties.
type PrivateEndpointConnectionProvisioningState ¶
type PrivateEndpointConnectionProvisioningState string
PrivateEndpointConnectionProvisioningState - The current provisioning state.
const ( PrivateEndpointConnectionProvisioningStateCreating PrivateEndpointConnectionProvisioningState = "Creating" PrivateEndpointConnectionProvisioningStateDeleting PrivateEndpointConnectionProvisioningState = "Deleting" PrivateEndpointConnectionProvisioningStateFailed PrivateEndpointConnectionProvisioningState = "Failed" PrivateEndpointConnectionProvisioningStateSucceeded PrivateEndpointConnectionProvisioningState = "Succeeded" )
func PossiblePrivateEndpointConnectionProvisioningStateValues ¶
func PossiblePrivateEndpointConnectionProvisioningStateValues() []PrivateEndpointConnectionProvisioningState
PossiblePrivateEndpointConnectionProvisioningStateValues returns the possible values for the PrivateEndpointConnectionProvisioningState const type.
type PrivateEndpointServiceConnectionStatus ¶
type PrivateEndpointServiceConnectionStatus string
PrivateEndpointServiceConnectionStatus - The private endpoint connection status.
const ( PrivateEndpointServiceConnectionStatusApproved PrivateEndpointServiceConnectionStatus = "Approved" PrivateEndpointServiceConnectionStatusPending PrivateEndpointServiceConnectionStatus = "Pending" PrivateEndpointServiceConnectionStatusRejected PrivateEndpointServiceConnectionStatus = "Rejected" )
func PossiblePrivateEndpointServiceConnectionStatusValues ¶
func PossiblePrivateEndpointServiceConnectionStatusValues() []PrivateEndpointServiceConnectionStatus
PossiblePrivateEndpointServiceConnectionStatusValues returns the possible values for the PrivateEndpointServiceConnectionStatus const type.
type PrivateLinkServiceConnectionState ¶
type PrivateLinkServiceConnectionState struct { // A message indicating if changes on the service provider require any updates on the consumer. ActionsRequired *string // The reason for approval/rejection of the connection. Description *string // Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. Status *PrivateEndpointServiceConnectionStatus }
PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer and provider.
func (PrivateLinkServiceConnectionState) MarshalJSON ¶
func (p PrivateLinkServiceConnectionState) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceConnectionState.
func (*PrivateLinkServiceConnectionState) UnmarshalJSON ¶
func (p *PrivateLinkServiceConnectionState) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServiceConnectionState.
type Provisioning ¶
type Provisioning struct { // The properties of provisioning. Properties *ProvisioningStateProperties // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
Provisioning - Server backup properties
func (Provisioning) MarshalJSON ¶
func (p Provisioning) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type Provisioning.
func (*Provisioning) UnmarshalJSON ¶
func (p *Provisioning) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type Provisioning.
type ProvisioningState ¶
type ProvisioningState string
ProvisioningState - The current provisioning state.
const ( ProvisioningStateCanceled ProvisioningState = "Canceled" ProvisioningStateCreating ProvisioningState = "Creating" ProvisioningStateDeleting ProvisioningState = "Deleting" ProvisioningStateFailed ProvisioningState = "Failed" ProvisioningStateSucceeded ProvisioningState = "Succeeded" )
func PossibleProvisioningStateValues ¶
func PossibleProvisioningStateValues() []ProvisioningState
PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.
type ProvisioningStateProperties ¶
type ProvisioningStateProperties struct { // READ-ONLY; The provisioning state of backup resource. ProvisioningState *ProvisioningState }
ProvisioningStateProperties - The properties of a server backup.
func (ProvisioningStateProperties) MarshalJSON ¶
func (p ProvisioningStateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ProvisioningStateProperties.
func (*ProvisioningStateProperties) UnmarshalJSON ¶
func (p *ProvisioningStateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ProvisioningStateProperties.
type ProxyResource ¶
type ProxyResource struct { // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
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. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*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 2023-12-30
- 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/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/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.MySQLServerSKU{ // Name: to.Ptr("Standard_D2ds_v4"), // Tier: to.Ptr(armmysqlflexibleservers.ServerSKUTierGeneralPurpose), // }, // }, // { // 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.MySQLServerSKU{ // Name: to.Ptr("Standard_D2ds_v4"), // Tier: to.Ptr(armmysqlflexibleservers.ServerSKUTierGeneralPurpose), // }, // }}, // } }
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. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
Resource - Common fields that are returned in the response for all Azure Resource Manager resources
func (Resource) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Resource.
func (*Resource) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Resource.
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 SKUCapabilityV2 ¶
type SKUCapabilityV2 struct { // READ-ONLY; vCore name Name *string // READ-ONLY; Supported high availability mode SupportedHAMode []*string // READ-ONLY; supported IOPS SupportedIops *int64 // READ-ONLY; supported memory per vCore in MB SupportedMemoryPerVCoreMB *int64 // READ-ONLY; Supported zones SupportedZones []*string // READ-ONLY; supported vCores VCores *int64 }
SKUCapabilityV2 - Sku capability
func (SKUCapabilityV2) MarshalJSON ¶
func (s SKUCapabilityV2) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SKUCapabilityV2.
func (*SKUCapabilityV2) UnmarshalJSON ¶
func (s *SKUCapabilityV2) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SKUCapabilityV2.
type Server ¶
type Server struct { // REQUIRED; The geo-location where the resource lives Location *string // The cmk identity for the server. Identity *MySQLServerIdentity // Properties of the server. Properties *ServerProperties // The SKU (pricing tier) of the server. SKU *MySQLServerSKU // Resource tags. Tags map[string]*string // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
Server - Represents a server.
func (Server) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Server.
func (*Server) UnmarshalJSON ¶
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. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
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 ServerBackupPropertiesV2 ¶
type ServerBackupPropertiesV2 struct { // Backup name BackupNameV2 *string BackupType *BackupType // Backup completed time (ISO8601 format). CompletedTime *time.Time // Backup source Source *string // READ-ONLY; The provisioning state of backup resource. ProvisioningState *ProvisioningState }
ServerBackupPropertiesV2 - The properties of a server backup.
func (ServerBackupPropertiesV2) MarshalJSON ¶
func (s ServerBackupPropertiesV2) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerBackupPropertiesV2.
func (*ServerBackupPropertiesV2) UnmarshalJSON ¶
func (s *ServerBackupPropertiesV2) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerBackupPropertiesV2.
type ServerBackupV2 ¶
type ServerBackupV2 struct { // The properties of a server backup. Properties *ServerBackupPropertiesV2 // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
ServerBackupV2 - Server backup properties
func (ServerBackupV2) MarshalJSON ¶
func (s ServerBackupV2) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerBackupV2.
func (*ServerBackupV2) UnmarshalJSON ¶
func (s *ServerBackupV2) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerBackupV2.
type ServerBackupV2ListResult ¶
type ServerBackupV2ListResult struct { // The link used to get the next page of operations. NextLink *string // The list of backups of a server. Value []*ServerBackupV2 }
ServerBackupV2ListResult - A list of server backups.
func (ServerBackupV2ListResult) MarshalJSON ¶
func (s ServerBackupV2ListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerBackupV2ListResult.
func (*ServerBackupV2ListResult) UnmarshalJSON ¶
func (s *ServerBackupV2ListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerBackupV2ListResult.
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 ServerEditionCapabilityV2 ¶
type ServerEditionCapabilityV2 struct { // READ-ONLY; Default Sku name DefaultSKU *string // READ-ONLY; Default storage size DefaultStorageSize *int32 // READ-ONLY; Server edition name Name *string // READ-ONLY; A list of supported Skus SupportedSKUs []*SKUCapabilityV2 // READ-ONLY; A list of supported storage editions SupportedStorageEditions []*StorageEditionCapability }
ServerEditionCapabilityV2 - Server edition capabilities.
func (ServerEditionCapabilityV2) MarshalJSON ¶
func (s ServerEditionCapabilityV2) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerEditionCapabilityV2.
func (*ServerEditionCapabilityV2) UnmarshalJSON ¶
func (s *ServerEditionCapabilityV2) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerEditionCapabilityV2.
type ServerForUpdate ¶
type ServerForUpdate struct { // The cmk identity for the server. Identity *MySQLServerIdentity // The properties that can be updated for a server. Properties *ServerPropertiesForUpdate // The SKU (pricing tier) of the server. SKU *MySQLServerSKU // 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 // Source properties for import from storage. ImportSourceProperties *ImportSourceProperties // 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; PrivateEndpointConnections related properties of a server. PrivateEndpointConnections []*PrivateEndpointConnection // 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 // Network related properties of a server Network *Network // 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 ServerSKUTier ¶
type ServerSKUTier string
ServerSKUTier - The tier of the particular SKU, e.g. GeneralPurpose.
const ( ServerSKUTierBurstable ServerSKUTier = "Burstable" ServerSKUTierGeneralPurpose ServerSKUTier = "GeneralPurpose" ServerSKUTierMemoryOptimized ServerSKUTier = "MemoryOptimized" )
func PossibleServerSKUTierValues ¶
func PossibleServerSKUTierValues() []ServerSKUTier
PossibleServerSKUTierValues returns the possible values for the ServerSKUTier const type.
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 ServerVersionCapabilityV2 ¶
type ServerVersionCapabilityV2 struct { // READ-ONLY; server version Name *string }
ServerVersionCapabilityV2 - Server version capabilities.
func (ServerVersionCapabilityV2) MarshalJSON ¶
func (s ServerVersionCapabilityV2) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerVersionCapabilityV2.
func (*ServerVersionCapabilityV2) UnmarshalJSON ¶
func (s *ServerVersionCapabilityV2) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerVersionCapabilityV2.
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. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*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 2023-12-30
- 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/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/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{ BackupIntervalHours: to.Ptr[int32](24), 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.MySQLServerSKU{ Name: to.Ptr("Standard_D2ds_v4"), Tier: to.Ptr(armmysqlflexibleservers.ServerSKUTierGeneralPurpose), }, }, 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.MySQLServerSKU{ // Name: to.Ptr("Standard_D2ds_v4"), // Tier: to.Ptr(armmysqlflexibleservers.ServerSKUTierGeneralPurpose), // }, // }
Output:
Example (CreateAReplicaServer) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/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.MySQLServerSKU{ // Name: to.Ptr("Standard_D2ds_v4"), // Tier: to.Ptr(armmysqlflexibleservers.ServerSKUTierGeneralPurpose), // }, // }
Output:
Example (CreateAServerAsAPointInTimeRestore) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/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.MySQLServerSKU{ Name: to.Ptr("Standard_D14_v2"), Tier: to.Ptr(armmysqlflexibleservers.ServerSKUTierGeneralPurpose), }, }, 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{ // BackupIntervalHours: to.Ptr[int32](24), // 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.MySQLServerSKU{ // Name: to.Ptr("Standard_D2ds_v4"), // Tier: to.Ptr(armmysqlflexibleservers.ServerSKUTierGeneralPurpose), // }, // }
Output:
Example (CreateAServerWithByok) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/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.MySQLServerIdentity{ 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{ BackupIntervalHours: to.Ptr[int32](24), 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.MySQLServerSKU{ Name: to.Ptr("Standard_D2ds_v4"), Tier: to.Ptr(armmysqlflexibleservers.ServerSKUTierGeneralPurpose), }, }, 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.MySQLServerSKU{ // Name: to.Ptr("Standard_D2ds_v4"), // Tier: to.Ptr(armmysqlflexibleservers.ServerSKUTierGeneralPurpose), // }, // }
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 2023-12-30
- 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/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/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 2023-12-30
- 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/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/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 2023-12-30
- 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/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/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 2023-12-30
- 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/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/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 2023-12-30
- 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/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/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 2023-12-30
- 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/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/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 2023-12-30
- 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/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/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{ Network: &armmysqlflexibleservers.Network{ PublicNetworkAccess: to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled), }, 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{ // BackupIntervalHours: to.Ptr[int32](24), // 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.EnableStatusEnumDisabled), // }, // 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.MySQLServerSKU{ // Name: to.Ptr("Standard_D2ds_v4"), // Tier: to.Ptr(armmysqlflexibleservers.ServerSKUTierGeneralPurpose), // }, // }
Output:
Example (UpdateServerCustomerMaintenanceWindow) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/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{ // BackupIntervalHours: to.Ptr[int32](24), // 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.MySQLServerSKU{ // Name: to.Ptr("Standard_D2ds_v4"), // Tier: to.Ptr(armmysqlflexibleservers.ServerSKUTierGeneralPurpose), // }, // }
Output:
Example (UpdateServerWithByok) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/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.MySQLServerIdentity{ 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{ // BackupIntervalHours: to.Ptr[int32](24), // 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.MySQLServerSKU{ // Name: to.Ptr("Standard_D2ds_v4"), // Tier: to.Ptr(armmysqlflexibleservers.ServerSKUTierGeneralPurpose), // }, // }
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 2023-12-30
- 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/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/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{ // BackupIntervalHours: to.Ptr[int32](24), // 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.MySQLServerSKU{ // Name: to.Ptr("Standard_D2ds_v4"), // Tier: to.Ptr(armmysqlflexibleservers.ServerSKUTierGeneralPurpose), // }, // }
Output:
Example (GetAServerWithVnet) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/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{ // BackupIntervalHours: to.Ptr[int32](24), // 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.MySQLServerSKU{ // Name: to.Ptr("Standard_D2ds_v4"), // Tier: to.Ptr(armmysqlflexibleservers.ServerSKUTierGeneralPurpose), // }, // }
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 2023-12-30
- 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/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/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{ // BackupIntervalHours: to.Ptr[int32](24), // 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.MySQLServerSKU{ // Name: to.Ptr("Standard_B1ms"), // Tier: to.Ptr(armmysqlflexibleservers.ServerSKUTierBurstable), // }, // }, // { // 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{ // BackupIntervalHours: to.Ptr[int32](24), // 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.MySQLServerSKU{ // Name: to.Ptr("Standard_B1ms"), // Tier: to.Ptr(armmysqlflexibleservers.ServerSKUTierBurstable), // }, // }, // { // 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{ // BackupIntervalHours: to.Ptr[int32](24), // 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.MySQLServerSKU{ // Name: to.Ptr("Standard_E2ds_v4"), // Tier: to.Ptr(armmysqlflexibleservers.ServerSKUTierMemoryOptimized), // }, // }}, // } }
Output:
func (*ServersClient) NewListPager ¶
func (client *ServersClient) NewListPager(options *ServersClientListOptions) *runtime.Pager[ServersClientListResponse]
NewListPager - List all the servers in a given subscription.
Generated from API version 2023-12-30
- 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/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/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{ // BackupIntervalHours: to.Ptr[int32](24), // 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.MySQLServerSKU{ // Name: to.Ptr("Standard_B1ms"), // Tier: to.Ptr(armmysqlflexibleservers.ServerSKUTierBurstable), // }, // }, // { // 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{ // BackupIntervalHours: to.Ptr[int32](24), // 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.MySQLServerSKU{ // Name: to.Ptr("Standard_B1ms"), // Tier: to.Ptr(armmysqlflexibleservers.ServerSKUTierBurstable), // }, // }, // { // 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{ // BackupIntervalHours: to.Ptr[int32](24), // 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.MySQLServerSKU{ // Name: to.Ptr("Standard_E2ds_v4"), // Tier: to.Ptr(armmysqlflexibleservers.ServerSKUTierMemoryOptimized), // }, // }}, // } }
Output:
func (*ServersClient) ValidateEstimateHighAvailability ¶
func (client *ServersClient) ValidateEstimateHighAvailability(ctx context.Context, resourceGroupName string, serverName string, parameters HighAvailabilityValidationEstimation, options *ServersClientValidateEstimateHighAvailabilityOptions) (ServersClientValidateEstimateHighAvailabilityResponse, error)
ValidateEstimateHighAvailability - Validate a deployment of high availability. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-12-30
- resourceGroupName - The name of the resource group. The name is case insensitive.
- serverName - The name of the server.
- parameters - The required parameters for validation of high availability deployment.
- options - ServersClientValidateEstimateHighAvailabilityOptions contains the optional parameters for the ServersClient.ValidateEstimateHighAvailability method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerValidateEstimateHighAvailability.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().ValidateEstimateHighAvailability(ctx, "TestGroup", "testserver", armmysqlflexibleservers.HighAvailabilityValidationEstimation{ ExpectedStandbyAvailabilityZone: to.Ptr("1"), }, 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.HighAvailabilityValidationEstimation = armmysqlflexibleservers.HighAvailabilityValidationEstimation{ // EstimatedDowntime: to.Ptr[int32](0), // ExpectedStandbyAvailabilityZone: to.Ptr("1"), // ScheduledStandbyAvailabilityZone: to.Ptr("1"), // }
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 ServersClientValidateEstimateHighAvailabilityOptions ¶
type ServersClientValidateEstimateHighAvailabilityOptions struct { }
ServersClientValidateEstimateHighAvailabilityOptions contains the optional parameters for the ServersClient.ValidateEstimateHighAvailability method.
type ServersClientValidateEstimateHighAvailabilityResponse ¶
type ServersClientValidateEstimateHighAvailabilityResponse struct { // High availability validation properties of a server HighAvailabilityValidationEstimation }
ServersClientValidateEstimateHighAvailabilityResponse contains the response from method ServersClient.ValidateEstimateHighAvailability.
type ServersMigrationClient ¶
type ServersMigrationClient struct {
// contains filtered or unexported fields
}
ServersMigrationClient contains the methods for the ServersMigration group. Don't use this type directly, use NewServersMigrationClient() instead.
func NewServersMigrationClient ¶
func NewServersMigrationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServersMigrationClient, error)
NewServersMigrationClient creates a new instance of ServersMigrationClient with the specified values.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ServersMigrationClient) BeginCutoverMigration ¶
func (client *ServersMigrationClient) BeginCutoverMigration(ctx context.Context, resourceGroupName string, serverName string, options *ServersMigrationClientBeginCutoverMigrationOptions) (*runtime.Poller[ServersMigrationClientCutoverMigrationResponse], error)
BeginCutoverMigration - Cutover migration for MySQL import, it will switch source elastic server DNS to flexible server. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-12-30
- resourceGroupName - The name of the resource group. The name is case insensitive.
- serverName - The name of the server.
- options - ServersMigrationClientBeginCutoverMigrationOptions contains the optional parameters for the ServersMigrationClient.BeginCutoverMigration method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/CutoverMigration.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.NewServersMigrationClient().BeginCutoverMigration(ctx, "testrg", "mysqltestserver", 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.EnableStatusEnumDisabled), // }, // 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.MySQLServerSKU{ // Name: to.Ptr("Standard_D2ds_v4"), // Tier: to.Ptr(armmysqlflexibleservers.ServerSKUTierGeneralPurpose), // }, // }
Output:
type ServersMigrationClientBeginCutoverMigrationOptions ¶
type ServersMigrationClientBeginCutoverMigrationOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServersMigrationClientBeginCutoverMigrationOptions contains the optional parameters for the ServersMigrationClient.BeginCutoverMigration method.
type ServersMigrationClientCutoverMigrationResponse ¶
type ServersMigrationClientCutoverMigrationResponse struct { // Represents a server. Server }
ServersMigrationClientCutoverMigrationResponse contains the response from method ServersMigrationClient.BeginCutoverMigration.
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 ¶
MarshalJSON implements the json.Marshaller interface for type Storage.
func (*Storage) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Storage.
type StorageEditionCapability ¶
type StorageEditionCapability struct { // READ-ONLY; Maximum backup interval hours MaxBackupIntervalHours *int64 // READ-ONLY; Maximum backup retention days MaxBackupRetentionDays *int64 // READ-ONLY; The maximum supported storage size. MaxStorageSize *int64 // READ-ONLY; Minimal backup interval hours MinBackupIntervalHours *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. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
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.
Source Files
¶
- advancedthreatprotectionsettings_client.go
- azureadadministrators_client.go
- backupandexport_client.go
- backups_client.go
- build.go
- checknameavailability_client.go
- checknameavailabilitywithoutlocation_client.go
- checkvirtualnetworksubnetusage_client.go
- client_factory.go
- configurations_client.go
- constants.go
- databases_client.go
- firewallrules_client.go
- getprivatednszonesuffix_client.go
- interfaces.go
- locationbasedcapabilities_client.go
- locationbasedcapabilityset_client.go
- logfiles_client.go
- longrunningbackup_client.go
- longrunningbackups_client.go
- maintenances_client.go
- models.go
- models_serde.go
- operationprogress_client.go
- operationresults_client.go
- operations_client.go
- options.go
- polymorphic_helpers.go
- replicas_client.go
- responses.go
- servers_client.go
- serversmigration_client.go
- time_rfc3339.go