New-AzMySqlFlexibleServerReplica
Creates a replica server for a MySQL flexible server
Note
This is the previous version of our documentation. Please consult the most recent version for up-to-date information.
Syntax
New-AzMySqlFlexibleServerReplica
-Replica <String>
-ResourceGroupName <String>
-Master <IServerAutoGenerated>
[-SubscriptionId <String>]
[-Zone <Int32>]
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-Confirm]
[-WhatIf]
[<CommonParameters>]
Description
Creates a new replica from an existing database.
Examples
Example 1: Create a new MySql server replica
PS C:\> Get-AzMySqlFlexibleServer -ResourceGroupName PowershellMySqlTest -ServerName mysql-test | New-AzMySqlFlexibleServerReplica -Replica mysql-test-replica -ResourceGroupName PowershellMySqlTest
Name Location SkuName SkuTier AdministratorLogin Version StorageSizeGb
---- -------- ------- ------- ------------------ ------- -------------
mysql-test-replica West US 2 Standard_D2ds_v4 GeneralPurpose admin 5.7 32
This cmdlet creates a new MySql server replica.
Example 2: Create a new MySql server replica
PS C:\> $mysql = Get-AzMySqlFlexibleServer -ResourceGroupName PowershellMySqlTest -ServerName mysql-test
PS C:\> New-AzMySqlFlexibleServerReplica -Master $mysql -Replica mysql-test-replica -ResourceGroupName PowershellMySqlTest
Name Location SkuName SkuTier AdministratorLogin Version StorageSizeGb
---- -------- ------- ------- ------------------ ------- -------------
mysql-test-replica West US 2 Standard_D2ds_v4 GeneralPurpose admin 5.7 32
This cmdlet with parameter master(inputobject) creates a new MySql server replica.
Parameters
Run the command as a job.
| Type: | SwitchParameter |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Prompts you for confirmation before running the cmdlet.
| Type: | SwitchParameter |
| Aliases: | cf |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The credentials, account, tenant, and subscription used for communication with Azure.
| Type: | PSObject |
| Aliases: | AzureRMContext, AzureCredential |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The source server object to create replica from. To construct, see NOTES section for MASTER properties and create a hash table.
| Type: | IServerAutoGenerated |
| Aliases: | InputObject |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Run the command asynchronously.
| Type: | SwitchParameter |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The name of the server.
| Type: | String |
| Aliases: | ReplicaServerName, Name |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The name of the resource group that contains the resource, You can obtain this value from the Azure Resource Manager API or the portal.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The subscription ID that identifies an Azure subscription.
| Type: | String |
| Position: | Named |
| Default value: | (Get-AzContext).Subscription.Id |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Shows what would happen if the cmdlet runs. The cmdlet is not run.
| Type: | SwitchParameter |
| Aliases: | wi |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Availability zone into which to provision the replica resource.
| Type: | Int32 |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Inputs
Outputs
Notes
ALIASES
COMPLEX PARAMETER PROPERTIES
To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
MASTER : The source server object to create replica from.
Location <String>: The geo-location where the resource lives[Tag <ITrackedResourceTags>]: Resource tags.[(Any) <String>]: This indicates any property can be added to this object.
[AdministratorLogin <String>]: The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation).[AdministratorLoginPassword <SecureString>]: The password of the administrator login (required for server creation).[AvailabilityZone <String>]: availability Zone information of the server.[BackupGeoRedundantBackup <EnableStatusEnum?>]: Whether or not geo redundant backup is enabled.[BackupRetentionDay <Int32?>]: Backup retention days for the server.[CreateMode <CreateMode?>]: The mode to create a new MySQL server.[HighAvailabilityMode <HighAvailabilityMode?>]: High availability mode for a server.[HighAvailabilityStandbyAvailabilityZone <String>]: Availability zone of the standby server.[MaintenanceWindowCustomWindow <String>]: indicates whether custom window is enabled or disabled[MaintenanceWindowDayOfWeek <Int32?>]: day of week for maintenance window[MaintenanceWindowStartHour <Int32?>]: start hour for maintenance window[MaintenanceWindowStartMinute <Int32?>]: start minute for maintenance window[NetworkDelegatedSubnetResourceId <String>]: Delegated subnet resource id used to setup vnet for a server.[NetworkPrivateDnsZoneResourceId <String>]: Private DNS zone resource id.[ReplicationRole <ReplicationRole?>]: The replication role.[RestorePointInTime <DateTime?>]: Restore point creation time (ISO8601 format), specifying the time to restore from.[SkuName <String>]: The name of the sku, e.g. Standard_D32s_v3.[SkuTier <SkuTier?>]: The tier of the particular SKU, e.g. GeneralPurpose.[SourceServerResourceId <String>]: The source MySQL server id.[StorageAutoGrow <EnableStatusEnum?>]: Enable Storage Auto Grow or not.[StorageIop <Int32?>]: Storage IOPS for a server.[StorageSizeGb <Int32?>]: Max storage size allowed for a server.[SystemDataCreatedAt <DateTime?>]: The timestamp of resource creation (UTC).[SystemDataCreatedBy <String>]: The identity that created the resource.[SystemDataCreatedByType <CreatedByType?>]: The type of identity that created the resource.[SystemDataLastModifiedAt <DateTime?>]: The timestamp of resource last modification (UTC)[SystemDataLastModifiedBy <String>]: The identity that last modified the resource.[SystemDataLastModifiedByType <CreatedByType?>]: The type of identity that last modified the resource.[Version <ServerVersion?>]: Server version.