Documentation
¶
Index ¶
- type Backup
- type BackupsClient
- type BackupsClientGetOptions
- type BackupsClientGetResponse
- type BackupsClientListByServerOptions
- type BackupsClientListByServerResponse
- type CapabilitiesListResult
- type CapabilityProperties
- type CheckNameAvailabilityClient
- type CheckNameAvailabilityClientExecuteOptions
- type CheckNameAvailabilityClientExecuteResponse
- type CheckVirtualNetworkSubnetUsageClient
- type CheckVirtualNetworkSubnetUsageClientExecuteOptions
- type CheckVirtualNetworkSubnetUsageClientExecuteResponse
- type ClientFactory
- func (c *ClientFactory) NewBackupsClient() *BackupsClient
- func (c *ClientFactory) NewCheckNameAvailabilityClient() *CheckNameAvailabilityClient
- 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) NewOperationsClient() *OperationsClient
- func (c *ClientFactory) NewReplicasClient() *ReplicasClient
- func (c *ClientFactory) NewServersClient() *ServersClient
- 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) 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 ConfigurationsClientBeginUpdateOptions
- 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 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 GetPrivateDNSZoneSuffixClient
- type GetPrivateDNSZoneSuffixClientExecuteOptions
- type GetPrivateDNSZoneSuffixClientExecuteResponse
- type GetPrivateDNSZoneSuffixResponse
- type HighAvailability
- type HighAvailabilityMode
- type HighAvailabilityState
- type Identity
- type IsConfigPendingRestart
- type IsDynamicConfig
- type IsReadOnly
- type LocationBasedCapabilitiesClient
- type LocationBasedCapabilitiesClientListOptions
- type LocationBasedCapabilitiesClientListResponse
- type MaintenanceWindow
- type NameAvailability
- type NameAvailabilityRequest
- type Network
- type Operation
- type OperationDisplay
- type OperationListResult
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type ProxyResource
- type ReplicasClient
- type ReplicasClientListByServerOptions
- type ReplicasClientListByServerResponse
- type ReplicationRole
- type Resource
- type SKU
- type SKUCapability
- type SKUTier
- type Server
- type ServerBackup
- type ServerBackupListResult
- type ServerBackupProperties
- type ServerEditionCapability
- type ServerForUpdate
- type ServerListResult
- type ServerProperties
- type ServerPropertiesForUpdate
- type ServerRestartParameter
- type ServerState
- type ServerVersion
- type ServerVersionCapability
- 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) 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]
- type ServersClientBeginCreateOptions
- type ServersClientBeginDeleteOptions
- type ServersClientBeginFailoverOptions
- 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 ServersClientRestartResponse
- type ServersClientStartResponse
- type ServersClientStopResponse
- type ServersClientUpdateResponse
- type Storage
- type StorageEditionCapability
- type SystemData
- type TrackedResource
- type UserAssignedIdentity
- type VirtualNetworkSubnetUsageParameter
- type VirtualNetworkSubnetUsageResult
Examples ¶
- BackupsClient.Get
- BackupsClient.NewListByServerPager
- CheckNameAvailabilityClient.Execute
- CheckVirtualNetworkSubnetUsageClient.Execute
- ConfigurationsClient.BeginBatchUpdate
- 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
- OperationsClient.NewListPager
- ReplicasClient.NewListByServerPager
- ServersClient.BeginCreate (CreateANewServer)
- ServersClient.BeginCreate (CreateAReplicaServer)
- ServersClient.BeginCreate (CreateAServerAsAPointInTimeRestore)
- ServersClient.BeginCreate (CreateAServerWithByok)
- ServersClient.BeginDelete
- ServersClient.BeginFailover
- 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
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backup ¶
type Backup struct { // Backup retention days for the server. BackupRetentionDays *int32 // Whether or not geo redundant backup is enabled. GeoRedundantBackup *EnableStatusEnum // READ-ONLY; Earliest restore point creation time (ISO8601 format) EarliestRestoreDate *time.Time }
Backup - Storage Profile properties of a server
func (Backup) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Backup.
func (*Backup) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Backup.
type BackupsClient ¶
type BackupsClient struct {
// contains filtered or unexported fields
}
BackupsClient contains the methods for the Backups group. Don't use this type directly, use NewBackupsClient() instead.
func NewBackupsClient ¶
func NewBackupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BackupsClient, error)
NewBackupsClient creates a new instance of BackupsClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*BackupsClient) Get ¶
func (client *BackupsClient) Get(ctx context.Context, resourceGroupName string, serverName string, backupName string, options *BackupsClientGetOptions) (BackupsClientGetResponse, error)
Get - List all the backups for a given server. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-05-01
- 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/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2021-05-01/examples/BackupGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mysql/armmysqlflexibleservers" ) func main() { 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 ¶ added in v0.6.0
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 2021-05-01
- 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/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2021-05-01/examples/BackupsListByServer.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mysql/armmysqlflexibleservers" ) func main() { 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:
type BackupsClientGetOptions ¶ added in v0.3.0
type BackupsClientGetOptions struct { }
BackupsClientGetOptions contains the optional parameters for the BackupsClient.Get method.
type BackupsClientGetResponse ¶ added in v0.3.0
type BackupsClientGetResponse struct { // Server backup properties ServerBackup }
BackupsClientGetResponse contains the response from method BackupsClient.Get.
type BackupsClientListByServerOptions ¶ added in v0.3.0
type BackupsClientListByServerOptions struct { }
BackupsClientListByServerOptions contains the optional parameters for the BackupsClient.NewListByServerPager method.
type BackupsClientListByServerResponse ¶ added in v0.3.0
type BackupsClientListByServerResponse struct { // A list of server backups. ServerBackupListResult }
BackupsClientListByServerResponse contains the response from method BackupsClient.NewListByServerPager.
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 ¶ added in v1.1.0
func (c *CapabilitiesListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CapabilitiesListResult.
type CapabilityProperties ¶
type CapabilityProperties struct { // READ-ONLY; A list of supported flexible server editions. SupportedFlexibleServerEditions []*ServerEditionCapability // READ-ONLY; supported geo backup regions SupportedGeoBackupRegions []*string // READ-ONLY; Supported high availability mode SupportedHAMode []*string // READ-ONLY; zone name Zone *string }
CapabilityProperties - Location capabilities.
func (CapabilityProperties) MarshalJSON ¶
func (c CapabilityProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CapabilityProperties.
func (*CapabilityProperties) UnmarshalJSON ¶ added in v1.1.0
func (c *CapabilityProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CapabilityProperties.
type CheckNameAvailabilityClient ¶
type CheckNameAvailabilityClient struct {
// contains filtered or unexported fields
}
CheckNameAvailabilityClient contains the methods for the CheckNameAvailability group. Don't use this type directly, use NewCheckNameAvailabilityClient() instead.
func NewCheckNameAvailabilityClient ¶
func NewCheckNameAvailabilityClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CheckNameAvailabilityClient, error)
NewCheckNameAvailabilityClient creates a new instance of CheckNameAvailabilityClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*CheckNameAvailabilityClient) Execute ¶
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 2021-05-01
- 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/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2021-05-01/examples/CheckNameAvailability.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mysql/armmysqlflexibleservers" ) func main() { 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 ¶ added in v0.3.0
type CheckNameAvailabilityClientExecuteOptions struct { }
CheckNameAvailabilityClientExecuteOptions contains the optional parameters for the CheckNameAvailabilityClient.Execute method.
type CheckNameAvailabilityClientExecuteResponse ¶ added in v0.3.0
type CheckNameAvailabilityClientExecuteResponse struct { // Represents a resource name availability. NameAvailability }
CheckNameAvailabilityClientExecuteResponse contains the response from method CheckNameAvailabilityClient.Execute.
type CheckVirtualNetworkSubnetUsageClient ¶
type CheckVirtualNetworkSubnetUsageClient struct {
// contains filtered or unexported fields
}
CheckVirtualNetworkSubnetUsageClient contains the methods for the CheckVirtualNetworkSubnetUsage group. Don't use this type directly, use NewCheckVirtualNetworkSubnetUsageClient() instead.
func NewCheckVirtualNetworkSubnetUsageClient ¶
func NewCheckVirtualNetworkSubnetUsageClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CheckVirtualNetworkSubnetUsageClient, error)
NewCheckVirtualNetworkSubnetUsageClient creates a new instance of CheckVirtualNetworkSubnetUsageClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*CheckVirtualNetworkSubnetUsageClient) Execute ¶
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 2021-05-01
- 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/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2021-05-01/examples/CheckVirtualNetworkSubnetUsage.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mysql/armmysqlflexibleservers" ) func main() { 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), // }}, // } }
Output:
type CheckVirtualNetworkSubnetUsageClientExecuteOptions ¶ added in v0.3.0
type CheckVirtualNetworkSubnetUsageClientExecuteOptions struct { }
CheckVirtualNetworkSubnetUsageClientExecuteOptions contains the optional parameters for the CheckVirtualNetworkSubnetUsageClient.Execute method.
type CheckVirtualNetworkSubnetUsageClientExecuteResponse ¶ added in v0.3.0
type CheckVirtualNetworkSubnetUsageClientExecuteResponse struct { // Virtual network subnet usage data. VirtualNetworkSubnetUsageResult }
CheckVirtualNetworkSubnetUsageClientExecuteResponse contains the response from method CheckVirtualNetworkSubnetUsageClient.Execute.
type ClientFactory ¶ added in v1.1.0
type ClientFactory struct {
// contains filtered or unexported fields
}
ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.
func NewClientFactory ¶ added in v1.1.0
func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)
NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ClientFactory) NewBackupsClient ¶ added in v1.1.0
func (c *ClientFactory) NewBackupsClient() *BackupsClient
NewBackupsClient creates a new instance of BackupsClient.
func (*ClientFactory) NewCheckNameAvailabilityClient ¶ added in v1.1.0
func (c *ClientFactory) NewCheckNameAvailabilityClient() *CheckNameAvailabilityClient
NewCheckNameAvailabilityClient creates a new instance of CheckNameAvailabilityClient.
func (*ClientFactory) NewCheckVirtualNetworkSubnetUsageClient ¶ added in v1.1.0
func (c *ClientFactory) NewCheckVirtualNetworkSubnetUsageClient() *CheckVirtualNetworkSubnetUsageClient
NewCheckVirtualNetworkSubnetUsageClient creates a new instance of CheckVirtualNetworkSubnetUsageClient.
func (*ClientFactory) NewConfigurationsClient ¶ added in v1.1.0
func (c *ClientFactory) NewConfigurationsClient() *ConfigurationsClient
NewConfigurationsClient creates a new instance of ConfigurationsClient.
func (*ClientFactory) NewDatabasesClient ¶ added in v1.1.0
func (c *ClientFactory) NewDatabasesClient() *DatabasesClient
NewDatabasesClient creates a new instance of DatabasesClient.
func (*ClientFactory) NewFirewallRulesClient ¶ added in v1.1.0
func (c *ClientFactory) NewFirewallRulesClient() *FirewallRulesClient
NewFirewallRulesClient creates a new instance of FirewallRulesClient.
func (*ClientFactory) NewGetPrivateDNSZoneSuffixClient ¶ added in v1.1.0
func (c *ClientFactory) NewGetPrivateDNSZoneSuffixClient() *GetPrivateDNSZoneSuffixClient
NewGetPrivateDNSZoneSuffixClient creates a new instance of GetPrivateDNSZoneSuffixClient.
func (*ClientFactory) NewLocationBasedCapabilitiesClient ¶ added in v1.1.0
func (c *ClientFactory) NewLocationBasedCapabilitiesClient() *LocationBasedCapabilitiesClient
NewLocationBasedCapabilitiesClient creates a new instance of LocationBasedCapabilitiesClient.
func (*ClientFactory) NewOperationsClient ¶ added in v1.1.0
func (c *ClientFactory) NewOperationsClient() *OperationsClient
NewOperationsClient creates a new instance of OperationsClient.
func (*ClientFactory) NewReplicasClient ¶ added in v1.1.0
func (c *ClientFactory) NewReplicasClient() *ReplicasClient
NewReplicasClient creates a new instance of ReplicasClient.
func (*ClientFactory) NewServersClient ¶ added in v1.1.0
func (c *ClientFactory) NewServersClient() *ServersClient
NewServersClient creates a new instance of ServersClient.
type Configuration ¶
type Configuration struct { // The properties of a configuration. Properties *ConfigurationProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The system metadata relating to this resource. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
Configuration - Represents a Configuration.
func (Configuration) MarshalJSON ¶
func (c Configuration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type Configuration.
func (*Configuration) UnmarshalJSON ¶ added in v1.1.0
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 ¶ added in v1.1.0
func (c ConfigurationForBatchUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ConfigurationForBatchUpdate.
func (*ConfigurationForBatchUpdate) UnmarshalJSON ¶ added in v1.1.0
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 ¶ added in v1.1.0
func (c ConfigurationForBatchUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ConfigurationForBatchUpdateProperties.
func (*ConfigurationForBatchUpdateProperties) UnmarshalJSON ¶ added in v1.1.0
func (c *ConfigurationForBatchUpdateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationForBatchUpdateProperties.
type ConfigurationListForBatchUpdate ¶
type ConfigurationListForBatchUpdate struct { // 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 ¶ added in v1.1.0
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 ¶ added in v1.1.0
func (c *ConfigurationListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationListResult.
type ConfigurationProperties ¶
type ConfigurationProperties struct { // 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; 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 ¶ added in v1.1.0
func (c ConfigurationProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ConfigurationProperties.
func (*ConfigurationProperties) UnmarshalJSON ¶ added in v1.1.0
func (c *ConfigurationProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationProperties.
type ConfigurationSource ¶
type ConfigurationSource string
ConfigurationSource - Source of the configuration.
const ( ConfigurationSourceSystemDefault ConfigurationSource = "system-default" ConfigurationSourceUserOverride ConfigurationSource = "user-override" )
func PossibleConfigurationSourceValues ¶
func PossibleConfigurationSourceValues() []ConfigurationSource
PossibleConfigurationSourceValues returns the possible values for the ConfigurationSource const type.
type ConfigurationsClient ¶
type ConfigurationsClient struct {
// contains filtered or unexported fields
}
ConfigurationsClient contains the methods for the Configurations group. Don't use this type directly, use NewConfigurationsClient() instead.
func NewConfigurationsClient ¶
func NewConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConfigurationsClient, error)
NewConfigurationsClient creates a new instance of ConfigurationsClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ConfigurationsClient) BeginBatchUpdate ¶
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 2021-05-01
- 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/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2021-05-01/examples/ConfigurationsBatchUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mysql/armmysqlflexibleservers" ) func main() { 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{ 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) BeginUpdate ¶
func (client *ConfigurationsClient) BeginUpdate(ctx context.Context, resourceGroupName string, serverName string, configurationName string, parameters Configuration, options *ConfigurationsClientBeginUpdateOptions) (*runtime.Poller[ConfigurationsClientUpdateResponse], error)
BeginUpdate - Updates a configuration of a server. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-05-01
- 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/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2021-05-01/examples/ConfigurationUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mysql/armmysqlflexibleservers" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewConfigurationsClient().BeginUpdate(ctx, "testrg", "testserver", "event_scheduler", armmysqlflexibleservers.Configuration{ Properties: &armmysqlflexibleservers.ConfigurationProperties{ Source: to.Ptr(armmysqlflexibleservers.ConfigurationSourceUserOverride), Value: to.Ptr("on"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Configuration = armmysqlflexibleservers.Configuration{ // Name: to.Ptr("event_scheduler"), // Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/testserver/configurations/event_scheduler"), // Properties: &armmysqlflexibleservers.ConfigurationProperties{ // Description: to.Ptr("Indicates the status of the Event Scheduler. It is always OFF for a replica server to keep the replication consistency."), // AllowedValues: to.Ptr("ON,OFF"), // DataType: to.Ptr("Enumeration"), // DefaultValue: to.Ptr("OFF"), // IsConfigPendingRestart: to.Ptr(armmysqlflexibleservers.IsConfigPendingRestartFalse), // IsDynamicConfig: to.Ptr(armmysqlflexibleservers.IsDynamicConfigTrue), // IsReadOnly: to.Ptr(armmysqlflexibleservers.IsReadOnlyFalse), // Source: to.Ptr(armmysqlflexibleservers.ConfigurationSourceUserOverride), // Value: to.Ptr("ON"), // }, // } }
Output:
func (*ConfigurationsClient) Get ¶
func (client *ConfigurationsClient) Get(ctx context.Context, resourceGroupName string, serverName string, configurationName string, options *ConfigurationsClientGetOptions) (ConfigurationsClientGetResponse, error)
Get - Gets information about a configuration of server. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-05-01
- 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/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2021-05-01/examples/ConfigurationGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mysql/armmysqlflexibleservers" ) func main() { 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 ¶ added in v0.6.0
func (client *ConfigurationsClient) NewListByServerPager(resourceGroupName string, serverName string, options *ConfigurationsClientListByServerOptions) *runtime.Pager[ConfigurationsClientListByServerResponse]
NewListByServerPager - List all the configurations in a given server.
Generated from API version 2021-05-01
- 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/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2021-05-01/examples/ConfigurationsListByServer.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mysql/armmysqlflexibleservers" ) func main() { 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", 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.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 ¶ added in v0.3.0
type ConfigurationsClientBatchUpdateResponse struct { // A list of server configurations. ConfigurationListResult }
ConfigurationsClientBatchUpdateResponse contains the response from method ConfigurationsClient.BeginBatchUpdate.
type ConfigurationsClientBeginBatchUpdateOptions ¶ added in v0.3.0
type ConfigurationsClientBeginBatchUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ConfigurationsClientBeginBatchUpdateOptions contains the optional parameters for the ConfigurationsClient.BeginBatchUpdate method.
type ConfigurationsClientBeginUpdateOptions ¶ added in v0.3.0
type ConfigurationsClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ConfigurationsClientBeginUpdateOptions contains the optional parameters for the ConfigurationsClient.BeginUpdate method.
type ConfigurationsClientGetOptions ¶ added in v0.3.0
type ConfigurationsClientGetOptions struct { }
ConfigurationsClientGetOptions contains the optional parameters for the ConfigurationsClient.Get method.
type ConfigurationsClientGetResponse ¶ added in v0.3.0
type ConfigurationsClientGetResponse struct { // Represents a Configuration. Configuration }
ConfigurationsClientGetResponse contains the response from method ConfigurationsClient.Get.
type ConfigurationsClientListByServerOptions ¶ added in v0.3.0
type ConfigurationsClientListByServerOptions struct { }
ConfigurationsClientListByServerOptions contains the optional parameters for the ConfigurationsClient.NewListByServerPager method.
type ConfigurationsClientListByServerResponse ¶ added in v0.3.0
type ConfigurationsClientListByServerResponse struct { // A list of server configurations. ConfigurationListResult }
ConfigurationsClientListByServerResponse contains the response from method ConfigurationsClient.NewListByServerPager.
type ConfigurationsClientUpdateResponse ¶ added in v0.3.0
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 ¶ added in v0.4.0
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 ¶ added in v1.1.0
func (d DataEncryption) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DataEncryption.
func (*DataEncryption) UnmarshalJSON ¶ added in v1.1.0
func (d *DataEncryption) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DataEncryption.
type DataEncryptionType ¶ added in v0.4.0
type DataEncryptionType string
DataEncryptionType - The key type, AzureKeyVault for enable cmk, SystemManaged for disable cmk.
const ( DataEncryptionTypeAzureKeyVault DataEncryptionType = "AzureKeyVault" DataEncryptionTypeSystemManaged DataEncryptionType = "SystemManaged" )
func PossibleDataEncryptionTypeValues ¶ added in v0.4.0
func PossibleDataEncryptionTypeValues() []DataEncryptionType
PossibleDataEncryptionTypeValues returns the possible values for the DataEncryptionType const type.
type Database ¶
type Database struct { // The properties of a database. Properties *DatabaseProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The system metadata relating to this resource. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
Database - Represents a Database.
func (Database) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Database.
func (*Database) UnmarshalJSON ¶ added in v1.1.0
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 ¶ added in v1.1.0
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 ¶ added in v1.1.0
func (d DatabaseProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseProperties.
func (*DatabaseProperties) UnmarshalJSON ¶ added in v1.1.0
func (d *DatabaseProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseProperties.
type DatabasesClient ¶
type DatabasesClient struct {
// contains filtered or unexported fields
}
DatabasesClient contains the methods for the Databases group. Don't use this type directly, use NewDatabasesClient() instead.
func NewDatabasesClient ¶
func NewDatabasesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DatabasesClient, error)
NewDatabasesClient creates a new instance of DatabasesClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*DatabasesClient) BeginCreateOrUpdate ¶
func (client *DatabasesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters Database, options *DatabasesClientBeginCreateOrUpdateOptions) (*runtime.Poller[DatabasesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates a new database or updates an existing database. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-05-01
- 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/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2021-05-01/examples/DatabaseCreate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mysql/armmysqlflexibleservers" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDatabasesClient().BeginCreateOrUpdate(ctx, "TestGroup", "testserver", "db1", armmysqlflexibleservers.Database{ Properties: &armmysqlflexibleservers.DatabaseProperties{ Charset: to.Ptr("utf8"), Collation: to.Ptr("utf8_general_ci"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Database = armmysqlflexibleservers.Database{ // Name: to.Ptr("db1"), // Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers/databases"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/testserver/databases/db1"), // Properties: &armmysqlflexibleservers.DatabaseProperties{ // Charset: to.Ptr("utf8"), // Collation: to.Ptr("utf8_general_ci"), // }, // } }
Output:
func (*DatabasesClient) BeginDelete ¶
func (client *DatabasesClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DatabasesClientBeginDeleteOptions) (*runtime.Poller[DatabasesClientDeleteResponse], error)
BeginDelete - Deletes a database. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-05-01
- 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/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2021-05-01/examples/DatabaseDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mysql/armmysqlflexibleservers" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDatabasesClient().BeginDelete(ctx, "TestGroup", "testserver", "db1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*DatabasesClient) Get ¶
func (client *DatabasesClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DatabasesClientGetOptions) (DatabasesClientGetResponse, error)
Get - Gets information about a database. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-05-01
- 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/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2021-05-01/examples/DatabaseGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mysql/armmysqlflexibleservers" ) func main() { 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 ¶ added in v0.6.0
func (client *DatabasesClient) NewListByServerPager(resourceGroupName string, serverName string, options *DatabasesClientListByServerOptions) *runtime.Pager[DatabasesClientListByServerResponse]
NewListByServerPager - List all the databases in a given server.
Generated from API version 2021-05-01
- 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/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2021-05-01/examples/DatabasesListByServer.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mysql/armmysqlflexibleservers" ) func main() { 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 ¶ added in v0.3.0
type DatabasesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DatabasesClientBeginCreateOrUpdateOptions contains the optional parameters for the DatabasesClient.BeginCreateOrUpdate method.
type DatabasesClientBeginDeleteOptions ¶ added in v0.3.0
type DatabasesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DatabasesClientBeginDeleteOptions contains the optional parameters for the DatabasesClient.BeginDelete method.
type DatabasesClientCreateOrUpdateResponse ¶ added in v0.3.0
type DatabasesClientCreateOrUpdateResponse struct { // Represents a Database. Database }
DatabasesClientCreateOrUpdateResponse contains the response from method DatabasesClient.BeginCreateOrUpdate.
type DatabasesClientDeleteResponse ¶ added in v0.3.0
type DatabasesClientDeleteResponse struct { }
DatabasesClientDeleteResponse contains the response from method DatabasesClient.BeginDelete.
type DatabasesClientGetOptions ¶ added in v0.3.0
type DatabasesClientGetOptions struct { }
DatabasesClientGetOptions contains the optional parameters for the DatabasesClient.Get method.
type DatabasesClientGetResponse ¶ added in v0.3.0
type DatabasesClientGetResponse struct { // Represents a Database. Database }
DatabasesClientGetResponse contains the response from method DatabasesClient.Get.
type DatabasesClientListByServerOptions ¶ added in v0.3.0
type DatabasesClientListByServerOptions struct { }
DatabasesClientListByServerOptions contains the optional parameters for the DatabasesClient.NewListByServerPager method.
type DatabasesClientListByServerResponse ¶ added in v0.3.0
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 ¶ added in v1.1.0
func (d DelegatedSubnetUsage) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DelegatedSubnetUsage.
func (*DelegatedSubnetUsage) UnmarshalJSON ¶ added in v1.1.0
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 ¶ added in v1.1.0
func (e ErrorAdditionalInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo.
func (*ErrorAdditionalInfo) UnmarshalJSON ¶ added in v1.1.0
func (e *ErrorAdditionalInfo) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorAdditionalInfo.
type ErrorResponse ¶
type ErrorResponse struct { // READ-ONLY; The error additional info. AdditionalInfo []*ErrorAdditionalInfo // READ-ONLY; The error code. Code *string // READ-ONLY; The error details. Details []*ErrorResponse // READ-ONLY; The error message. Message *string // READ-ONLY; The error target. Target *string }
ErrorResponse - Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.)
func (ErrorResponse) MarshalJSON ¶
func (e ErrorResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorResponse.
func (*ErrorResponse) UnmarshalJSON ¶ added in v1.1.0
func (e *ErrorResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse.
type FirewallRule ¶
type FirewallRule struct { // REQUIRED; The properties of a firewall rule. Properties *FirewallRuleProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The system metadata relating to this resource. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
FirewallRule - Represents a server firewall rule.
func (FirewallRule) MarshalJSON ¶
func (f FirewallRule) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FirewallRule.
func (*FirewallRule) UnmarshalJSON ¶ added in v1.1.0
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 ¶ added in v1.1.0
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 ¶ added in v1.1.0
func (f FirewallRuleProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FirewallRuleProperties.
func (*FirewallRuleProperties) UnmarshalJSON ¶ added in v1.1.0
func (f *FirewallRuleProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type FirewallRuleProperties.
type FirewallRulesClient ¶
type FirewallRulesClient struct {
// contains filtered or unexported fields
}
FirewallRulesClient contains the methods for the FirewallRules group. Don't use this type directly, use NewFirewallRulesClient() instead.
func NewFirewallRulesClient ¶
func NewFirewallRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FirewallRulesClient, error)
NewFirewallRulesClient creates a new instance of FirewallRulesClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*FirewallRulesClient) BeginCreateOrUpdate ¶
func (client *FirewallRulesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string, parameters FirewallRule, options *FirewallRulesClientBeginCreateOrUpdateOptions) (*runtime.Poller[FirewallRulesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates a new firewall rule or updates an existing firewall rule. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-05-01
- 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/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2021-05-01/examples/FirewallRuleCreate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mysql/armmysqlflexibleservers" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewFirewallRulesClient().BeginCreateOrUpdate(ctx, "TestGroup", "testserver", "rule1", armmysqlflexibleservers.FirewallRule{ Properties: &armmysqlflexibleservers.FirewallRuleProperties{ EndIPAddress: to.Ptr("255.255.255.255"), StartIPAddress: to.Ptr("0.0.0.0"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.FirewallRule = armmysqlflexibleservers.FirewallRule{ // Name: to.Ptr("rule1"), // Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers/firewallRules"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/testserver/firewallRules/rule1"), // Properties: &armmysqlflexibleservers.FirewallRuleProperties{ // EndIPAddress: to.Ptr("255.255.255.255"), // StartIPAddress: to.Ptr("0.0.0.0"), // }, // } }
Output:
func (*FirewallRulesClient) BeginDelete ¶
func (client *FirewallRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string, options *FirewallRulesClientBeginDeleteOptions) (*runtime.Poller[FirewallRulesClientDeleteResponse], error)
BeginDelete - Deletes a firewall rule. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-05-01
- 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/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2021-05-01/examples/FirewallRuleDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mysql/armmysqlflexibleservers" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewFirewallRulesClient().BeginDelete(ctx, "TestGroup", "testserver", "rule1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*FirewallRulesClient) Get ¶
func (client *FirewallRulesClient) Get(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string, options *FirewallRulesClientGetOptions) (FirewallRulesClientGetResponse, error)
Get - Gets information about a server firewall rule. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-05-01
- 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/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2021-05-01/examples/FirewallRuleGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mysql/armmysqlflexibleservers" ) func main() { 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 ¶ added in v0.6.0
func (client *FirewallRulesClient) NewListByServerPager(resourceGroupName string, serverName string, options *FirewallRulesClientListByServerOptions) *runtime.Pager[FirewallRulesClientListByServerResponse]
NewListByServerPager - List all the firewall rules in a given server.
Generated from API version 2021-05-01
- 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/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2021-05-01/examples/FirewallRulesListByServer.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mysql/armmysqlflexibleservers" ) func main() { 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 ¶ added in v0.3.0
type FirewallRulesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
FirewallRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the FirewallRulesClient.BeginCreateOrUpdate method.
type FirewallRulesClientBeginDeleteOptions ¶ added in v0.3.0
type FirewallRulesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
FirewallRulesClientBeginDeleteOptions contains the optional parameters for the FirewallRulesClient.BeginDelete method.
type FirewallRulesClientCreateOrUpdateResponse ¶ added in v0.3.0
type FirewallRulesClientCreateOrUpdateResponse struct { // Represents a server firewall rule. FirewallRule }
FirewallRulesClientCreateOrUpdateResponse contains the response from method FirewallRulesClient.BeginCreateOrUpdate.
type FirewallRulesClientDeleteResponse ¶ added in v0.3.0
type FirewallRulesClientDeleteResponse struct { }
FirewallRulesClientDeleteResponse contains the response from method FirewallRulesClient.BeginDelete.
type FirewallRulesClientGetOptions ¶ added in v0.3.0
type FirewallRulesClientGetOptions struct { }
FirewallRulesClientGetOptions contains the optional parameters for the FirewallRulesClient.Get method.
type FirewallRulesClientGetResponse ¶ added in v0.3.0
type FirewallRulesClientGetResponse struct { // Represents a server firewall rule. FirewallRule }
FirewallRulesClientGetResponse contains the response from method FirewallRulesClient.Get.
type FirewallRulesClientListByServerOptions ¶ added in v0.3.0
type FirewallRulesClientListByServerOptions struct { }
FirewallRulesClientListByServerOptions contains the optional parameters for the FirewallRulesClient.NewListByServerPager method.
type FirewallRulesClientListByServerResponse ¶ added in v0.3.0
type FirewallRulesClientListByServerResponse struct { // A list of firewall rules. FirewallRuleListResult }
FirewallRulesClientListByServerResponse contains the response from method FirewallRulesClient.NewListByServerPager.
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 2021-05-01
- 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/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2021-05-01/examples/GetPrivateDnsZoneSuffix.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mysql/armmysqlflexibleservers" ) func main() { 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 ¶ added in v0.3.0
type GetPrivateDNSZoneSuffixClientExecuteOptions struct { }
GetPrivateDNSZoneSuffixClientExecuteOptions contains the optional parameters for the GetPrivateDNSZoneSuffixClient.Execute method.
type GetPrivateDNSZoneSuffixClientExecuteResponse ¶ added in v0.3.0
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 ¶ added in v1.1.0
func (g GetPrivateDNSZoneSuffixResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GetPrivateDNSZoneSuffixResponse.
func (*GetPrivateDNSZoneSuffixResponse) UnmarshalJSON ¶ added in v1.1.0
func (g *GetPrivateDNSZoneSuffixResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GetPrivateDNSZoneSuffixResponse.
type HighAvailability ¶
type HighAvailability struct { // High availability mode for a server. Mode *HighAvailabilityMode // Availability zone of the standby server. StandbyAvailabilityZone *string // READ-ONLY; The state of server high availability. State *HighAvailabilityState }
HighAvailability - Network related properties of a server
func (HighAvailability) MarshalJSON ¶ added in v1.1.0
func (h HighAvailability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type HighAvailability.
func (*HighAvailability) UnmarshalJSON ¶ added in v1.1.0
func (h *HighAvailability) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type HighAvailability.
type HighAvailabilityMode ¶
type HighAvailabilityMode string
HighAvailabilityMode - High availability mode for a server.
const ( HighAvailabilityModeDisabled HighAvailabilityMode = "Disabled" HighAvailabilityModeSameZone HighAvailabilityMode = "SameZone" HighAvailabilityModeZoneRedundant HighAvailabilityMode = "ZoneRedundant" )
func PossibleHighAvailabilityModeValues ¶
func PossibleHighAvailabilityModeValues() []HighAvailabilityMode
PossibleHighAvailabilityModeValues returns the possible values for the HighAvailabilityMode const type.
type HighAvailabilityState ¶
type HighAvailabilityState string
HighAvailabilityState - The state of server high availability.
const ( HighAvailabilityStateCreatingStandby HighAvailabilityState = "CreatingStandby" HighAvailabilityStateFailingOver HighAvailabilityState = "FailingOver" HighAvailabilityStateHealthy HighAvailabilityState = "Healthy" HighAvailabilityStateNotEnabled HighAvailabilityState = "NotEnabled" HighAvailabilityStateRemovingStandby HighAvailabilityState = "RemovingStandby" )
func PossibleHighAvailabilityStateValues ¶
func PossibleHighAvailabilityStateValues() []HighAvailabilityState
PossibleHighAvailabilityStateValues returns the possible values for the HighAvailabilityState const type.
type Identity ¶ added in v0.4.0
type Identity struct { // Type of managed service identity. Type *string // Metadata of user assigned identity. UserAssignedIdentities map[string]any // READ-ONLY; ObjectId from the KeyVault PrincipalID *string // READ-ONLY; TenantId from the KeyVault TenantID *string }
Identity - Properties to configure Identity for Bring your Own Keys
func (Identity) MarshalJSON ¶ added in v0.4.0
MarshalJSON implements the json.Marshaller interface for type Identity.
func (*Identity) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type Identity.
type IsConfigPendingRestart ¶
type IsConfigPendingRestart string
IsConfigPendingRestart - If is the configuration pending restart or not.
const ( IsConfigPendingRestartFalse IsConfigPendingRestart = "False" IsConfigPendingRestartTrue IsConfigPendingRestart = "True" )
func PossibleIsConfigPendingRestartValues ¶
func PossibleIsConfigPendingRestartValues() []IsConfigPendingRestart
PossibleIsConfigPendingRestartValues returns the possible values for the IsConfigPendingRestart const type.
type IsDynamicConfig ¶
type IsDynamicConfig string
IsDynamicConfig - If is the configuration dynamic.
const ( IsDynamicConfigFalse IsDynamicConfig = "False" IsDynamicConfigTrue IsDynamicConfig = "True" )
func PossibleIsDynamicConfigValues ¶
func PossibleIsDynamicConfigValues() []IsDynamicConfig
PossibleIsDynamicConfigValues returns the possible values for the IsDynamicConfig const type.
type IsReadOnly ¶
type IsReadOnly string
IsReadOnly - If is the configuration read only.
const ( IsReadOnlyFalse IsReadOnly = "False" IsReadOnlyTrue IsReadOnly = "True" )
func PossibleIsReadOnlyValues ¶
func PossibleIsReadOnlyValues() []IsReadOnly
PossibleIsReadOnlyValues returns the possible values for the IsReadOnly const type.
type LocationBasedCapabilitiesClient ¶
type LocationBasedCapabilitiesClient struct {
// contains filtered or unexported fields
}
LocationBasedCapabilitiesClient contains the methods for the LocationBasedCapabilities group. Don't use this type directly, use NewLocationBasedCapabilitiesClient() instead.
func NewLocationBasedCapabilitiesClient ¶
func NewLocationBasedCapabilitiesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LocationBasedCapabilitiesClient, error)
NewLocationBasedCapabilitiesClient creates a new instance of LocationBasedCapabilitiesClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*LocationBasedCapabilitiesClient) NewListPager ¶ added in v0.6.0
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 2021-05-01
- 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/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2021-05-01/examples/CapabilitiesByLocationList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mysql/armmysqlflexibleservers" ) func main() { 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 ¶ added in v0.3.0
type LocationBasedCapabilitiesClientListOptions struct { }
LocationBasedCapabilitiesClientListOptions contains the optional parameters for the LocationBasedCapabilitiesClient.NewListPager method.
type LocationBasedCapabilitiesClientListResponse ¶ added in v0.3.0
type LocationBasedCapabilitiesClientListResponse struct { // location capability CapabilitiesListResult }
LocationBasedCapabilitiesClientListResponse contains the response from method LocationBasedCapabilitiesClient.NewListPager.
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 ¶ added in v1.1.0
func (m MaintenanceWindow) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MaintenanceWindow.
func (*MaintenanceWindow) UnmarshalJSON ¶ added in v1.1.0
func (m *MaintenanceWindow) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MaintenanceWindow.
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 ¶ added in v1.1.0
func (n NameAvailability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NameAvailability.
func (*NameAvailability) UnmarshalJSON ¶ added in v1.1.0
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 ¶ added in v1.1.0
func (n NameAvailabilityRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NameAvailabilityRequest.
func (*NameAvailabilityRequest) UnmarshalJSON ¶ added in v1.1.0
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 // READ-ONLY; 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 ¶ added in v1.1.0
MarshalJSON implements the json.Marshaller interface for type Network.
func (*Network) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type Network.
type Operation ¶
type Operation struct { // The localized display information for this particular operation or action. Display *OperationDisplay // The name of the operation being performed on this particular object. Name *string // The intended executor of the operation. Origin *string // Additional descriptions for the operation. Properties map[string]any }
Operation - REST API operation definition.
func (Operation) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Operation.
func (*Operation) UnmarshalJSON ¶ added in v1.1.0
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 ¶ added in v1.1.0
func (o OperationDisplay) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationDisplay.
func (*OperationDisplay) UnmarshalJSON ¶ added in v1.1.0
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 ¶ added in v1.1.0
func (o *OperationListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult.
type OperationsClient ¶
type OperationsClient struct {
// contains filtered or unexported fields
}
OperationsClient contains the methods for the Operations group. Don't use this type directly, use NewOperationsClient() instead.
func NewOperationsClient ¶
func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error)
NewOperationsClient creates a new instance of OperationsClient with the specified values.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*OperationsClient) NewListPager ¶ added in v0.6.0
func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse]
NewListPager - Lists all of the available REST API operations.
Generated from API version 2021-05-01
- options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2021-05-01/examples/OperationsList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mysql/armmysqlflexibleservers" ) func main() { 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 ¶ added in v0.3.0
type OperationsClientListOptions struct { }
OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
type OperationsClientListResponse ¶ added in v0.3.0
type OperationsClientListResponse struct { // A list of resource provider operations. OperationListResult }
OperationsClientListResponse contains the response from method OperationsClient.NewListPager.
type ProxyResource ¶
type ProxyResource struct { // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
ProxyResource - The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location
func (ProxyResource) MarshalJSON ¶ added in v1.1.0
func (p ProxyResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ProxyResource.
func (*ProxyResource) UnmarshalJSON ¶ added in v1.1.0
func (p *ProxyResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResource.
type ReplicasClient ¶
type ReplicasClient struct {
// contains filtered or unexported fields
}
ReplicasClient contains the methods for the Replicas group. Don't use this type directly, use NewReplicasClient() instead.
func NewReplicasClient ¶
func NewReplicasClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReplicasClient, error)
NewReplicasClient creates a new instance of ReplicasClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ReplicasClient) NewListByServerPager ¶ added in v0.6.0
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 2021-05-01
- 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/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2021-05-01/examples/ReplicasListByServer.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mysql/armmysqlflexibleservers" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewReplicasClient().NewListByServerPager("TestGroup", "mysqltestserver", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ServerListResult = armmysqlflexibleservers.ServerListResult{ // Value: []*armmysqlflexibleservers.Server{ // { // Name: to.Ptr("mysqltestserver-repl"), // Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver-repl"), // Location: to.Ptr("Southeast Asia"), // Tags: map[string]*string{ // "num": to.Ptr("1"), // }, // Properties: &armmysqlflexibleservers.ServerProperties{ // AdministratorLogin: to.Ptr("cloudsa"), // AvailabilityZone: to.Ptr("1"), // Backup: &armmysqlflexibleservers.Backup{ // BackupRetentionDays: to.Ptr[int32](7), // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-24T08:19:18.000Z"); return t}()), // GeoRedundantBackup: to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled), // }, // FullyQualifiedDomainName: to.Ptr("mysqltestserver-repl.orcabrci-seas1-a.mscds.com"), // HighAvailability: &armmysqlflexibleservers.HighAvailability{ // Mode: to.Ptr(armmysqlflexibleservers.HighAvailabilityModeDisabled), // State: to.Ptr(armmysqlflexibleservers.HighAvailabilityStateNotEnabled), // }, // Network: &armmysqlflexibleservers.Network{ // PublicNetworkAccess: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled), // }, // ReplicaCapacity: to.Ptr[int32](0), // ReplicationRole: to.Ptr(armmysqlflexibleservers.ReplicationRoleReplica), // SourceServerResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver"), // State: to.Ptr(armmysqlflexibleservers.ServerStateReady), // Storage: &armmysqlflexibleservers.Storage{ // AutoGrow: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled), // Iops: to.Ptr[int32](360), // StorageSizeGB: to.Ptr[int32](20), // StorageSKU: to.Ptr("Premium_LRS"), // }, // Version: to.Ptr(armmysqlflexibleservers.ServerVersionFive7), // }, // SKU: &armmysqlflexibleservers.SKU{ // Name: to.Ptr("Standard_D2ds_v4"), // Tier: to.Ptr(armmysqlflexibleservers.SKUTierGeneralPurpose), // }, // }, // { // Name: to.Ptr("mysqltestserver-repl"), // Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver-repl2"), // Location: to.Ptr("Southeast Asia"), // Tags: map[string]*string{ // "num": to.Ptr("1"), // }, // Properties: &armmysqlflexibleservers.ServerProperties{ // AdministratorLogin: to.Ptr("cloudsa"), // AvailabilityZone: to.Ptr("1"), // Backup: &armmysqlflexibleservers.Backup{ // BackupRetentionDays: to.Ptr[int32](7), // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-23T08:19:18.000Z"); return t}()), // GeoRedundantBackup: to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled), // }, // FullyQualifiedDomainName: to.Ptr("mysqltestserver-repl2.orcabrci-seas1-a.mscds.com"), // HighAvailability: &armmysqlflexibleservers.HighAvailability{ // Mode: to.Ptr(armmysqlflexibleservers.HighAvailabilityModeDisabled), // State: to.Ptr(armmysqlflexibleservers.HighAvailabilityStateNotEnabled), // }, // Network: &armmysqlflexibleservers.Network{ // PublicNetworkAccess: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled), // }, // ReplicaCapacity: to.Ptr[int32](0), // ReplicationRole: to.Ptr(armmysqlflexibleservers.ReplicationRoleReplica), // SourceServerResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver"), // State: to.Ptr(armmysqlflexibleservers.ServerStateReady), // Storage: &armmysqlflexibleservers.Storage{ // AutoGrow: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled), // Iops: to.Ptr[int32](360), // StorageSizeGB: to.Ptr[int32](20), // StorageSKU: to.Ptr("Premium_LRS"), // }, // Version: to.Ptr(armmysqlflexibleservers.ServerVersionFive7), // }, // SKU: &armmysqlflexibleservers.SKU{ // Name: to.Ptr("Standard_D2ds_v4"), // Tier: to.Ptr(armmysqlflexibleservers.SKUTierGeneralPurpose), // }, // }}, // } } }
Output:
type ReplicasClientListByServerOptions ¶ added in v0.3.0
type ReplicasClientListByServerOptions struct { }
ReplicasClientListByServerOptions contains the optional parameters for the ReplicasClient.NewListByServerPager method.
type ReplicasClientListByServerResponse ¶ added in v0.3.0
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 Resource ¶
type Resource struct { // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
Resource - Common fields that are returned in the response for all Azure Resource Manager resources
func (Resource) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Resource.
func (*Resource) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type Resource.
type SKU ¶
type SKU struct { // REQUIRED; The name of the sku, e.g. StandardD32sv3. Name *string // REQUIRED; The tier of the particular SKU, e.g. GeneralPurpose. Tier *SKUTier }
SKU - Billing information related properties of a server.
func (SKU) MarshalJSON ¶ added in v1.1.0
MarshalJSON implements the json.Marshaller interface for type SKU.
func (*SKU) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type SKU.
type SKUCapability ¶
type SKUCapability struct { // READ-ONLY; vCore name Name *string // READ-ONLY; supported IOPS SupportedIops *int64 // READ-ONLY; supported memory per vCore in MB SupportedMemoryPerVCoreMB *int64 // READ-ONLY; supported vCores VCores *int64 }
SKUCapability - Sku capability
func (SKUCapability) MarshalJSON ¶ added in v1.1.0
func (s SKUCapability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SKUCapability.
func (*SKUCapability) UnmarshalJSON ¶ added in v1.1.0
func (s *SKUCapability) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SKUCapability.
type SKUTier ¶
type SKUTier string
SKUTier - The tier of the particular SKU, e.g. GeneralPurpose.
func PossibleSKUTierValues ¶
func PossibleSKUTierValues() []SKUTier
PossibleSKUTierValues returns the possible values for the SKUTier const type.
type Server ¶
type Server struct { // REQUIRED; The geo-location where the resource lives Location *string // The cmk identity for the server. Identity *Identity // Properties of the server. Properties *ServerProperties // The SKU (pricing tier) of the server. SKU *SKU // Resource tags. Tags map[string]*string // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The system metadata relating to this resource. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
Server - Represents a server.
func (Server) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Server.
func (*Server) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type Server.
type ServerBackup ¶
type ServerBackup struct { // The properties of a server backup. Properties *ServerBackupProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The system metadata relating to this resource. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
ServerBackup - Server backup properties
func (ServerBackup) MarshalJSON ¶
func (s ServerBackup) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerBackup.
func (*ServerBackup) UnmarshalJSON ¶ added in v1.1.0
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 ¶ added in v1.1.0
func (s *ServerBackupListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerBackupListResult.
type ServerBackupProperties ¶
type ServerBackupProperties struct { // Backup type. BackupType *string // Backup completed time (ISO8601 format). CompletedTime *time.Time // Backup source Source *string }
ServerBackupProperties - The properties of a server backup.
func (ServerBackupProperties) MarshalJSON ¶
func (s ServerBackupProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerBackupProperties.
func (*ServerBackupProperties) UnmarshalJSON ¶
func (s *ServerBackupProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerBackupProperties.
type ServerEditionCapability ¶
type ServerEditionCapability struct { // READ-ONLY; Server edition name Name *string // READ-ONLY; A list of supported server versions. SupportedServerVersions []*ServerVersionCapability // READ-ONLY; A list of supported storage editions SupportedStorageEditions []*StorageEditionCapability }
ServerEditionCapability - Server edition capabilities.
func (ServerEditionCapability) MarshalJSON ¶
func (s ServerEditionCapability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerEditionCapability.
func (*ServerEditionCapability) UnmarshalJSON ¶ added in v1.1.0
func (s *ServerEditionCapability) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerEditionCapability.
type ServerForUpdate ¶
type ServerForUpdate struct { // The cmk identity for the server. Identity *Identity // The properties that can be updated for a server. Properties *ServerPropertiesForUpdate // The SKU (pricing tier) of the server. SKU *SKU // Application-specific metadata in the form of key-value pairs. Tags map[string]*string }
ServerForUpdate - Parameters allowed to update for a server.
func (ServerForUpdate) MarshalJSON ¶
func (s ServerForUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerForUpdate.
func (*ServerForUpdate) UnmarshalJSON ¶ added in v1.1.0
func (s *ServerForUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerForUpdate.
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 ¶ added in v1.1.0
func (s *ServerListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerListResult.
type ServerProperties ¶
type ServerProperties struct { // The administrator's login name of a server. Can only be specified when the server is being created (and is required for // creation). AdministratorLogin *string // The password of the administrator login (required for server creation). AdministratorLoginPassword *string // availability Zone information of the server. AvailabilityZone *string // Backup related properties of a server. Backup *Backup // The mode to create a new MySQL server. CreateMode *CreateMode // The Data Encryption for CMK. DataEncryption *DataEncryption // High availability related properties of a server. HighAvailability *HighAvailability // Maintenance window of a server. MaintenanceWindow *MaintenanceWindow // Network related properties of a server. Network *Network // The replication role. ReplicationRole *ReplicationRole // Restore point creation time (ISO8601 format), specifying the time to restore from. RestorePointInTime *time.Time // The source MySQL server id. SourceServerResourceID *string // Storage related properties of a server. Storage *Storage // Server version. Version *ServerVersion // READ-ONLY; The fully qualified domain name of a server. FullyQualifiedDomainName *string // READ-ONLY; The maximum number of replicas that a primary server can have. ReplicaCapacity *int32 // READ-ONLY; The state of a server. State *ServerState }
ServerProperties - The properties of a server.
func (ServerProperties) MarshalJSON ¶
func (s ServerProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerProperties.
func (*ServerProperties) UnmarshalJSON ¶
func (s *ServerProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerProperties.
type ServerPropertiesForUpdate ¶
type ServerPropertiesForUpdate struct { // The password of the administrator login. AdministratorLoginPassword *string // Backup related properties of a server. Backup *Backup // The Data Encryption for CMK. DataEncryption *DataEncryption // High availability related properties of a server. HighAvailability *HighAvailability // Maintenance window of a server. MaintenanceWindow *MaintenanceWindow // The replication role of the server. ReplicationRole *ReplicationRole // Storage related properties of a server. Storage *Storage }
ServerPropertiesForUpdate - The properties that can be updated for a server.
func (ServerPropertiesForUpdate) MarshalJSON ¶ added in v1.1.0
func (s ServerPropertiesForUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerPropertiesForUpdate.
func (*ServerPropertiesForUpdate) UnmarshalJSON ¶ added in v1.1.0
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 ¶ added in v1.1.0
func (s ServerRestartParameter) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerRestartParameter.
func (*ServerRestartParameter) UnmarshalJSON ¶ added in v1.1.0
func (s *ServerRestartParameter) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerRestartParameter.
type ServerState ¶
type ServerState string
ServerState - The state of a server.
const ( ServerStateDisabled ServerState = "Disabled" ServerStateDropping ServerState = "Dropping" ServerStateReady ServerState = "Ready" ServerStateStarting ServerState = "Starting" ServerStateStopped ServerState = "Stopped" ServerStateStopping ServerState = "Stopping" ServerStateUpdating ServerState = "Updating" )
func PossibleServerStateValues ¶
func PossibleServerStateValues() []ServerState
PossibleServerStateValues returns the possible values for the ServerState const type.
type ServerVersion ¶
type ServerVersion string
ServerVersion - The version of a server.
const ( ServerVersionEight021 ServerVersion = "8.0.21" ServerVersionFive7 ServerVersion = "5.7" )
func PossibleServerVersionValues ¶
func PossibleServerVersionValues() []ServerVersion
PossibleServerVersionValues returns the possible values for the ServerVersion const type.
type ServerVersionCapability ¶
type ServerVersionCapability struct { // READ-ONLY; server version Name *string // READ-ONLY; A list of supported Skus SupportedSKUs []*SKUCapability }
ServerVersionCapability - Server version capabilities.
func (ServerVersionCapability) MarshalJSON ¶
func (s ServerVersionCapability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerVersionCapability.
func (*ServerVersionCapability) UnmarshalJSON ¶ added in v1.1.0
func (s *ServerVersionCapability) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerVersionCapability.
type ServersClient ¶
type ServersClient struct {
// contains filtered or unexported fields
}
ServersClient contains the methods for the Servers group. Don't use this type directly, use NewServersClient() instead.
func NewServersClient ¶
func NewServersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServersClient, error)
NewServersClient creates a new instance of ServersClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ServersClient) BeginCreate ¶
func (client *ServersClient) BeginCreate(ctx context.Context, resourceGroupName string, serverName string, parameters Server, options *ServersClientBeginCreateOptions) (*runtime.Poller[ServersClientCreateResponse], error)
BeginCreate - Creates a new server or updates an existing server. The update action will overwrite the existing server. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-05-01
- 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/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2021-05-01/examples/ServerCreate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mysql/armmysqlflexibleservers" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServersClient().BeginCreate(ctx, "testrg", "mysqltestserver", armmysqlflexibleservers.Server{ Location: to.Ptr("southeastasia"), Tags: map[string]*string{ "num": to.Ptr("1"), }, Properties: &armmysqlflexibleservers.ServerProperties{ AdministratorLogin: to.Ptr("cloudsa"), AdministratorLoginPassword: to.Ptr("your_password"), AvailabilityZone: to.Ptr("1"), Backup: &armmysqlflexibleservers.Backup{ BackupRetentionDays: to.Ptr[int32](7), GeoRedundantBackup: to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled), }, CreateMode: to.Ptr(armmysqlflexibleservers.CreateModeDefault), HighAvailability: &armmysqlflexibleservers.HighAvailability{ Mode: to.Ptr(armmysqlflexibleservers.HighAvailabilityModeZoneRedundant), StandbyAvailabilityZone: to.Ptr("3"), }, Storage: &armmysqlflexibleservers.Storage{ AutoGrow: to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled), Iops: to.Ptr[int32](600), StorageSizeGB: to.Ptr[int32](100), }, Version: to.Ptr(armmysqlflexibleservers.ServerVersionFive7), }, SKU: &armmysqlflexibleservers.SKU{ Name: to.Ptr("Standard_D2ds_v4"), Tier: to.Ptr(armmysqlflexibleservers.SKUTierGeneralPurpose), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Server = armmysqlflexibleservers.Server{ // Name: to.Ptr("mysqltestserver"), // Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver"), // Location: to.Ptr("Southeast Asia"), // Tags: map[string]*string{ // "num": to.Ptr("1"), // }, // Properties: &armmysqlflexibleservers.ServerProperties{ // AdministratorLogin: to.Ptr("cloudsa"), // AvailabilityZone: to.Ptr("1"), // Backup: &armmysqlflexibleservers.Backup{ // BackupRetentionDays: to.Ptr[int32](7), // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-17T06:11:38.415Z"); return t}()), // GeoRedundantBackup: to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled), // }, // FullyQualifiedDomainName: to.Ptr("mysqltestserver.database.mysql.azure.com"), // HighAvailability: &armmysqlflexibleservers.HighAvailability{ // Mode: to.Ptr(armmysqlflexibleservers.HighAvailabilityModeZoneRedundant), // StandbyAvailabilityZone: to.Ptr("3"), // State: to.Ptr(armmysqlflexibleservers.HighAvailabilityStateHealthy), // }, // MaintenanceWindow: &armmysqlflexibleservers.MaintenanceWindow{ // CustomWindow: to.Ptr("Disabled"), // DayOfWeek: to.Ptr[int32](0), // StartHour: to.Ptr[int32](0), // StartMinute: to.Ptr[int32](0), // }, // Network: &armmysqlflexibleservers.Network{ // PublicNetworkAccess: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled), // }, // ReplicaCapacity: to.Ptr[int32](10), // ReplicationRole: to.Ptr(armmysqlflexibleservers.ReplicationRoleNone), // State: to.Ptr(armmysqlflexibleservers.ServerStateReady), // Storage: &armmysqlflexibleservers.Storage{ // AutoGrow: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled), // Iops: to.Ptr[int32](600), // StorageSizeGB: to.Ptr[int32](100), // StorageSKU: to.Ptr("Premium_LRS"), // }, // Version: to.Ptr(armmysqlflexibleservers.ServerVersionFive7), // }, // SKU: &armmysqlflexibleservers.SKU{ // Name: to.Ptr("Standard_D2ds_v4"), // Tier: to.Ptr(armmysqlflexibleservers.SKUTierGeneralPurpose), // }, // } }
Output:
Example (CreateAReplicaServer) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2021-05-01/examples/ServerCreateReplica.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mysql/armmysqlflexibleservers" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServersClient().BeginCreate(ctx, "testgr", "replica-server", armmysqlflexibleservers.Server{ Location: to.Ptr("SoutheastAsia"), Properties: &armmysqlflexibleservers.ServerProperties{ CreateMode: to.Ptr(armmysqlflexibleservers.CreateModeReplica), SourceServerResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testgr/providers/Microsoft.DBforMySQL/flexibleServers/source-server"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Server = armmysqlflexibleservers.Server{ // Name: to.Ptr("replica-server"), // Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testgr/providers/Microsoft.DBforMySQL/flexibleServers/replica-server"), // Location: to.Ptr("Southeast Asia"), // Tags: map[string]*string{ // "ElasticServer": to.Ptr("1"), // }, // Properties: &armmysqlflexibleservers.ServerProperties{ // AdministratorLogin: to.Ptr("cloudsa"), // AvailabilityZone: to.Ptr("3"), // Backup: &armmysqlflexibleservers.Backup{ // BackupRetentionDays: to.Ptr[int32](7), // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-24T08:19:18.572Z"); return t}()), // GeoRedundantBackup: to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled), // }, // FullyQualifiedDomainName: to.Ptr("replica-server.database.mysql.azure.com"), // HighAvailability: &armmysqlflexibleservers.HighAvailability{ // Mode: to.Ptr(armmysqlflexibleservers.HighAvailabilityModeDisabled), // State: to.Ptr(armmysqlflexibleservers.HighAvailabilityStateNotEnabled), // }, // MaintenanceWindow: &armmysqlflexibleservers.MaintenanceWindow{ // CustomWindow: to.Ptr("Disabled"), // DayOfWeek: to.Ptr[int32](0), // StartHour: to.Ptr[int32](0), // StartMinute: to.Ptr[int32](0), // }, // Network: &armmysqlflexibleservers.Network{ // PublicNetworkAccess: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled), // }, // ReplicaCapacity: to.Ptr[int32](0), // ReplicationRole: to.Ptr(armmysqlflexibleservers.ReplicationRoleReplica), // SourceServerResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testgr/providers/Microsoft.DBforMySQL/flexibleServers/source-server"), // State: to.Ptr(armmysqlflexibleservers.ServerStateReady), // Storage: &armmysqlflexibleservers.Storage{ // AutoGrow: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled), // Iops: to.Ptr[int32](360), // StorageSizeGB: to.Ptr[int32](20), // StorageSKU: to.Ptr("Premium_LRS"), // }, // Version: to.Ptr(armmysqlflexibleservers.ServerVersionFive7), // }, // SKU: &armmysqlflexibleservers.SKU{ // Name: to.Ptr("Standard_D2ds_v4"), // Tier: to.Ptr(armmysqlflexibleservers.SKUTierGeneralPurpose), // }, // } }
Output:
Example (CreateAServerAsAPointInTimeRestore) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2021-05-01/examples/ServerCreateWithPointInTimeRestore.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mysql/armmysqlflexibleservers" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServersClient().BeginCreate(ctx, "TargetResourceGroup", "targetserver", armmysqlflexibleservers.Server{ Location: to.Ptr("SoutheastAsia"), Tags: map[string]*string{ "num": to.Ptr("1"), }, Properties: &armmysqlflexibleservers.ServerProperties{ CreateMode: to.Ptr(armmysqlflexibleservers.CreateModePointInTimeRestore), RestorePointInTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-24T00:00:37.467Z"); return t }()), SourceServerResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/SourceResourceGroup/providers/Microsoft.DBforMySQL/flexibleServers/sourceserver"), }, SKU: &armmysqlflexibleservers.SKU{ Name: to.Ptr("Standard_D14_v2"), Tier: to.Ptr(armmysqlflexibleservers.SKUTierGeneralPurpose), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Server = armmysqlflexibleservers.Server{ // Name: to.Ptr("targetserver"), // Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TargetResourceGroup/providers/Microsoft.DBforMySQL/flexibleServers/targetserver"), // Location: to.Ptr("Southeast Asia"), // Tags: map[string]*string{ // "num": to.Ptr("1"), // }, // Properties: &armmysqlflexibleservers.ServerProperties{ // AdministratorLogin: to.Ptr("adminuser"), // AvailabilityZone: to.Ptr("1"), // Backup: &armmysqlflexibleservers.Backup{ // BackupRetentionDays: to.Ptr[int32](7), // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-24T00:15:24.000Z"); return t}()), // GeoRedundantBackup: to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled), // }, // FullyQualifiedDomainName: to.Ptr("targetserver.database.mysql.azure.com"), // HighAvailability: &armmysqlflexibleservers.HighAvailability{ // Mode: to.Ptr(armmysqlflexibleservers.HighAvailabilityModeDisabled), // State: to.Ptr(armmysqlflexibleservers.HighAvailabilityStateNotEnabled), // }, // MaintenanceWindow: &armmysqlflexibleservers.MaintenanceWindow{ // CustomWindow: to.Ptr("Disabled"), // DayOfWeek: to.Ptr[int32](0), // StartHour: to.Ptr[int32](0), // StartMinute: to.Ptr[int32](0), // }, // Network: &armmysqlflexibleservers.Network{ // PublicNetworkAccess: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled), // }, // ReplicaCapacity: to.Ptr[int32](10), // ReplicationRole: to.Ptr(armmysqlflexibleservers.ReplicationRoleNone), // State: to.Ptr(armmysqlflexibleservers.ServerStateReady), // Storage: &armmysqlflexibleservers.Storage{ // AutoGrow: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled), // Iops: to.Ptr[int32](360), // StorageSizeGB: to.Ptr[int32](20), // StorageSKU: to.Ptr("Premium_LRS"), // }, // Version: to.Ptr(armmysqlflexibleservers.ServerVersionFive7), // }, // SKU: &armmysqlflexibleservers.SKU{ // Name: to.Ptr("Standard_D2ds_v4"), // Tier: to.Ptr(armmysqlflexibleservers.SKUTierGeneralPurpose), // }, // } }
Output:
Example (CreateAServerWithByok) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2021-05-01/examples/ServerCreateWithBYOK.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mysql/armmysqlflexibleservers" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServersClient().BeginCreate(ctx, "testrg", "mysqltestserver", armmysqlflexibleservers.Server{ Location: to.Ptr("southeastasia"), Tags: map[string]*string{ "num": to.Ptr("1"), }, Identity: &armmysqlflexibleservers.Identity{ Type: to.Ptr("UserAssigned"), UserAssignedIdentities: map[string]any{ "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-identity": map[string]any{}, }, }, Properties: &armmysqlflexibleservers.ServerProperties{ AdministratorLogin: to.Ptr("cloudsa"), AdministratorLoginPassword: to.Ptr("your_password"), AvailabilityZone: to.Ptr("1"), Backup: &armmysqlflexibleservers.Backup{ BackupRetentionDays: to.Ptr[int32](7), GeoRedundantBackup: to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled), }, CreateMode: to.Ptr(armmysqlflexibleservers.CreateModeDefault), DataEncryption: &armmysqlflexibleservers.DataEncryption{ Type: to.Ptr(armmysqlflexibleservers.DataEncryptionTypeAzureKeyVault), GeoBackupKeyURI: to.Ptr("https://test-geo.vault.azure.net/keys/key/c8a92236622244c0a4fdb892666f671a"), GeoBackupUserAssignedIdentityID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-geo-identity"), PrimaryKeyURI: to.Ptr("https://test.vault.azure.net/keys/key/c8a92236622244c0a4fdb892666f671a"), PrimaryUserAssignedIdentityID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-identity"), }, HighAvailability: &armmysqlflexibleservers.HighAvailability{ Mode: to.Ptr(armmysqlflexibleservers.HighAvailabilityModeZoneRedundant), StandbyAvailabilityZone: to.Ptr("3"), }, Storage: &armmysqlflexibleservers.Storage{ AutoGrow: to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled), Iops: to.Ptr[int32](600), StorageSizeGB: to.Ptr[int32](100), }, Version: to.Ptr(armmysqlflexibleservers.ServerVersionFive7), }, SKU: &armmysqlflexibleservers.SKU{ Name: to.Ptr("Standard_D2ds_v4"), Tier: to.Ptr(armmysqlflexibleservers.SKUTierGeneralPurpose), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Server = armmysqlflexibleservers.Server{ // Name: to.Ptr("mysqltestserver"), // Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver"), // Location: to.Ptr("Southeast Asia"), // Tags: map[string]*string{ // "num": to.Ptr("1"), // }, // Properties: &armmysqlflexibleservers.ServerProperties{ // AdministratorLogin: to.Ptr("cloudsa"), // AvailabilityZone: to.Ptr("1"), // Backup: &armmysqlflexibleservers.Backup{ // BackupRetentionDays: to.Ptr[int32](7), // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-17T06:11:38.415Z"); return t}()), // GeoRedundantBackup: to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled), // }, // FullyQualifiedDomainName: to.Ptr("mysqltestserver.database.mysql.azure.com"), // HighAvailability: &armmysqlflexibleservers.HighAvailability{ // Mode: to.Ptr(armmysqlflexibleservers.HighAvailabilityModeZoneRedundant), // StandbyAvailabilityZone: to.Ptr("3"), // State: to.Ptr(armmysqlflexibleservers.HighAvailabilityStateHealthy), // }, // MaintenanceWindow: &armmysqlflexibleservers.MaintenanceWindow{ // CustomWindow: to.Ptr("Disabled"), // DayOfWeek: to.Ptr[int32](0), // StartHour: to.Ptr[int32](0), // StartMinute: to.Ptr[int32](0), // }, // Network: &armmysqlflexibleservers.Network{ // PublicNetworkAccess: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled), // }, // ReplicaCapacity: to.Ptr[int32](10), // ReplicationRole: to.Ptr(armmysqlflexibleservers.ReplicationRoleNone), // State: to.Ptr(armmysqlflexibleservers.ServerStateReady), // Storage: &armmysqlflexibleservers.Storage{ // AutoGrow: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled), // Iops: to.Ptr[int32](600), // StorageSizeGB: to.Ptr[int32](100), // StorageSKU: to.Ptr("Premium_LRS"), // }, // Version: to.Ptr(armmysqlflexibleservers.ServerVersionFive7), // }, // SKU: &armmysqlflexibleservers.SKU{ // Name: to.Ptr("Standard_D2ds_v4"), // Tier: to.Ptr(armmysqlflexibleservers.SKUTierGeneralPurpose), // }, // } }
Output:
func (*ServersClient) BeginDelete ¶
func (client *ServersClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, options *ServersClientBeginDeleteOptions) (*runtime.Poller[ServersClientDeleteResponse], error)
BeginDelete - Deletes a server. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-05-01
- 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/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2021-05-01/examples/ServerDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mysql/armmysqlflexibleservers" ) func main() { 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 2021-05-01
- 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/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2021-05-01/examples/ServerFailover.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mysql/armmysqlflexibleservers" ) func main() { 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) 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 2021-05-01
- 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/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2021-05-01/examples/ServerRestart.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mysql/armmysqlflexibleservers" ) func main() { 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 2021-05-01
- 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/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2021-05-01/examples/ServerStart.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mysql/armmysqlflexibleservers" ) func main() { 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 2021-05-01
- 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/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2021-05-01/examples/ServerStop.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mysql/armmysqlflexibleservers" ) func main() { 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 2021-05-01
- 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/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2021-05-01/examples/ServerUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mysql/armmysqlflexibleservers" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServersClient().BeginUpdate(ctx, "testrg", "mysqltestserver", armmysqlflexibleservers.ServerForUpdate{ Properties: &armmysqlflexibleservers.ServerPropertiesForUpdate{ Storage: &armmysqlflexibleservers.Storage{ AutoGrow: to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled), Iops: to.Ptr[int32](200), StorageSizeGB: to.Ptr[int32](30), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Server = armmysqlflexibleservers.Server{ // Name: to.Ptr("mysqltestserver"), // Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver"), // Location: to.Ptr("Southeast Asia"), // Tags: map[string]*string{ // "num": to.Ptr("1"), // }, // Properties: &armmysqlflexibleservers.ServerProperties{ // AdministratorLogin: to.Ptr("cloudsa"), // AvailabilityZone: to.Ptr("3"), // Backup: &armmysqlflexibleservers.Backup{ // BackupRetentionDays: to.Ptr[int32](7), // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-17T06:11:38.415Z"); return t}()), // GeoRedundantBackup: to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled), // }, // FullyQualifiedDomainName: to.Ptr("mysqltestserver.database.mysql.azure.com"), // HighAvailability: &armmysqlflexibleservers.HighAvailability{ // Mode: to.Ptr(armmysqlflexibleservers.HighAvailabilityModeDisabled), // State: to.Ptr(armmysqlflexibleservers.HighAvailabilityStateNotEnabled), // }, // MaintenanceWindow: &armmysqlflexibleservers.MaintenanceWindow{ // CustomWindow: to.Ptr("Enabled"), // DayOfWeek: to.Ptr[int32](1), // StartHour: to.Ptr[int32](1), // StartMinute: to.Ptr[int32](0), // }, // Network: &armmysqlflexibleservers.Network{ // PublicNetworkAccess: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled), // }, // ReplicaCapacity: to.Ptr[int32](10), // ReplicationRole: to.Ptr(armmysqlflexibleservers.ReplicationRoleNone), // State: to.Ptr(armmysqlflexibleservers.ServerStateReady), // Storage: &armmysqlflexibleservers.Storage{ // AutoGrow: to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled), // Iops: to.Ptr[int32](200), // StorageSizeGB: to.Ptr[int32](30), // StorageSKU: to.Ptr("Premium_LRS"), // }, // Version: to.Ptr(armmysqlflexibleservers.ServerVersionFive7), // }, // SKU: &armmysqlflexibleservers.SKU{ // Name: to.Ptr("Standard_D2ds_v4"), // Tier: to.Ptr(armmysqlflexibleservers.SKUTierGeneralPurpose), // }, // } }
Output:
Example (UpdateServerCustomerMaintenanceWindow) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2021-05-01/examples/ServerUpdateWithCustomerMaintenanceWindow.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mysql/armmysqlflexibleservers" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServersClient().BeginUpdate(ctx, "testrg", "mysqltestserver", armmysqlflexibleservers.ServerForUpdate{ Properties: &armmysqlflexibleservers.ServerPropertiesForUpdate{ MaintenanceWindow: &armmysqlflexibleservers.MaintenanceWindow{ CustomWindow: to.Ptr("Enabled"), DayOfWeek: to.Ptr[int32](1), StartHour: to.Ptr[int32](8), StartMinute: to.Ptr[int32](0), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Server = armmysqlflexibleservers.Server{ // Name: to.Ptr("mysqltestserver"), // Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver"), // Location: to.Ptr("Southeast Asia"), // Tags: map[string]*string{ // "num": to.Ptr("1"), // }, // Properties: &armmysqlflexibleservers.ServerProperties{ // AdministratorLogin: to.Ptr("cloudsa"), // AvailabilityZone: to.Ptr("3"), // Backup: &armmysqlflexibleservers.Backup{ // BackupRetentionDays: to.Ptr[int32](7), // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-17T06:11:38.415Z"); return t}()), // GeoRedundantBackup: to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled), // }, // FullyQualifiedDomainName: to.Ptr("mysqltestserver.database.mysql.azure.com"), // HighAvailability: &armmysqlflexibleservers.HighAvailability{ // Mode: to.Ptr(armmysqlflexibleservers.HighAvailabilityModeDisabled), // State: to.Ptr(armmysqlflexibleservers.HighAvailabilityStateNotEnabled), // }, // MaintenanceWindow: &armmysqlflexibleservers.MaintenanceWindow{ // CustomWindow: to.Ptr("Enabled"), // DayOfWeek: to.Ptr[int32](1), // StartHour: to.Ptr[int32](8), // StartMinute: to.Ptr[int32](0), // }, // Network: &armmysqlflexibleservers.Network{ // PublicNetworkAccess: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled), // }, // ReplicaCapacity: to.Ptr[int32](10), // ReplicationRole: to.Ptr(armmysqlflexibleservers.ReplicationRoleNone), // State: to.Ptr(armmysqlflexibleservers.ServerStateReady), // Storage: &armmysqlflexibleservers.Storage{ // AutoGrow: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled), // Iops: to.Ptr[int32](600), // StorageSizeGB: to.Ptr[int32](100), // StorageSKU: to.Ptr("Premium_LRS"), // }, // Version: to.Ptr(armmysqlflexibleservers.ServerVersionFive7), // }, // SKU: &armmysqlflexibleservers.SKU{ // Name: to.Ptr("Standard_D2ds_v4"), // Tier: to.Ptr(armmysqlflexibleservers.SKUTierGeneralPurpose), // }, // } }
Output:
Example (UpdateServerWithByok) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2021-05-01/examples/ServerUpdateWithBYOK.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mysql/armmysqlflexibleservers" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServersClient().BeginUpdate(ctx, "testrg", "mysqltestserver", armmysqlflexibleservers.ServerForUpdate{ Identity: &armmysqlflexibleservers.Identity{ Type: to.Ptr("UserAssigned"), UserAssignedIdentities: map[string]any{ "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-identity": map[string]any{}, }, }, Properties: &armmysqlflexibleservers.ServerPropertiesForUpdate{ DataEncryption: &armmysqlflexibleservers.DataEncryption{ Type: to.Ptr(armmysqlflexibleservers.DataEncryptionTypeAzureKeyVault), GeoBackupKeyURI: to.Ptr("https://test-geo.vault.azure.net/keys/key/c8a92236622244c0a4fdb892666f671a"), GeoBackupUserAssignedIdentityID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-geo-identity"), PrimaryKeyURI: to.Ptr("https://test.vault.azure.net/keys/key/c8a92236622244c0a4fdb892666f671a"), PrimaryUserAssignedIdentityID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-identity"), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Server = armmysqlflexibleservers.Server{ // Name: to.Ptr("mysqltestserver"), // Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver"), // Location: to.Ptr("Southeast Asia"), // Tags: map[string]*string{ // "num": to.Ptr("1"), // }, // Properties: &armmysqlflexibleservers.ServerProperties{ // AdministratorLogin: to.Ptr("cloudsa"), // AvailabilityZone: to.Ptr("1"), // Backup: &armmysqlflexibleservers.Backup{ // BackupRetentionDays: to.Ptr[int32](7), // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-17T06:11:38.415Z"); return t}()), // GeoRedundantBackup: to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled), // }, // FullyQualifiedDomainName: to.Ptr("mysqltestserver.database.mysql.azure.com"), // HighAvailability: &armmysqlflexibleservers.HighAvailability{ // Mode: to.Ptr(armmysqlflexibleservers.HighAvailabilityModeZoneRedundant), // StandbyAvailabilityZone: to.Ptr("3"), // State: to.Ptr(armmysqlflexibleservers.HighAvailabilityStateHealthy), // }, // MaintenanceWindow: &armmysqlflexibleservers.MaintenanceWindow{ // CustomWindow: to.Ptr("Disabled"), // DayOfWeek: to.Ptr[int32](0), // StartHour: to.Ptr[int32](0), // StartMinute: to.Ptr[int32](0), // }, // Network: &armmysqlflexibleservers.Network{ // PublicNetworkAccess: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled), // }, // ReplicaCapacity: to.Ptr[int32](10), // ReplicationRole: to.Ptr(armmysqlflexibleservers.ReplicationRoleNone), // State: to.Ptr(armmysqlflexibleservers.ServerStateReady), // Storage: &armmysqlflexibleservers.Storage{ // AutoGrow: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled), // Iops: to.Ptr[int32](600), // StorageSizeGB: to.Ptr[int32](100), // StorageSKU: to.Ptr("Premium_LRS"), // }, // Version: to.Ptr(armmysqlflexibleservers.ServerVersionFive7), // }, // SKU: &armmysqlflexibleservers.SKU{ // Name: to.Ptr("Standard_D2ds_v4"), // Tier: to.Ptr(armmysqlflexibleservers.SKUTierGeneralPurpose), // }, // } }
Output:
func (*ServersClient) Get ¶
func (client *ServersClient) Get(ctx context.Context, resourceGroupName string, serverName string, options *ServersClientGetOptions) (ServersClientGetResponse, error)
Get - Gets information about a server. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-05-01
- 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/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2021-05-01/examples/ServerGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mysql/armmysqlflexibleservers" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewServersClient().Get(ctx, "testrg", "mysqltestserver", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Server = armmysqlflexibleservers.Server{ // Name: to.Ptr("mysqltestserver"), // Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver"), // Location: to.Ptr("Southeast Asia"), // Tags: map[string]*string{ // "num": to.Ptr("1"), // }, // Properties: &armmysqlflexibleservers.ServerProperties{ // AdministratorLogin: to.Ptr("cloudsa"), // AvailabilityZone: to.Ptr("3"), // Backup: &armmysqlflexibleservers.Backup{ // BackupRetentionDays: to.Ptr[int32](7), // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-17T06:11:38.415Z"); return t}()), // GeoRedundantBackup: to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled), // }, // FullyQualifiedDomainName: to.Ptr("mysqltestserver.database.mysql.azure.com"), // HighAvailability: &armmysqlflexibleservers.HighAvailability{ // Mode: to.Ptr(armmysqlflexibleservers.HighAvailabilityModeDisabled), // State: to.Ptr(armmysqlflexibleservers.HighAvailabilityStateNotEnabled), // }, // MaintenanceWindow: &armmysqlflexibleservers.MaintenanceWindow{ // CustomWindow: to.Ptr("Enabled"), // DayOfWeek: to.Ptr[int32](1), // StartHour: to.Ptr[int32](1), // StartMinute: to.Ptr[int32](0), // }, // Network: &armmysqlflexibleservers.Network{ // PublicNetworkAccess: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled), // }, // ReplicaCapacity: to.Ptr[int32](10), // ReplicationRole: to.Ptr(armmysqlflexibleservers.ReplicationRoleNone), // State: to.Ptr(armmysqlflexibleservers.ServerStateReady), // Storage: &armmysqlflexibleservers.Storage{ // AutoGrow: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled), // Iops: to.Ptr[int32](600), // StorageSizeGB: to.Ptr[int32](100), // StorageSKU: to.Ptr("Premium_LRS"), // }, // Version: to.Ptr(armmysqlflexibleservers.ServerVersionFive7), // }, // SKU: &armmysqlflexibleservers.SKU{ // Name: to.Ptr("Standard_D2ds_v4"), // Tier: to.Ptr(armmysqlflexibleservers.SKUTierGeneralPurpose), // }, // } }
Output:
Example (GetAServerWithVnet) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2021-05-01/examples/ServerGetWithVnet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mysql/armmysqlflexibleservers" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewServersClient().Get(ctx, "testrg", "mysqltestserver", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Server = armmysqlflexibleservers.Server{ // Name: to.Ptr("mysqltestserver"), // Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver"), // Location: to.Ptr("Southeast Asia"), // Tags: map[string]*string{ // "num": to.Ptr("1"), // }, // Properties: &armmysqlflexibleservers.ServerProperties{ // AdministratorLogin: to.Ptr("cloudsa"), // AvailabilityZone: to.Ptr("3"), // Backup: &armmysqlflexibleservers.Backup{ // BackupRetentionDays: to.Ptr[int32](7), // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-17T06:11:38.415Z"); return t}()), // GeoRedundantBackup: to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled), // }, // FullyQualifiedDomainName: to.Ptr("mysqltestserver.database.mysql.azure.com"), // HighAvailability: &armmysqlflexibleservers.HighAvailability{ // Mode: to.Ptr(armmysqlflexibleservers.HighAvailabilityModeDisabled), // State: to.Ptr(armmysqlflexibleservers.HighAvailabilityStateNotEnabled), // }, // MaintenanceWindow: &armmysqlflexibleservers.MaintenanceWindow{ // CustomWindow: to.Ptr("Disabled"), // DayOfWeek: to.Ptr[int32](0), // StartHour: to.Ptr[int32](0), // StartMinute: to.Ptr[int32](0), // }, // Network: &armmysqlflexibleservers.Network{ // DelegatedSubnetResourceID: to.Ptr("/subscriptions/2941a09d-7bcf-42fe-91ca-1765f521c829/resourceGroups/OrcabrCI-Vnet-Resource-Group/providers/Microsoft.Network/virtualNetworks/OrcabrCI-Vnet/subnets/mysql-subnet"), // PublicNetworkAccess: to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled), // }, // ReplicaCapacity: to.Ptr[int32](10), // ReplicationRole: to.Ptr(armmysqlflexibleservers.ReplicationRoleNone), // State: to.Ptr(armmysqlflexibleservers.ServerStateReady), // Storage: &armmysqlflexibleservers.Storage{ // AutoGrow: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled), // Iops: to.Ptr[int32](600), // StorageSizeGB: to.Ptr[int32](100), // StorageSKU: to.Ptr("Premium_LRS"), // }, // Version: to.Ptr(armmysqlflexibleservers.ServerVersionFive7), // }, // SKU: &armmysqlflexibleservers.SKU{ // Name: to.Ptr("Standard_D2ds_v4"), // Tier: to.Ptr(armmysqlflexibleservers.SKUTierGeneralPurpose), // }, // } }
Output:
func (*ServersClient) NewListByResourceGroupPager ¶ added in v0.6.0
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 2021-05-01
- 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/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2021-05-01/examples/ServersListByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mysql/armmysqlflexibleservers" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewServersClient().NewListByResourceGroupPager("TestGroup", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ServerListResult = armmysqlflexibleservers.ServerListResult{ // Value: []*armmysqlflexibleservers.Server{ // { // Name: to.Ptr("mysqltestserver1"), // Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver1"), // Location: to.Ptr("Southeast Asia"), // Tags: map[string]*string{ // "num": to.Ptr("1"), // }, // Properties: &armmysqlflexibleservers.ServerProperties{ // AdministratorLogin: to.Ptr("cloudsa"), // AvailabilityZone: to.Ptr("1"), // Backup: &armmysqlflexibleservers.Backup{ // BackupRetentionDays: to.Ptr[int32](7), // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-17T07:08:17.425Z"); return t}()), // GeoRedundantBackup: to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled), // }, // FullyQualifiedDomainName: to.Ptr("mysqltestserver1.database.mysql.azure.com"), // HighAvailability: &armmysqlflexibleservers.HighAvailability{ // Mode: to.Ptr(armmysqlflexibleservers.HighAvailabilityModeDisabled), // State: to.Ptr(armmysqlflexibleservers.HighAvailabilityStateNotEnabled), // }, // MaintenanceWindow: &armmysqlflexibleservers.MaintenanceWindow{ // CustomWindow: to.Ptr("Disabled"), // DayOfWeek: to.Ptr[int32](0), // StartHour: to.Ptr[int32](0), // StartMinute: to.Ptr[int32](0), // }, // Network: &armmysqlflexibleservers.Network{ // PublicNetworkAccess: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled), // }, // ReplicaCapacity: to.Ptr[int32](10), // ReplicationRole: to.Ptr(armmysqlflexibleservers.ReplicationRoleNone), // State: to.Ptr(armmysqlflexibleservers.ServerStateReady), // Storage: &armmysqlflexibleservers.Storage{ // AutoGrow: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled), // Iops: to.Ptr[int32](369), // StorageSizeGB: to.Ptr[int32](23), // StorageSKU: to.Ptr("Premium_LRS"), // }, // Version: to.Ptr(armmysqlflexibleservers.ServerVersionFive7), // }, // SKU: &armmysqlflexibleservers.SKU{ // Name: to.Ptr("Standard_B1ms"), // Tier: to.Ptr(armmysqlflexibleservers.SKUTierBurstable), // }, // }, // { // Name: to.Ptr("mysqltestserver2"), // Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver2"), // Location: to.Ptr("Southeast Asia"), // Tags: map[string]*string{ // "num": to.Ptr("1"), // }, // Properties: &armmysqlflexibleservers.ServerProperties{ // AdministratorLogin: to.Ptr("cloudsa"), // AvailabilityZone: to.Ptr("2"), // Backup: &armmysqlflexibleservers.Backup{ // BackupRetentionDays: to.Ptr[int32](7), // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-17T07:08:17.425Z"); return t}()), // GeoRedundantBackup: to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled), // }, // FullyQualifiedDomainName: to.Ptr("mysqltestserver2.mysql.database.azure.com"), // HighAvailability: &armmysqlflexibleservers.HighAvailability{ // Mode: to.Ptr(armmysqlflexibleservers.HighAvailabilityModeDisabled), // State: to.Ptr(armmysqlflexibleservers.HighAvailabilityStateNotEnabled), // }, // MaintenanceWindow: &armmysqlflexibleservers.MaintenanceWindow{ // CustomWindow: to.Ptr("Disabled"), // DayOfWeek: to.Ptr[int32](0), // StartHour: to.Ptr[int32](0), // StartMinute: to.Ptr[int32](0), // }, // Network: &armmysqlflexibleservers.Network{ // PublicNetworkAccess: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled), // }, // ReplicaCapacity: to.Ptr[int32](10), // ReplicationRole: to.Ptr(armmysqlflexibleservers.ReplicationRoleNone), // State: to.Ptr(armmysqlflexibleservers.ServerStateReady), // Storage: &armmysqlflexibleservers.Storage{ // AutoGrow: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled), // Iops: to.Ptr[int32](369), // StorageSizeGB: to.Ptr[int32](23), // StorageSKU: to.Ptr("Premium_LRS"), // }, // Version: to.Ptr(armmysqlflexibleservers.ServerVersionFive7), // }, // SKU: &armmysqlflexibleservers.SKU{ // Name: to.Ptr("Standard_B1ms"), // Tier: to.Ptr(armmysqlflexibleservers.SKUTierBurstable), // }, // }, // { // Name: to.Ptr("mysqltestserver3"), // Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver3"), // Location: to.Ptr("Southeast Asia"), // Tags: map[string]*string{ // "num": to.Ptr("1"), // }, // Properties: &armmysqlflexibleservers.ServerProperties{ // AdministratorLogin: to.Ptr("cloudsa"), // AvailabilityZone: to.Ptr("1"), // Backup: &armmysqlflexibleservers.Backup{ // BackupRetentionDays: to.Ptr[int32](7), // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-24T06:28:19.061Z"); return t}()), // GeoRedundantBackup: to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled), // }, // FullyQualifiedDomainName: to.Ptr("mysqltestserver3.mysql.database.azure.com"), // HighAvailability: &armmysqlflexibleservers.HighAvailability{ // Mode: to.Ptr(armmysqlflexibleservers.HighAvailabilityModeDisabled), // State: to.Ptr(armmysqlflexibleservers.HighAvailabilityStateNotEnabled), // }, // MaintenanceWindow: &armmysqlflexibleservers.MaintenanceWindow{ // CustomWindow: to.Ptr("Disabled"), // DayOfWeek: to.Ptr[int32](0), // StartHour: to.Ptr[int32](0), // StartMinute: to.Ptr[int32](0), // }, // Network: &armmysqlflexibleservers.Network{ // PublicNetworkAccess: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled), // }, // ReplicaCapacity: to.Ptr[int32](10), // ReplicationRole: to.Ptr(armmysqlflexibleservers.ReplicationRoleNone), // State: to.Ptr(armmysqlflexibleservers.ServerStateReady), // Storage: &armmysqlflexibleservers.Storage{ // AutoGrow: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled), // Iops: to.Ptr[int32](600), // StorageSizeGB: to.Ptr[int32](100), // StorageSKU: to.Ptr("Premium_LRS"), // }, // Version: to.Ptr(armmysqlflexibleservers.ServerVersionFive7), // }, // SKU: &armmysqlflexibleservers.SKU{ // Name: to.Ptr("Standard_E2ds_v4"), // Tier: to.Ptr(armmysqlflexibleservers.SKUTierMemoryOptimized), // }, // }}, // } } }
Output:
func (*ServersClient) NewListPager ¶ added in v0.6.0
func (client *ServersClient) NewListPager(options *ServersClientListOptions) *runtime.Pager[ServersClientListResponse]
NewListPager - List all the servers in a given subscription.
Generated from API version 2021-05-01
- 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/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2021-05-01/examples/ServersList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mysql/armmysqlflexibleservers" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armmysqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewServersClient().NewListPager(nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ServerListResult = armmysqlflexibleservers.ServerListResult{ // Value: []*armmysqlflexibleservers.Server{ // { // Name: to.Ptr("mysqltestserver1"), // Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver1"), // Location: to.Ptr("Southeast Asia"), // Tags: map[string]*string{ // "num": to.Ptr("1"), // }, // Properties: &armmysqlflexibleservers.ServerProperties{ // AdministratorLogin: to.Ptr("cloudsa"), // AvailabilityZone: to.Ptr("1"), // Backup: &armmysqlflexibleservers.Backup{ // BackupRetentionDays: to.Ptr[int32](7), // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-17T07:08:17.425Z"); return t}()), // GeoRedundantBackup: to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled), // }, // FullyQualifiedDomainName: to.Ptr("mysqltestserver1.database.mysql.azure.com"), // HighAvailability: &armmysqlflexibleservers.HighAvailability{ // Mode: to.Ptr(armmysqlflexibleservers.HighAvailabilityModeDisabled), // State: to.Ptr(armmysqlflexibleservers.HighAvailabilityStateNotEnabled), // }, // MaintenanceWindow: &armmysqlflexibleservers.MaintenanceWindow{ // CustomWindow: to.Ptr("Disabled"), // DayOfWeek: to.Ptr[int32](0), // StartHour: to.Ptr[int32](0), // StartMinute: to.Ptr[int32](0), // }, // Network: &armmysqlflexibleservers.Network{ // PublicNetworkAccess: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled), // }, // ReplicaCapacity: to.Ptr[int32](10), // ReplicationRole: to.Ptr(armmysqlflexibleservers.ReplicationRoleNone), // State: to.Ptr(armmysqlflexibleservers.ServerStateReady), // Storage: &armmysqlflexibleservers.Storage{ // AutoGrow: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled), // Iops: to.Ptr[int32](369), // StorageSizeGB: to.Ptr[int32](23), // StorageSKU: to.Ptr("Premium_LRS"), // }, // Version: to.Ptr(armmysqlflexibleservers.ServerVersionFive7), // }, // SKU: &armmysqlflexibleservers.SKU{ // Name: to.Ptr("Standard_B1ms"), // Tier: to.Ptr(armmysqlflexibleservers.SKUTierBurstable), // }, // }, // { // Name: to.Ptr("mysqltestserver2"), // Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup2/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver2"), // Location: to.Ptr("Southeast Asia"), // Tags: map[string]*string{ // "num": to.Ptr("1"), // }, // Properties: &armmysqlflexibleservers.ServerProperties{ // AdministratorLogin: to.Ptr("cloudsa"), // AvailabilityZone: to.Ptr("2"), // Backup: &armmysqlflexibleservers.Backup{ // BackupRetentionDays: to.Ptr[int32](7), // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-17T07:08:17.425Z"); return t}()), // GeoRedundantBackup: to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled), // }, // FullyQualifiedDomainName: to.Ptr("mysqltestserver2.mysql.database.azure.com"), // HighAvailability: &armmysqlflexibleservers.HighAvailability{ // Mode: to.Ptr(armmysqlflexibleservers.HighAvailabilityModeDisabled), // State: to.Ptr(armmysqlflexibleservers.HighAvailabilityStateNotEnabled), // }, // MaintenanceWindow: &armmysqlflexibleservers.MaintenanceWindow{ // CustomWindow: to.Ptr("Disabled"), // DayOfWeek: to.Ptr[int32](0), // StartHour: to.Ptr[int32](0), // StartMinute: to.Ptr[int32](0), // }, // Network: &armmysqlflexibleservers.Network{ // PublicNetworkAccess: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled), // }, // ReplicaCapacity: to.Ptr[int32](10), // ReplicationRole: to.Ptr(armmysqlflexibleservers.ReplicationRoleNone), // State: to.Ptr(armmysqlflexibleservers.ServerStateReady), // Storage: &armmysqlflexibleservers.Storage{ // AutoGrow: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled), // Iops: to.Ptr[int32](369), // StorageSizeGB: to.Ptr[int32](23), // StorageSKU: to.Ptr("Premium_LRS"), // }, // Version: to.Ptr(armmysqlflexibleservers.ServerVersionFive7), // }, // SKU: &armmysqlflexibleservers.SKU{ // Name: to.Ptr("Standard_B1ms"), // Tier: to.Ptr(armmysqlflexibleservers.SKUTierBurstable), // }, // }, // { // Name: to.Ptr("mysqltestserver3"), // Type: to.Ptr("Microsoft.DBforMySQL/flexibleServers"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup3/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver3"), // Location: to.Ptr("Southeast Asia"), // Tags: map[string]*string{ // "num": to.Ptr("1"), // }, // Properties: &armmysqlflexibleservers.ServerProperties{ // AdministratorLogin: to.Ptr("cloudsa"), // AvailabilityZone: to.Ptr("1"), // Backup: &armmysqlflexibleservers.Backup{ // BackupRetentionDays: to.Ptr[int32](7), // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-24T06:28:19.061Z"); return t}()), // GeoRedundantBackup: to.Ptr(armmysqlflexibleservers.EnableStatusEnumDisabled), // }, // FullyQualifiedDomainName: to.Ptr("mysqltestserver3.mysql.database.azure.com"), // HighAvailability: &armmysqlflexibleservers.HighAvailability{ // Mode: to.Ptr(armmysqlflexibleservers.HighAvailabilityModeDisabled), // State: to.Ptr(armmysqlflexibleservers.HighAvailabilityStateNotEnabled), // }, // MaintenanceWindow: &armmysqlflexibleservers.MaintenanceWindow{ // CustomWindow: to.Ptr("Disabled"), // DayOfWeek: to.Ptr[int32](0), // StartHour: to.Ptr[int32](0), // StartMinute: to.Ptr[int32](0), // }, // Network: &armmysqlflexibleservers.Network{ // PublicNetworkAccess: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled), // }, // ReplicaCapacity: to.Ptr[int32](10), // ReplicationRole: to.Ptr(armmysqlflexibleservers.ReplicationRoleNone), // State: to.Ptr(armmysqlflexibleservers.ServerStateReady), // Storage: &armmysqlflexibleservers.Storage{ // AutoGrow: to.Ptr(armmysqlflexibleservers.EnableStatusEnumEnabled), // Iops: to.Ptr[int32](600), // StorageSizeGB: to.Ptr[int32](100), // StorageSKU: to.Ptr("Premium_LRS"), // }, // Version: to.Ptr(armmysqlflexibleservers.ServerVersionFive7), // }, // SKU: &armmysqlflexibleservers.SKU{ // Name: to.Ptr("Standard_E2ds_v4"), // Tier: to.Ptr(armmysqlflexibleservers.SKUTierMemoryOptimized), // }, // }}, // } } }
Output:
type ServersClientBeginCreateOptions ¶ added in v0.3.0
type ServersClientBeginCreateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServersClientBeginCreateOptions contains the optional parameters for the ServersClient.BeginCreate method.
type ServersClientBeginDeleteOptions ¶ added in v0.3.0
type ServersClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServersClientBeginDeleteOptions contains the optional parameters for the ServersClient.BeginDelete method.
type ServersClientBeginFailoverOptions ¶ added in v0.3.0
type ServersClientBeginFailoverOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServersClientBeginFailoverOptions contains the optional parameters for the ServersClient.BeginFailover method.
type ServersClientBeginRestartOptions ¶ added in v0.3.0
type ServersClientBeginRestartOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServersClientBeginRestartOptions contains the optional parameters for the ServersClient.BeginRestart method.
type ServersClientBeginStartOptions ¶ added in v0.3.0
type ServersClientBeginStartOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServersClientBeginStartOptions contains the optional parameters for the ServersClient.BeginStart method.
type ServersClientBeginStopOptions ¶ added in v0.3.0
type ServersClientBeginStopOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServersClientBeginStopOptions contains the optional parameters for the ServersClient.BeginStop method.
type ServersClientBeginUpdateOptions ¶ added in v0.3.0
type ServersClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServersClientBeginUpdateOptions contains the optional parameters for the ServersClient.BeginUpdate method.
type ServersClientCreateResponse ¶ added in v0.3.0
type ServersClientCreateResponse struct { // Represents a server. Server }
ServersClientCreateResponse contains the response from method ServersClient.BeginCreate.
type ServersClientDeleteResponse ¶ added in v0.3.0
type ServersClientDeleteResponse struct { }
ServersClientDeleteResponse contains the response from method ServersClient.BeginDelete.
type ServersClientFailoverResponse ¶ added in v0.3.0
type ServersClientFailoverResponse struct { }
ServersClientFailoverResponse contains the response from method ServersClient.BeginFailover.
type ServersClientGetOptions ¶ added in v0.3.0
type ServersClientGetOptions struct { }
ServersClientGetOptions contains the optional parameters for the ServersClient.Get method.
type ServersClientGetResponse ¶ added in v0.3.0
type ServersClientGetResponse struct { // Represents a server. Server }
ServersClientGetResponse contains the response from method ServersClient.Get.
type ServersClientListByResourceGroupOptions ¶ added in v0.3.0
type ServersClientListByResourceGroupOptions struct { }
ServersClientListByResourceGroupOptions contains the optional parameters for the ServersClient.NewListByResourceGroupPager method.
type ServersClientListByResourceGroupResponse ¶ added in v0.3.0
type ServersClientListByResourceGroupResponse struct { // A list of servers. ServerListResult }
ServersClientListByResourceGroupResponse contains the response from method ServersClient.NewListByResourceGroupPager.
type ServersClientListOptions ¶ added in v0.3.0
type ServersClientListOptions struct { }
ServersClientListOptions contains the optional parameters for the ServersClient.NewListPager method.
type ServersClientListResponse ¶ added in v0.3.0
type ServersClientListResponse struct { // A list of servers. ServerListResult }
ServersClientListResponse contains the response from method ServersClient.NewListPager.
type ServersClientRestartResponse ¶ added in v0.3.0
type ServersClientRestartResponse struct { }
ServersClientRestartResponse contains the response from method ServersClient.BeginRestart.
type ServersClientStartResponse ¶ added in v0.3.0
type ServersClientStartResponse struct { }
ServersClientStartResponse contains the response from method ServersClient.BeginStart.
type ServersClientStopResponse ¶ added in v0.3.0
type ServersClientStopResponse struct { }
ServersClientStopResponse contains the response from method ServersClient.BeginStop.
type ServersClientUpdateResponse ¶ added in v0.3.0
type ServersClientUpdateResponse struct { // Represents a server. Server }
ServersClientUpdateResponse contains the response from method ServersClient.BeginUpdate.
type Storage ¶
type Storage struct { // Enable Storage Auto Grow or not. AutoGrow *EnableStatusEnum // Storage IOPS for a server. Iops *int32 // 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 ¶ added in v1.1.0
MarshalJSON implements the json.Marshaller interface for type Storage.
func (*Storage) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type Storage.
type StorageEditionCapability ¶
type StorageEditionCapability struct { // READ-ONLY; Maximum backup retention days MaxBackupRetentionDays *int64 // READ-ONLY; The maximum supported storage size. MaxStorageSize *int64 // READ-ONLY; Minimal backup retention days MinBackupRetentionDays *int64 // READ-ONLY; The minimal supported storage size. MinStorageSize *int64 // READ-ONLY; storage edition name Name *string }
StorageEditionCapability - storage edition capability
func (StorageEditionCapability) MarshalJSON ¶ added in v1.1.0
func (s StorageEditionCapability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StorageEditionCapability.
func (*StorageEditionCapability) UnmarshalJSON ¶ added in v1.1.0
func (s *StorageEditionCapability) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StorageEditionCapability.
type SystemData ¶
type SystemData struct { // The timestamp of resource creation (UTC). CreatedAt *time.Time // The identity that created the resource. CreatedBy *string // The type of identity that created the resource. CreatedByType *CreatedByType // The timestamp of resource last modification (UTC) LastModifiedAt *time.Time // The identity that last modified the resource. LastModifiedBy *string // The type of identity that last modified the resource. LastModifiedByType *CreatedByType }
SystemData - Metadata pertaining to creation and last modification of the resource.
func (SystemData) MarshalJSON ¶
func (s SystemData) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SystemData.
func (*SystemData) UnmarshalJSON ¶
func (s *SystemData) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.
type TrackedResource ¶
type TrackedResource struct { // REQUIRED; The geo-location where the resource lives Location *string // Resource tags. Tags map[string]*string // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
TrackedResource - The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'
func (TrackedResource) MarshalJSON ¶
func (t TrackedResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TrackedResource.
func (*TrackedResource) UnmarshalJSON ¶ added in v1.1.0
func (t *TrackedResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TrackedResource.
type UserAssignedIdentity ¶ added in v0.5.0
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 ¶ added in v1.1.0
func (u UserAssignedIdentity) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentity.
func (*UserAssignedIdentity) UnmarshalJSON ¶ added in v1.1.0
func (u *UserAssignedIdentity) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedIdentity.
type VirtualNetworkSubnetUsageParameter ¶
type VirtualNetworkSubnetUsageParameter struct { // Virtual network resource id. VirtualNetworkResourceID *string }
VirtualNetworkSubnetUsageParameter - Virtual network subnet usage parameter
func (VirtualNetworkSubnetUsageParameter) MarshalJSON ¶ added in v1.1.0
func (v VirtualNetworkSubnetUsageParameter) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualNetworkSubnetUsageParameter.
func (*VirtualNetworkSubnetUsageParameter) UnmarshalJSON ¶ added in v1.1.0
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 }
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 ¶ added in v1.1.0
func (v *VirtualNetworkSubnetUsageResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkSubnetUsageResult.
Source Files
¶
- backups_client.go
- build.go
- checknameavailability_client.go
- checkvirtualnetworksubnetusage_client.go
- client_factory.go
- configurations_client.go
- constants.go
- databases_client.go
- firewallrules_client.go
- getprivatednszonesuffix_client.go
- locationbasedcapabilities_client.go
- models.go
- models_serde.go
- operations_client.go
- options.go
- replicas_client.go
- response_types.go
- servers_client.go
- time_rfc3339.go