diff --git a/src/MySql/Az.MySql.format.ps1xml b/src/MySql/Az.MySql.format.ps1xml
index f0f74be29d6a..aedacc9498d6 100644
--- a/src/MySql/Az.MySql.format.ps1xml
+++ b/src/MySql/Az.MySql.format.ps1xml
@@ -78,53 +78,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.CapabilitiesListResult
-
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.CapabilitiesListResult
-
-
-
-
-
-
-
-
-
-
-
- NextLink
-
-
-
-
-
-
-
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.CapabilityProperties
-
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.CapabilityProperties
-
-
-
-
-
-
-
-
-
-
-
- Zone
-
-
-
-
-
-
-
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ConfigurationAutoGenerated
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.Configuration
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ConfigurationAutoGenerated
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.Configuration
@@ -168,31 +124,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ConfigurationListResultAutoGenerated
-
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ConfigurationListResultAutoGenerated
-
-
-
-
-
-
-
-
-
-
-
- NextLink
-
-
-
-
-
-
-
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ConfigurationPropertiesAutoGenerated
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ConfigurationProperties
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ConfigurationPropertiesAutoGenerated
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ConfigurationProperties
@@ -208,15 +142,6 @@
-
-
-
-
-
-
-
-
-
@@ -240,19 +165,44 @@
Description
- IsConfigPendingRestart
+ Source
- IsDynamicConfig
+ Value
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.Database
+
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.Database
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- IsReadOnly
+ Name
- Source
+ Charset
- Value
+ Collation
@@ -260,21 +210,27 @@
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.DatabaseListResultAutoGenerated
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.DatabaseProperties
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.DatabaseListResultAutoGenerated
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.DatabaseProperties
-
+
+
+
+
- NextLink
+ Charset
+
+
+ Collation
@@ -282,21 +238,33 @@
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.DelegatedSubnetArguments
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.FirewallRule
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.DelegatedSubnetArguments
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.FirewallRule
-
+
+
+
+
+
+
+
- SubnetArmResourceId
+ Name
+
+
+ StartIPAddress
+
+
+ EndIPAddress
@@ -304,27 +272,27 @@
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.DelegatedSubnetUsage
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.FirewallRuleProperties
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.DelegatedSubnetUsage
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.FirewallRuleProperties
-
+
-
+
- SubnetName
+ EndIPAddress
- Usage
+ StartIPAddress
@@ -332,21 +300,27 @@
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.FirewallRuleListResultAutoGenerated
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.LogFile
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.FirewallRuleListResultAutoGenerated
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.LogFile
-
+
+
+
+
- NextLink
+ Name
+
+
+ Type
@@ -354,39 +328,45 @@
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.MaintenanceWindow
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.LogFileProperties
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.MaintenanceWindow
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.LogFileProperties
-
+
-
+
-
+
-
+
+
+
+
- CustomWindow
+ CreatedTime
- DayOfWeek
+ LastModifiedTime
- StartHour
+ SizeInKb
- StartMinute
+ Type
+
+
+ Url
@@ -394,33 +374,33 @@
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.OperationAutoGenerated
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.NameAvailability
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.OperationAutoGenerated
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.NameAvailability
-
+
-
+
-
+
- IsDataAction
+ Message
- Name
+ NameAvailable
- Origin
+ Reason
@@ -428,21 +408,27 @@
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.OperationListResultAutoGenerated
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.NameAvailabilityRequest
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.OperationListResultAutoGenerated
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.NameAvailabilityRequest
-
+
+
+
+
- NextLink
+ Name
+
+
+ Type
@@ -450,9 +436,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ServerAutoGenerated
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.Operation
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ServerAutoGenerated
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.Operation
@@ -460,22 +446,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -485,22 +456,47 @@
Name
- Location
-
-
- SkuName
+ Origin
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.OperationDisplay
+
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.OperationDisplay
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- SkuTier
+ Description
- AdministratorLogin
+ Operation
- Version
+ Provider
- StorageProfileStorageMb
+ Resource
@@ -508,21 +504,57 @@
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ServerEditionCapability
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.PerformanceTierServiceLevelObjectives
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ServerEditionCapability
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.PerformanceTierServiceLevelObjectives
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- Name
+ Edition
+
+
+ HardwareGeneration
+
+
+ MaxBackupRetentionDay
+
+
+ MaxStorageMb
+
+
+ MinBackupRetentionDay
+
+
+ MinStorageMb
+
+
+ VCore
@@ -530,21 +562,33 @@
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ServerForUpdateTags
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ResourceIdentity
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ServerForUpdateTags
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ResourceIdentity
-
+
+
+
+
+
+
+
- Item
+ PrincipalId
+
+
+ TenantId
+
+
+ Type
@@ -552,33 +596,57 @@
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ServerKey
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.SecurityAlertPolicyProperties
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ServerKey
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.SecurityAlertPolicyProperties
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
- Name
+ DisabledAlert
- Type
+ EmailAccountAdmin
- Kind
+ EmailAddress
+
+
+ RetentionDay
+
+
+ State
+
+
+ StorageAccountAccessKey
+
+
+ StorageEndpoint
@@ -586,21 +654,63 @@
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ServerKeyListResult
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.Server
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ServerKeyListResult
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.Server
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- NextLink
+ Name
+
+
+ Location
+
+
+ AdministratorLogin
+
+
+ Version
+
+
+ StorageProfileStorageMb
+
+
+ SkuName
+
+
+ SkuTier
+
+
+ SslEnforcement
@@ -608,33 +718,39 @@
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ServerKeyProperties
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerAdministratorProperties
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ServerKeyProperties
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerAdministratorProperties
-
+
-
+
-
+
+
+
+
- CreationDate
+ AdministratorType
- ServerKeyType
+ Login
- Uri
+ Sid
+
+
+ TenantId
@@ -642,21 +758,27 @@
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ServerListResultAutoGenerated
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerAdministratorResource
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ServerListResultAutoGenerated
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerAdministratorResource
-
+
+
+
+
- NextLink
+ Name
+
+
+ Type
@@ -664,65 +786,147 @@
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ServerPropertiesAutoGenerated
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerForCreate
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ServerPropertiesAutoGenerated
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerForCreate
-
+
+
+
+
+
+
+ Location
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerForCreateTags
+
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerForCreateTags
+
+
+
-
+
+
+
+
+
+
+ Item
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerPrivateEndpointConnectionProperties
+
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerPrivateEndpointConnectionProperties
+
+
+
-
+
+
+
+
+
+
+ ProvisioningState
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerPrivateLinkServiceConnectionStateProperty
+
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerPrivateLinkServiceConnectionStateProperty
+
+
+
-
+
-
+
-
+
+
+
+
+
+
+
+ ActionsRequired
+
+
+ Description
+
+
+ Status
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerProperties
+
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerProperties
+
+
+
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
-
-
+
@@ -734,18 +938,9 @@
AdministratorLogin
-
- AdministratorLoginPassword
-
-
- AvailabilityZone
-
ByokEnforcement
-
- CreateMode
-
EarliestRestoreDate
@@ -753,13 +948,13 @@
FullyQualifiedDomainName
- HaEnabled
+ InfrastructureEncryption
- HaState
+ MasterServerId
- InfrastructureEncryption
+ MinimalTlsVersion
PublicNetworkAccess
@@ -770,20 +965,11 @@
ReplicationRole
-
- RestorePointInTime
-
-
- SourceServerId
-
SslEnforcement
- StandbyAvailabilityZone
-
-
- State
+ UserVisibleState
Version
@@ -794,61 +980,51 @@
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ServerPropertiesForUpdate
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerPropertiesForCreate
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ServerPropertiesForUpdate
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerPropertiesForCreate
-
+
-
+
-
+
+
+
+
+
+
+
- AdministratorLoginPassword
+ CreateMode
- HaEnabled
+ InfrastructureEncryption
- ReplicationRole
+ MinimalTlsVersion
+
+
+ PublicNetworkAccess
SslEnforcement
-
-
-
-
-
-
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ServerPropertiesTags
-
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ServerPropertiesTags
-
-
-
-
-
-
-
-
-
-
- Item
+ Version
@@ -856,151 +1032,87 @@
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ServerVersionCapability
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerPropertiesForDefaultCreate
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ServerVersionCapability
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerPropertiesForDefaultCreate
-
+
-
-
-
-
-
- Name
-
-
-
-
-
-
-
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.SkuAutoGenerated
-
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.SkuAutoGenerated
-
-
-
-
+
-
+
-
-
-
-
-
- Name
-
-
- Tier
-
-
-
-
-
-
-
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.StorageEditionCapability
-
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.StorageEditionCapability
-
-
-
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- MaxBackupRetentionDay
+ CreateMode
- MinBackupRetentionDay
+ InfrastructureEncryption
- Name
+ MinimalTlsVersion
-
-
-
-
-
-
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.StorageMbCapability
-
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.StorageMbCapability
-
-
-
-
-
-
-
-
-
-
-
-
-
- Name
+ PublicNetworkAccess
- StorageSizeMb
+ SslEnforcement
-
-
-
-
-
-
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.StorageProfileAutoGenerated
-
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.StorageProfileAutoGenerated
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- BackupRetentionDay
+ StorageProfileBackupRetentionDay
- StorageAutogrow
+ StorageProfileGeoRedundantBackup
- StorageIop
+ StorageProfileStorageAutogrow
- StorageMb
+ StorageProfileStorageMb
+
+
+ Version
+
+
+ AdministratorLogin
+
+
+ AdministratorLoginPassword
@@ -1008,61 +1120,81 @@
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.VcoreCapability
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerPropertiesForGeoRestore
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.VcoreCapability
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerPropertiesForGeoRestore
-
+
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- Name
+ CreateMode
- SupportedIop
+ InfrastructureEncryption
- SupportedMemoryPerVcoreMb
+ MinimalTlsVersion
- VCore
+ PublicNetworkAccess
-
-
-
-
-
-
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.VirtualNetworkSubnetUsageParameter
-
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.VirtualNetworkSubnetUsageParameter
-
-
-
-
-
-
-
-
-
-
- VirtualNetworkArmResourceId
+ SslEnforcement
+
+
+ StorageProfileBackupRetentionDay
+
+
+ StorageProfileGeoRedundantBackup
+
+
+ StorageProfileStorageAutogrow
+
+
+ StorageProfileStorageMb
+
+
+ Version
+
+
+ SourceServerId
@@ -1070,45 +1202,81 @@
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.Configuration
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerPropertiesForReplica
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.Configuration
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerPropertiesForReplica
-
+
-
+
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- Name
+ CreateMode
- Value
+ InfrastructureEncryption
- AllowedValue
+ MinimalTlsVersion
- Source
+ PublicNetworkAccess
- DefaultValue
+ SslEnforcement
+
+
+ StorageProfileBackupRetentionDay
+
+
+ StorageProfileGeoRedundantBackup
+
+
+ StorageProfileStorageAutogrow
+
+
+ StorageProfileStorageMb
+
+
+ Version
+
+
+ SourceServerId
@@ -1116,85 +1284,87 @@
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ConfigurationProperties
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerPropertiesForRestore
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ConfigurationProperties
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerPropertiesForRestore
-
+
-
+
-
+
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- AllowedValue
+ CreateMode
- DataType
+ InfrastructureEncryption
- DefaultValue
+ MinimalTlsVersion
- Description
+ PublicNetworkAccess
- Source
+ SslEnforcement
- Value
+ StorageProfileBackupRetentionDay
-
-
-
-
-
-
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.Database
-
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.Database
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Name
+ StorageProfileGeoRedundantBackup
- Charset
+ StorageProfileStorageAutogrow
- Collation
+ StorageProfileStorageMb
+
+
+ Version
+
+
+ RestorePointInTime
+
+
+ SourceServerId
@@ -1202,27 +1372,27 @@
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.DatabaseProperties
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerSecurityAlertPolicy
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.DatabaseProperties
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerSecurityAlertPolicy
-
+
-
+
- Charset
+ Name
- Collation
+ Type
@@ -1230,61 +1400,51 @@
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.FirewallRule
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerUpdateParametersProperties
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.FirewallRule
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerUpdateParametersProperties
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
- Name
+ AdministratorLoginPassword
- StartIPAddress
+ MinimalTlsVersion
- EndIPAddress
+ PublicNetworkAccess
-
-
-
-
-
-
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.FirewallRuleProperties
-
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.FirewallRuleProperties
-
-
-
-
-
-
-
-
-
-
-
-
-
- EndIPAddress
+ ReplicationRole
- StartIPAddress
+ SslEnforcement
+
+
+ Version
@@ -1292,27 +1452,21 @@
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.LogFile
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerUpdateParametersTags
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.LogFile
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerUpdateParametersTags
-
-
-
-
+
- Name
-
-
- Type
+ Item
@@ -1320,45 +1474,45 @@
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.LogFileProperties
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.Sku
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.LogFileProperties
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.Sku
-
+
-
+
-
+
-
+
-
+
- CreatedTime
+ Capacity
- LastModifiedTime
+ Family
- SizeInKb
+ Name
- Type
+ Size
- Url
+ Tier
@@ -1366,33 +1520,39 @@
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.NameAvailability
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.StorageProfile
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.NameAvailability
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.StorageProfile
-
+
-
+
-
+
+
+
+
- Message
+ BackupRetentionDay
- NameAvailable
+ GeoRedundantBackup
- Reason
+ StorageAutogrow
+
+
+ StorageMb
@@ -1400,9 +1560,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.NameAvailabilityRequest
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.VirtualNetworkRule
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.NameAvailabilityRequest
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.VirtualNetworkRule
@@ -1428,27 +1588,21 @@
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.Operation
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.VirtualNetworkRuleListResult
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.Operation
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.VirtualNetworkRuleListResult
-
-
-
-
+
- Name
-
-
- Origin
+ NextLink
@@ -1456,39 +1610,33 @@
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.OperationDisplay
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.VirtualNetworkRuleProperties
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.OperationDisplay
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.VirtualNetworkRuleProperties
-
-
-
-
+
-
+
-
+
- Description
-
-
- Operation
+ IgnoreMissingVnetServiceEndpoint
- Provider
+ State
- Resource
+ VirtualNetworkSubnetId
@@ -1496,57 +1644,21 @@
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.PerformanceTierServiceLevelObjectives
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api10.ErrorAdditionalInfo
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.PerformanceTierServiceLevelObjectives
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api10.ErrorAdditionalInfo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
- Edition
-
-
- HardwareGeneration
-
-
- MaxBackupRetentionDay
-
-
- MaxStorageMb
-
-
- MinBackupRetentionDay
-
-
- MinStorageMb
-
-
- VCore
+ Type
@@ -1554,33 +1666,33 @@
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ResourceIdentity
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api10.ErrorResponse
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ResourceIdentity
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api10.ErrorResponse
-
+
-
+
-
+
- PrincipalId
+ Code
- TenantId
+ Message
- Type
+ Target
@@ -1588,57 +1700,33 @@
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.SecurityAlertPolicyProperties
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api10.Identity
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.SecurityAlertPolicyProperties
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api10.Identity
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
- DisabledAlert
-
-
- EmailAccountAdmin
-
-
- EmailAddress
-
-
- RetentionDay
-
-
- State
+ PrincipalId
- StorageAccountAccessKey
+ TenantId
- StorageEndpoint
+ Type
@@ -1646,9 +1734,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.Server
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api10.ProxyResource
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.Server
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api10.ProxyResource
@@ -1656,25 +1744,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -1684,25 +1754,7 @@
Name
- Location
-
-
- AdministratorLogin
-
-
- Version
-
-
- StorageProfileStorageMb
-
-
- SkuName
-
-
- SkuTier
-
-
- SslEnforcement
+ Type
@@ -1710,39 +1762,27 @@
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerAdministratorProperties
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api10.Resource
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerAdministratorProperties
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api10.Resource
-
-
-
-
-
-
-
+
-
+
- AdministratorType
-
-
- Login
-
-
- Sid
+ Name
- TenantId
+ Type
@@ -1750,9 +1790,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerAdministratorResource
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api10.TrackedResource
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerAdministratorResource
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api10.TrackedResource
@@ -1762,6 +1802,9 @@
+
+
+
@@ -1772,27 +1815,30 @@
Type
+
+ Location
+
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerForCreate
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api10.TrackedResourceTags
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerForCreate
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api10.TrackedResourceTags
-
+
- Location
+ Item
@@ -1800,21 +1846,57 @@
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerForCreateTags
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ServerAutoGenerated
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerForCreateTags
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ServerAutoGenerated
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- Item
+ Name
+
+
+ Location
+
+
+ SkuName
+
+
+ SkuTier
+
+
+ AdministratorLogin
+
+
+ Version
+
+
+ StorageProfileStorageMb
@@ -1822,21 +1904,21 @@
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerPrivateEndpointConnectionProperties
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.CapabilitiesListResult
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerPrivateEndpointConnectionProperties
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.CapabilitiesListResult
-
+
- ProvisioningState
+ NextLink
@@ -1844,33 +1926,21 @@
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerPrivateLinkServiceConnectionStateProperty
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.CapabilityProperties
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerPrivateLinkServiceConnectionStateProperty
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.CapabilityProperties
-
-
-
-
-
-
-
+
- ActionsRequired
-
-
- Description
-
-
- Status
+ Zone
@@ -1878,93 +1948,45 @@
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerProperties
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ConfigurationAutoGenerated
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerProperties
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ConfigurationAutoGenerated
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
-
+
-
+
- AdministratorLogin
-
-
- ByokEnforcement
-
-
- EarliestRestoreDate
+ Name
- FullyQualifiedDomainName
+ Value
- InfrastructureEncryption
+ AllowedValue
- MasterServerId
+ Source
- MinimalTlsVersion
-
-
- PublicNetworkAccess
-
-
- ReplicaCapacity
-
-
- ReplicationRole
-
-
- SslEnforcement
-
-
- UserVisibleState
-
-
- Version
+ DefaultValue
@@ -1972,51 +1994,21 @@
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerPropertiesForCreate
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ConfigurationListResultAutoGenerated
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerPropertiesForCreate
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ConfigurationListResultAutoGenerated
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
- CreateMode
-
-
- InfrastructureEncryption
-
-
- MinimalTlsVersion
-
-
- PublicNetworkAccess
-
-
- SslEnforcement
-
-
- Version
+ NextLink
@@ -2024,87 +2016,69 @@
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerPropertiesForDefaultCreate
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ConfigurationPropertiesAutoGenerated
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerPropertiesForDefaultCreate
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ConfigurationPropertiesAutoGenerated
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
- CreateMode
-
-
- InfrastructureEncryption
-
-
- MinimalTlsVersion
-
-
- PublicNetworkAccess
+ AllowedValue
- SslEnforcement
+ DataType
- StorageProfileBackupRetentionDay
+ DefaultValue
- StorageProfileGeoRedundantBackup
+ Description
- StorageProfileStorageAutogrow
+ IsConfigPendingRestart
- StorageProfileStorageMb
+ IsDynamicConfig
- Version
+ IsReadOnly
- AdministratorLogin
+ Source
- AdministratorLoginPassword
+ Value
@@ -2112,81 +2086,21 @@
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerPropertiesForGeoRestore
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.DatabaseListResultAutoGenerated
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerPropertiesForGeoRestore
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.DatabaseListResultAutoGenerated
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
- CreateMode
-
-
- InfrastructureEncryption
-
-
- MinimalTlsVersion
-
-
- PublicNetworkAccess
-
-
- SslEnforcement
-
-
- StorageProfileBackupRetentionDay
-
-
- StorageProfileGeoRedundantBackup
-
-
- StorageProfileStorageAutogrow
-
-
- StorageProfileStorageMb
-
-
- Version
-
-
- SourceServerId
+ NextLink
@@ -2194,81 +2108,71 @@
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerPropertiesForReplica
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.DelegatedSubnetArguments
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerPropertiesForReplica
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.DelegatedSubnetArguments
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+ SubnetArmResourceId
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.DelegatedSubnetUsage
+
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.DelegatedSubnetUsage
+
+
+
-
+
-
+
- CreateMode
-
-
- InfrastructureEncryption
-
-
- MinimalTlsVersion
-
-
- PublicNetworkAccess
-
-
- SslEnforcement
-
-
- StorageProfileBackupRetentionDay
-
-
- StorageProfileGeoRedundantBackup
-
-
- StorageProfileStorageAutogrow
-
-
- StorageProfileStorageMb
+ SubnetName
- Version
+ Usage
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.FirewallRuleListResultAutoGenerated
+
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.FirewallRuleListResultAutoGenerated
+
+
+
+
+
+
+
+
+
+
- SourceServerId
+ NextLink
@@ -2276,87 +2180,139 @@
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerPropertiesForRestore
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.MaintenanceWindow
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerPropertiesForRestore
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.MaintenanceWindow
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
-
+
- CreateMode
-
-
- InfrastructureEncryption
-
-
- MinimalTlsVersion
+ CustomWindow
- PublicNetworkAccess
+ DayOfWeek
- SslEnforcement
+ StartHour
- StorageProfileBackupRetentionDay
+ StartMinute
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.OperationAutoGenerated
+
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.OperationAutoGenerated
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- StorageProfileGeoRedundantBackup
+ IsDataAction
- StorageProfileStorageAutogrow
+ Name
- StorageProfileStorageMb
+ Origin
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.OperationListResultAutoGenerated
+
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.OperationListResultAutoGenerated
+
+
+
+
+
+
+
+
+
+
- Version
+ NextLink
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ServerEditionCapability
+
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ServerEditionCapability
+
+
+
+
+
+
+
+
+
+
- RestorePointInTime
+ Name
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ServerForUpdateTags
+
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ServerForUpdateTags
+
+
+
+
+
+
+
+
+
+
- SourceServerId
+ Item
@@ -2364,9 +2320,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerSecurityAlertPolicy
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ServerKey
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerSecurityAlertPolicy
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ServerKey
@@ -2376,6 +2332,9 @@
+
+
+
@@ -2386,57 +2345,64 @@
Type
+
+ Kind
+
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerUpdateParametersProperties
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ServerKeyListResult
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerUpdateParametersProperties
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ServerKeyListResult
-
-
-
-
-
-
-
+
+
+
+
+
+
+ NextLink
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ServerKeyProperties
+
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ServerKeyProperties
+
+
+
-
+
-
+
-
+
- AdministratorLoginPassword
-
-
- MinimalTlsVersion
-
-
- PublicNetworkAccess
-
-
- ReplicationRole
+ CreationDate
- SslEnforcement
+ ServerKeyType
- Version
+ Uri
@@ -2444,21 +2410,21 @@
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerUpdateParametersTags
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ServerListResultAutoGenerated
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerUpdateParametersTags
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ServerListResultAutoGenerated
-
+
- Item
+ NextLink
@@ -2466,85 +2432,129 @@
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.Sku
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ServerPropertiesAutoGenerated
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.Sku
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ServerPropertiesAutoGenerated
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
-
+
+
+
+
+
+
+
- Capacity
+ AdministratorLogin
- Family
+ AdministratorLoginPassword
- Name
+ AvailabilityZone
- Size
+ ByokEnforcement
- Tier
+ CreateMode
-
-
-
-
-
-
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.StorageProfile
-
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.StorageProfile
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- BackupRetentionDay
+ EarliestRestoreDate
- GeoRedundantBackup
+ FullyQualifiedDomainName
- StorageAutogrow
+ HaEnabled
- StorageMb
+ HaState
+
+
+ InfrastructureEncryption
+
+
+ PublicNetworkAccess
+
+
+ ReplicaCapacity
+
+
+ ReplicationRole
+
+
+ RestorePointInTime
+
+
+ SourceServerId
+
+
+ SslEnforcement
+
+
+ StandbyAvailabilityZone
+
+
+ State
+
+
+ Version
@@ -2552,49 +2562,39 @@
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.VirtualNetworkRule
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ServerPropertiesForUpdate
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.VirtualNetworkRule
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ServerPropertiesForUpdate
-
+
-
+
+
+
+
+
+
+
- Name
+ AdministratorLoginPassword
- Type
+ HaEnabled
-
-
-
-
-
-
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.VirtualNetworkRuleListResult
-
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.VirtualNetworkRuleListResult
-
-
-
-
-
-
-
-
-
-
- NextLink
+ ReplicationRole
+
+
+ SslEnforcement
@@ -2602,33 +2602,21 @@
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.VirtualNetworkRuleProperties
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ServerPropertiesTags
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.VirtualNetworkRuleProperties
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ServerPropertiesTags
-
-
-
-
-
-
-
+
- IgnoreMissingVnetServiceEndpoint
-
-
- State
-
-
- VirtualNetworkSubnetId
+ Item
@@ -2636,21 +2624,21 @@
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api10.ErrorAdditionalInfo
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ServerVersionCapability
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api10.ErrorAdditionalInfo
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ServerVersionCapability
-
+
- Type
+ Name
@@ -2658,33 +2646,27 @@
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api10.ErrorResponse
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.SkuAutoGenerated
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api10.ErrorResponse
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.SkuAutoGenerated
-
-
-
-
+
-
+
- Code
-
-
- Message
+ Name
- Target
+ Tier
@@ -2692,33 +2674,33 @@
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api10.Identity
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.StorageEditionCapability
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api10.Identity
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.StorageEditionCapability
-
+
-
+
-
+
- PrincipalId
+ MaxBackupRetentionDay
- TenantId
+ MinBackupRetentionDay
- Type
+ Name
@@ -2726,9 +2708,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api10.ProxyResource
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.StorageMbCapability
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api10.ProxyResource
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.StorageMbCapability
@@ -2736,7 +2718,7 @@
-
+
@@ -2746,7 +2728,7 @@
Name
- Type
+ StorageSizeMb
@@ -2754,27 +2736,39 @@
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api10.Resource
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.StorageProfileAutoGenerated
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api10.Resource
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.StorageProfileAutoGenerated
-
+
-
+
+
+
+
+
+
+
- Name
+ BackupRetentionDay
- Type
+ StorageAutogrow
+
+
+ StorageIop
+
+
+ StorageMb
@@ -2782,9 +2776,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api10.TrackedResource
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.VcoreCapability
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api10.TrackedResource
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.VcoreCapability
@@ -2792,10 +2786,13 @@
-
+
-
+
+
+
+
@@ -2805,10 +2802,13 @@
Name
- Type
+ SupportedIop
- Location
+ SupportedMemoryPerVcoreMb
+
+
+ VCore
@@ -2816,21 +2816,21 @@
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api10.TrackedResourceTags
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.VirtualNetworkSubnetUsageParameter
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api10.TrackedResourceTags
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.VirtualNetworkSubnetUsageParameter
-
+
- Item
+ VirtualNetworkArmResourceId
diff --git a/src/MySql/Az.MySql.psd1 b/src/MySql/Az.MySql.psd1
index e49ac0709182..a777a4fc5170 100644
--- a/src/MySql/Az.MySql.psd1
+++ b/src/MySql/Az.MySql.psd1
@@ -3,7 +3,7 @@
#
# Generated by: Microsoft Corporation
#
-# Generated on: 12/3/2020
+# Generated on: 1/7/2021
#
@{
@@ -12,13 +12,13 @@
RootModule = './Az.MySql.psm1'
# Version number of this module.
-ModuleVersion = '0.3.1'
+ModuleVersion = '0.1.0'
# Supported PSEditions
CompatiblePSEditions = 'Core', 'Desktop'
# ID used to uniquely identify this module
-GUID = '8c7c6fcd-a96f-460b-89e2-ff822a3246c8'
+GUID = '0b8ac9f4-b926-4ac8-b73f-937a0d218521'
# Author of this module
Author = 'Microsoft Corporation'
@@ -45,7 +45,7 @@ PowerShellVersion = '5.1'
DotNetFrameworkVersion = '4.7.2'
# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
-# CLRVersion = ''
+# ClrVersion = ''
# Processor architecture (None, X86, Amd64) required by this module
# ProcessorArchitecture = ''
@@ -54,7 +54,7 @@ DotNetFrameworkVersion = '4.7.2'
RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.2.3'; })
# Assemblies that must be loaded prior to importing this module
-RequiredAssemblies = './bin/Az.MySql.private.dll'
+RequiredAssemblies = 'bin\Az.MySql.private.dll'
# Script files (.ps1) that are run in the caller's environment prior to importing this module.
# ScriptsToProcess = @()
@@ -72,8 +72,10 @@ FormatsToProcess = 'Az.MySql.format.ps1xml'
FunctionsToExport = 'Get-AzMySqlConfiguration', 'Get-AzMySqlConnectionString',
'Get-AzMySqlFirewallRule', 'Get-AzMySqlFlexibleServer',
'Get-AzMySqlFlexibleServerConfiguration',
+ 'Get-AzMySqlFlexibleServerConnectionString',
'Get-AzMySqlFlexibleServerDatabase',
'Get-AzMySqlFlexibleServerFirewallRule',
+ 'Get-AzMySqlFlexibleServerLocationBasedCapability',
'Get-AzMySqlFlexibleServerReplica', 'Get-AzMySqlReplica',
'Get-AzMySqlServer', 'Get-AzMySqlVirtualNetworkRule',
'New-AzMySqlFirewallRule', 'New-AzMySqlFlexibleServer',
@@ -130,7 +132,7 @@ PrivateData = @{
# IconUri = ''
# ReleaseNotes of this module
- ReleaseNotes = '* Fixed secure string issue'
+ # ReleaseNotes = ''
# Prerelease string of this module
# Prerelease = ''
diff --git a/src/MySql/Az.MySql.psm1 b/src/MySql/Az.MySql.psm1
index 3e7a8ca88acb..80d82bde7395 100644
--- a/src/MySql/Az.MySql.psm1
+++ b/src/MySql/Az.MySql.psm1
@@ -24,17 +24,17 @@
}
}
if(-not $accountsModule) {
- $hasAdequateVersion = (Get-Module -Name $accountsName -ListAvailable | Where-Object { $_.Version -ge [System.Version]'1.8.1' } | Measure-Object).Count -gt 0
+ $hasAdequateVersion = (Get-Module -Name $accountsName -ListAvailable | Where-Object { $_.Version -ge [System.Version]'2.2.3' } | Measure-Object).Count -gt 0
if($hasAdequateVersion) {
- $accountsModule = Import-Module -Name $accountsName -MinimumVersion 1.8.1 -Scope Global -PassThru
+ $accountsModule = Import-Module -Name $accountsName -MinimumVersion 2.2.3 -Scope Global -PassThru
}
}
}
if(-not $accountsModule) {
- Write-Error "`nThis module requires $accountsName version 1.8.1 or greater. For installation instructions, please see: https://docs.microsoft.com/en-us/powershell/azure/install-az-ps" -ErrorAction Stop
- } elseif (($accountsModule.Version -lt [System.Version]'1.8.1') -and (-not $localAccounts)) {
- Write-Error "`nThis module requires $accountsName version 1.8.1 or greater. An earlier version of Az.Accounts is imported in the current PowerShell session. If you are running test, please try to remove '.PSSharedModules' in your home directory. Otherwise please open a new PowerShell session and import this module again.`nAdditionally, this error could indicate that multiple incompatible versions of Azure PowerShell modules are installed on your system. For troubleshooting information, please see: https://aka.ms/azps-version-error" -ErrorAction Stop
+ Write-Error "`nThis module requires $accountsName version 2.2.3 or greater. For installation instructions, please see: https://docs.microsoft.com/en-us/powershell/azure/install-az-ps" -ErrorAction Stop
+ } elseif (($accountsModule.Version -lt [System.Version]'2.2.3') -and (-not $localAccounts)) {
+ Write-Error "`nThis module requires $accountsName version 2.2.3 or greater. An earlier version of Az.Accounts is imported in the current PowerShell session. If you are running test, please try to remove '.PSSharedModules' in your home directory. Otherwise please open a new PowerShell session and import this module again.`nAdditionally, this error could indicate that multiple incompatible versions of Azure PowerShell modules are installed on your system. For troubleshooting information, please see: https://aka.ms/azps-version-error" -ErrorAction Stop
}
Write-Information "Loaded Module '$($accountsModule.Name)'"
diff --git a/src/MySql/ChangeLog.md b/src/MySql/ChangeLog.md
index 56bfb3914384..565b011a8431 100644
--- a/src/MySql/ChangeLog.md
+++ b/src/MySql/ChangeLog.md
@@ -18,6 +18,9 @@
- Additional information about change #1
-->
## Upcoming Release
+* Updated New-AzMySqlFlexibleServer cmdlet to provide easy resource group and network management within RDBMS flexible server management
+* Added new cmdlets Get-AzMySqlFlexibleServerLocationBasedCapability and Get-AzMySqlConnectionString
+* Added parameter MinimalTlsVersion
## Version 0.3.1
* Fixed secure string issue
diff --git a/src/MySql/build-module.ps1 b/src/MySql/build-module.ps1
index 2c5033c7ff80..be1239ce26d1 100644
--- a/src/MySql/build-module.ps1
+++ b/src/MySql/build-module.ps1
@@ -122,7 +122,7 @@ $null = New-Item -ItemType Directory -Force -Path $examplesFolder
if($NoDocs) {
Write-Host -ForegroundColor Green 'Creating exports...'
- Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ExcludeDocs
+ Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ExcludeDocs -ExamplesFolder $examplesFolder
} else {
Write-Host -ForegroundColor Green 'Creating exports and docs...'
$moduleDescription = 'Microsoft Azure PowerShell: MySql cmdlets'
diff --git a/src/MySql/check-dependencies.ps1 b/src/MySql/check-dependencies.ps1
index 513c52ca2fb5..7ada900d8f0e 100644
--- a/src/MySql/check-dependencies.ps1
+++ b/src/MySql/check-dependencies.ps1
@@ -46,7 +46,7 @@ if(Test-Path -Path $localModulesPath) {
$env:PSModulePath = "$localModulesPath$([IO.Path]::PathSeparator)$env:PSModulePath"
}
-DownloadModule -predicate ($all -or $Accounts) -path $localModulesPath -moduleName 'Az.Accounts' -versionMinimum '1.8.1'
+DownloadModule -predicate ($all -or $Accounts) -path $localModulesPath -moduleName 'Az.Accounts' -versionMinimum '2.2.3'
DownloadModule -predicate ($all -or $Pester) -path $localModulesPath -moduleName 'Pester' -requiredVersion '4.10.1'
$tools = Join-Path $PSScriptRoot 'tools'
@@ -56,7 +56,7 @@ $resourceModule = Join-Path $HOME '.PSSharedModules\Resources\Az.Resources.TestS
if ($Resources.IsPresent -and (-not (Test-Path -Path $resourceModule))) {
Write-Host -ForegroundColor Green "Building local Resource module used for test..."
Set-Location $resourceDir
- $null = autorest-beta .\readme.md --output-folder=$HOME/.PSSharedModules/Resources
+ $null = autorest .\readme.md --use:@autorest/powershell@3.0.414 --output-folder=$HOME/.PSSharedModules/Resources
$null = Copy-Item custom/* $HOME/.PSSharedModules/Resources/custom/
Set-Location $HOME/.PSSharedModules/Resources
$null = .\build-module.ps1
diff --git a/src/MySql/custom/FlexibleServer.cs b/src/MySql/custom/FlexibleServer.cs
new file mode 100644
index 000000000000..ed2cc3a02214
--- /dev/null
+++ b/src/MySql/custom/FlexibleServer.cs
@@ -0,0 +1,28 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Extensions;
+ using System.Security;
+
+ /// Represents a server.
+ public partial class ServerAutoGenerated
+ {
+ private SecureString _SecuredPassword;
+ // The user password in secure string. Convert the secure string into plain text if necessary.
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.DoNotFormat]
+ public SecureString SecuredPassword {get => this._SecuredPassword; set => this._SecuredPassword = value;}
+
+ private string _FirewallRuleName;
+ // The name of the firewall rule of the server
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.DoNotFormat]
+ public string FirewallRuleName {get => this._FirewallRuleName; set => this._FirewallRuleName = value;}
+
+ private string _DatabaseName;
+ // The name of the default database created for the server
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.DoNotFormat]
+ public string DatabaseName {get => this._DatabaseName; set => this._DatabaseName = value;}
+
+ }
+}
diff --git a/src/MySql/custom/Get-AzMySqlConnectionString.ps1 b/src/MySql/custom/Get-AzMySqlConnectionString.ps1
index d10be97099a0..e80fa8d64e53 100644
--- a/src/MySql/custom/Get-AzMySqlConnectionString.ps1
+++ b/src/MySql/custom/Get-AzMySqlConnectionString.ps1
@@ -34,7 +34,7 @@ function Get-AzMySqlConnectionString {
[System.String]
${SubscriptionId},
- [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline, HelpMessage = 'The source server object to create replica from.')]
+ [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline, HelpMessage = 'The server for the connection string.')]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServer]
${InputObject},
diff --git a/src/MySql/custom/Get-AzMySqlFlexibleServerConnectionString.ps1 b/src/MySql/custom/Get-AzMySqlFlexibleServerConnectionString.ps1
new file mode 100644
index 000000000000..5e9478f36a34
--- /dev/null
+++ b/src/MySql/custom/Get-AzMySqlFlexibleServerConnectionString.ps1
@@ -0,0 +1,144 @@
+# ----------------------------------------------------------------------------------
+#
+# Copyright Microsoft Corporation
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Get the connection string according to client connection provider.
+.Description
+Get the connection string according to client connection provider.
+#>
+
+function Get-AzMySqlFlexibleServerConnectionString {
+ [OutputType([System.String])]
+ [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Description('Get the connection string according to client connection provider.')]
+ param(
+ [Parameter(ParameterSetName='Get', Mandatory, HelpMessage = 'The name of the server.')]
+ [Alias('ServerName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Path')]
+ [System.String]
+ ${Name},
+
+ [Parameter(ParameterSetName='Get', Mandatory, HelpMessage = 'The name of the resource group that contains the resource, You can obtain this value from the Azure Resource Manager API or the portal.')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Path')]
+ [System.String]
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='Get', HelpMessage='The subscription ID that identifies an Azure subscription.')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ ${SubscriptionId},
+
+ [Parameter(Mandatory, HelpMessage = 'Client connection provider.')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Path')]
+ [Validateset('ADO.NET', 'JDBC', 'Node.js', 'PHP', 'Python', 'Ruby', 'WebApp')]
+ [System.String]
+ ${Client},
+
+ [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline, HelpMessage = 'The server for the connection string.')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.IMySqlIdentity]
+ ${InputObject},
+
+ [Parameter(HelpMessage = 'The credentials, account, tenant, and subscription used for communication with Azure.')]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ ${DefaultProfile},
+
+ [Parameter(DontShow, HelpMessage = 'Wait for .NET debugger to attach.')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline.
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline.
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use.
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call.
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy.
+ ${ProxyUseDefaultCredentials}
+ )
+
+ process {
+ function GetConnectionStringSslPart {
+ param(
+ [Parameter()]
+ [string]
+ ${Client},
+ [Parameter()]
+ [string]
+ ${SslEnforcement}
+ )
+ $SslEnforcementTemplateMap = @{
+ 'ADO.NET' = 'SslMode=MySqlSslMode.Required;SslCa="{ca-cert filename}"'
+ 'JDBC' = '?useSSL=true'
+ 'Node.js' = ', ssl:{ca:fs.readFileSync({ca-cert filename})}'
+ 'PHP' = 'mysqli_ssl_set($con, NULL, NULL, {ca-cert filename}, NULL, NULL);'
+ 'Python' = ', ssl_ca={ca-cert filename}, ssl_verify_cert=true'
+ 'Ruby' = ', sslca:{ca-cert filename}, sslverify:false, sslcipher:"AES256-SHA"'
+ 'WebApp' = ''
+ }
+ if ($SslEnforcement -eq 'Enabled') {
+ return $SslEnforcementTemplateMap[$Client]
+ }
+ return ''
+ }
+
+ $clientConnection = $PSBoundParameters['Client']
+ $null = $PSBoundParameters.Remove('Client')
+ $mySqlServer = Az.MySql\Get-AzMySqlFlexibleServer @PSBoundParameters
+ $DBHost = $mySqlServer.FullyQualifiedDomainName
+ $DBPort = 3306
+ $adminName = $mySqlServer.AdministratorLogin
+ $SslConnectionString = GetConnectionStringSslPart -Client $clientConnection -SslEnforcement $mySqlServer.SslEnforcement
+ $ConnectionStringMap = @{
+ 'ADO.NET' = "Server=${DBHost}; Port=${DBPort}; Database={your_database}; UserID=${adminName}; Password={your_password}; $SslConnectionString"
+ 'JDBC' = "String url =`"jdbc:mysql://${DBHost}:${DBPort}/{your_database}$SslConnectionString`"; myDbConn = DriverManager.getConnection(url, `"${adminName}`", {your_password});"
+ 'Node.js' = "var conn = mysql.createConnection({host: `"${DBHost}`", user: `"${adminName}`", password: {your_password}, database: {your_database}, port: ${DBPort}$SslConnectionString});"
+ 'PHP' = "`$con=mysqli_init();$SslConnectionString mysqli_real_connect(`$con, `"${DBHost}`", `"${adminName}`", {your_password}, {your_database}, ${DBPort});"
+ 'Python' = "cnx = mysql.connector.connect(user=`"${adminName}`", password={your_password}, host=`"${DBHost}`", port=${DBPort}, database={your_database}$SslConnectionString)"
+ 'Ruby' = "client = Mysql2::Client.new(username: `"${adminName}`", password: {your_password}, database: {your_database}, host: `"${DBHost}`", port: ${DBPort}$SslConnectionString)"
+ }
+ return $ConnectionStringMap[$Client]
+ }
+}
+
diff --git a/src/MySql/custom/Get-AzMySqlFlexibleServerLocationBasedCapability.ps1 b/src/MySql/custom/Get-AzMySqlFlexibleServerLocationBasedCapability.ps1
new file mode 100644
index 000000000000..465ac1394624
--- /dev/null
+++ b/src/MySql/custom/Get-AzMySqlFlexibleServerLocationBasedCapability.ps1
@@ -0,0 +1,119 @@
+# ----------------------------------------------------------------------------------
+#
+# Copyright Microsoft Corporation
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Get the available SKU information for the location
+.Description
+Get the available SKU information for the location
+#>
+
+function Get-AzMySqlFlexibleServerLocationBasedCapability {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ICapabilityProperties])]
+[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
+param(
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Path')]
+ [System.String]
+ # The name of the location.
+ ${Location},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String[]]
+ # The ID of the target subscription.
+ ${SubscriptionId},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+process {
+ try {
+ $PSBoundParameters.LocationName = $PSBoundParameters['Location']
+ $null = $PSBoundParameters.Remove('Location')
+
+ $Result = Az.MySql.internal\Get-AzMySqlFlexibleServerLocationBasedCapability @PSBoundParameters
+ Write-Host "Please refer to https://aka.ms/mysql-pricing for pricing details"
+ $SkusTiers = $Result[0].SupportedFlexibleServerEdition
+ $TableResult = @()
+
+ foreach ($Skus in $SkusTiers) {
+ $TierName = $Skus.Name
+ try {
+ $Keys = $Skus.SupportedServerVersion[0].SupportedVcore
+
+ foreach ($Key in $Keys) {
+ $NewEntry = New-Object -TypeName PSCustomObject -Property @{SKU=$Key.Name; Tier=$TierName; vCore=$Key.Vcore; Memory=$Key.SupportedMemoryPerVcoreMb}
+ $TableResult += $NewEntry
+ }
+ }
+ catch {
+ throw "No SKU info for this location"
+ }
+ }
+
+ return $TableResult
+
+
+ } catch {
+ throw
+ }
+}
+}
\ No newline at end of file
diff --git a/src/MySql/custom/New-AzMySqlFlexibleServer.ps1 b/src/MySql/custom/New-AzMySqlFlexibleServer.ps1
index f25d490deb15..5fc2d5dd7242 100644
--- a/src/MySql/custom/New-AzMySqlFlexibleServer.ps1
+++ b/src/MySql/custom/New-AzMySqlFlexibleServer.ps1
@@ -19,188 +19,576 @@ Creates a new MySQL flexible server
.Description
Creates a new MySQL flexible server
#>
+
+$DEFAULT_DB_NAME = 'flexibleserverdb'
+$DELEGATION_SERVICE_NAME = "Microsoft.DBforMySQL/flexibleServers"
+$DEFAULT_VNET_PREFIX = '10.0.0.0/16'
+$DEFAULT_SUBNET_PREFIX = '10.0.0.0/24'
+$AZURE_ARMNAME = '^[^<>%&:\\?/]{1,260}$'
+
function New-AzMySqlFlexibleServer {
- [OutputType([Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerAutoGenerated])]
- [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
- [Microsoft.Azure.PowerShell.Cmdlets.MySql.Description('Creates a new server.')]
- param(
- [Parameter(Mandatory, HelpMessage = 'The name of the server.')]
- [Alias('ServerName')]
- [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Path')]
- [System.String]
- ${Name},
-
- [Parameter(Mandatory, HelpMessage = 'The name of the resource group that contains the resource, You can obtain this value from the Azure Resource Manager API or the portal.')]
- [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Path')]
- [System.String]
- ${ResourceGroupName},
-
- [Parameter(HelpMessage='The subscription ID that identifies an Azure subscription.')]
- [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Path')]
- [Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
- [System.String]
- ${SubscriptionId},
-
- [Parameter(HelpMessage = 'The location the resource resides in.')]
- [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
- [System.String]
- ${Location},
-
- [Parameter(Mandatory, HelpMessage = 'Administrator username for the server. Once set, it cannot be changed.')]
- [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
- [System.String]
- ${AdministratorUserName},
-
- [Parameter(Mandatory, HelpMessage = 'The password of the administrator. Minimum 8 characters and maximum 128 characters. Password must contain characters from three of the following categories: English uppercase letters, English lowercase letters, numbers, and non-alphanumeric characters.')]
- [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
- [System.Security.SecureString]
- [ValidateNotNullOrEmpty()]
- ${AdministratorLoginPassword},
-
- [Parameter(HelpMessage = 'The name of the sku, typically, tier + family + cores, e.g. Standard_B1ms, Standard_D2ds_v4.')]
- [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
- [System.String]
- ${Sku},
-
- [Parameter(HelpMessage = 'Compute tier of the server. Accepted values: Burstable, GeneralPurpose, Memory Optimized. Default: Burstable.')]
- [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
- [System.String]
- ${SkuTier},
-
- [Parameter(HelpMessage = "Backup retention days for the server. Day count is between 7 and 35.")]
- [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
- [System.Int32]
- ${BackupRetentionDay},
-
- [Parameter(HelpMessage = 'Max storage allowed for a server.')]
- [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
- [System.Int32]
- ${StorageInMb},
-
- [Parameter(HelpMessage = 'Application-specific metadata in the form of key-value pairs.')]
- [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerForCreateTags]))]
- [System.Collections.Hashtable]
- ${Tag},
-
- [Parameter(HelpMessage = 'Server version.')]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.ServerVersion])]
- [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.ServerVersion]
- ${Version},
-
- [Parameter(HelpMessage = 'The credentials, account, tenant, and subscription used for communication with Azure.')]
- [Alias('AzureRMContext', 'AzureCredential')]
- [ValidateNotNull()]
- [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Azure')]
- [System.Management.Automation.PSObject]
- ${DefaultProfile},
-
- [Parameter(HelpMessage = 'Run the command as a job.')]
- [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
- [System.Management.Automation.SwitchParameter]
- ${AsJob},
-
- [Parameter(DontShow, HelpMessage = 'Wait for .NET debugger to attach.')]
- [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
- [System.Management.Automation.SwitchParameter]
- ${Break},
-
- [Parameter(DontShow)]
- [ValidateNotNull()]
- [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
- [Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.SendAsyncStep[]]
- # SendAsync Pipeline Steps to be appended to the front of the pipeline.
- ${HttpPipelineAppend},
-
- [Parameter(DontShow)]
- [ValidateNotNull()]
- [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
- [Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.SendAsyncStep[]]
- # SendAsync Pipeline Steps to be prepended to the front of the pipeline.
- ${HttpPipelinePrepend},
-
- [Parameter(HelpMessage = 'Run the command asynchronously.')]
- [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
- [System.Management.Automation.SwitchParameter]
- ${NoWait},
-
- [Parameter(DontShow)]
- [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
- [System.Uri]
- # The URI for the proxy server to use.
- ${Proxy},
-
- [Parameter(DontShow)]
- [ValidateNotNull()]
- [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
- [System.Management.Automation.PSCredential]
- # Credentials for a proxy server to use for the remote call.
- ${ProxyCredential},
-
- [Parameter(DontShow)]
- [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
- [System.Management.Automation.SwitchParameter]
- # Use the default credentials for the proxy.
- ${ProxyUseDefaultCredentials}
- )
-
- process {
- try {
- if ($PSBoundParameters.ContainsKey('Name')) {
- $PSBoundParameters.ServerName = $PSBoundParameters['Name']
- $null = $PSBoundParameters.Remove('Name')
- }
-
- if ($PSBoundParameters.ContainsKey('Sku')) {
- $PSBoundParameters.SkuName = $PSBoundParameters['Sku']
- $null = $PSBoundParameters.Remove('Sku')
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerAutoGenerated])]
+[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+[Microsoft.Azure.PowerShell.Cmdlets.MySql.Description('Creates a new MySQL flexible server.')]
+param(
+ [Parameter(HelpMessage = 'The name of the server.')]
+ [Alias('ServerName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Path')]
+ [System.String]
+ ${Name},
+
+ [Parameter(HelpMessage = 'The name of the resource group that contains the resource, You can obtain this value from the Azure Resource Manager API or the portal.')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Path')]
+ [System.String]
+ ${ResourceGroupName},
+
+ [Parameter(HelpMessage='The subscription ID that identifies an Azure subscription.')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ ${SubscriptionId},
+
+ [Parameter(HelpMessage = 'The location the resource resides in.')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
+ [System.String]
+ ${Location},
+
+ [Parameter(HelpMessage = 'Administrator username for the server. Once set, it cannot be changed.')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
+ [System.String]
+ ${AdministratorUserName},
+
+ [Parameter(HelpMessage = 'The password of the administrator. Minimum 8 characters and maximum 128 characters. Password must contain characters from three of the following categories: English uppercase letters, English lowercase letters, numbers, and non-alphanumeric characters.')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
+ [System.Security.SecureString]
+ [ValidateNotNullOrEmpty()]
+ ${AdministratorLoginPassword},
+
+ [Parameter(HelpMessage = 'The name of the sku, typically, tier + family + cores, e.g. Standard_B1ms, Standard_D2ds_v4.')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
+ [System.String]
+ ${Sku},
+
+ [Parameter(HelpMessage = 'Compute tier of the server. Accepted values: Burstable, GeneralPurpose, Memory Optimized. Default: Burstable.')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
+ [System.String]
+ ${SkuTier},
+
+ [Parameter(HelpMessage = "Backup retention days for the server. Day count is between 7 and 35.")]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
+ [System.Int32]
+ ${BackupRetentionDay},
+
+ [Parameter(HelpMessage = 'Max storage allowed for a server.')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
+ [System.Int32]
+ ${StorageInMb},
+
+ [Parameter(HelpMessage = 'Application-specific metadata in the form of key-value pairs.')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerForCreateTags]))]
+ [System.Collections.Hashtable]
+ ${Tag},
+
+ [Parameter(HelpMessage = 'Server version.')]
+ [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.ServerVersion])]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.ServerVersion]
+ ${Version},
+
+ [Parameter(HelpMessage = 'The subnet IP address prefix to use when creating a new vnet in CIDR format. Default value is 10.0.0.0/24.')]
+ [System.String]
+ ${SubnetPrefix},
+
+ [Parameter(HelpMessage = 'The Name or Id of an existing Subnet or name of a new one to create. Please note that the subnet will be delegated to Microsoft.DBforMySQL/flexibleServers. After delegation, this subnet cannot be used for any other type of Azure resources.')]
+ [System.String]
+ ${Subnet},
+
+ [Parameter(HelpMessage = 'The IP address prefix to use when creating a new vnet in CIDR format. Default value is 10.0.0.0/16.')]
+ [System.String]
+ ${VnetPrefix},
+
+ [Parameter(HelpMessage = 'The Name or Id of an existing virtual network or name of a new one to create. The name must be between 2 to 64 characters. The name must begin with a letter or number, end with a letter, number or underscore, and may contain only letters, numbers, underscores, periods, or hyphens.')]
+ [System.String]
+ ${Vnet},
+
+ [Parameter(HelpMessage = "
+ Determines the public access. Enter single or range of IP addresses to be
+ included in the allowed list of IPs. IP address ranges must be dash-
+ separated and not contain any spaces. Specifying 0.0.0.0 allows public
+ access from any resources deployed within Azure to access your server.
+ Specifying no IP address sets the server in public access mode but does
+ not create a firewall rule.")]
+ [System.String]
+ ${PublicAccess},
+
+ [Parameter(HelpMessage = 'Enable or disable high availability feature. Default value is Disabled. Default: Disabled.')]
+ ${HighAvailability},
+
+ [Parameter(HelpMessage = 'The credentials, account, tenant, and subscription used for communication with Azure.')]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ ${DefaultProfile},
+
+ [Parameter(HelpMessage = 'Run the command as a job.')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ ${AsJob},
+
+ [Parameter(DontShow, HelpMessage = 'Wait for .NET debugger to attach.')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline.
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline.
+ ${HttpPipelinePrepend},
+
+ [Parameter(HelpMessage = 'Run the command asynchronously.')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ ${NoWait},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use.
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call.
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy.
+ ${ProxyUseDefaultCredentials}
+)
+
+process {
+ try {
+ if (!$PSBoundParameters.ContainsKey('Location')) {
+ $PSBoundParameters.Location = 'westus2'
+ }
+
+ if (!$PSBoundParameters.ContainsKey('AdministratorLoginPassword')) {
+ $Password = Get-GeneratePassword
+ $PSBoundParameters.AdministratorLoginPassword = $Password | ConvertTo-SecureString -AsPlainText -Force
+ }
+ $PSBoundParameters.AdministratorLoginPassword = . "$PSScriptRoot/../utils/Unprotect-SecureString.ps1" $PSBoundParameters['AdministratorLoginPassword']
+
+ Import-Module -Name Az.Resources
+ if(!$PSBoundParameters.ContainsKey('ResourceGroupName')) {
+ $PSBoundParameters.ResourceGroupName = Get-RandomNumbers -Prefix 'group' -Length 10
+ $Msg = "Creating Resource Group {0}..." -f $PSBoundParameters.ResourceGroupName
+ Write-Host $Msg
+ if($PSCmdlet.ShouldProcess($PSBoundParameters.ResourceGroupName)) {
+ $null = New-AzResourceGroup -Name $PSBoundParameters.ResourceGroupName -Location $PSBoundParameters.Location -Force
}
- else {
- $PSBoundParameters.SkuName = 'Standard_B1ms'
+ }
+ else {
+ $Msg = 'Checking the existence of the resource group {0} ...' -f $PSBoundParameters.ResourceGroupName
+ Write-Host $Msg
+ try {
+ $null = Get-AzResourceGroup -Name $PSBoundParameters.ResourceGroupName -ErrorAction Stop
+ $Msg = 'Resource group {0} exists ? : True' -f $PSBoundParameters.ResourceGroupName
+ Write-Host $Msg
}
+ catch {
+ $Msg = 'Resource group {0} exists ? : False' -f $PSBoundParameters.ResourceGroupName
+ Write-Host $Msg
+ $Msg = "Creating Resource Group {0}..." -f $PSBoundParameters.ResourceGroupName
+ Write-Host $Msg
+ if($PSCmdlet.ShouldProcess($PSBoundParameters.ResourceGroupName)) {
+ $null = New-AzResourceGroup -Name $PSBoundParameters.ResourceGroupName -Location $PSBoundParameters.Location -Force
+ }
- if ($PSBoundParameters.ContainsKey('BackupRetentionDay')) {
- $PSBoundParameters.StorageProfileBackupRetentionDay = $PSBoundParameters['BackupRetentionDay']
- $null = $PSBoundParameters.Remove('BackupRetentionDay')
}
- else {
- $PSBoundParameters.StorageProfileBackupRetentionDay = 7
+ }
+
+ if (!$PSBoundParameters.ContainsKey('Name')) {
+ $PSBoundParameters.Name = Get-RandomNumbers -Prefix 'server' -Length 10
+ }
+
+ if ($PSBoundParameters.ContainsKey('Sku')) {
+ $PSBoundParameters.SkuName = $PSBoundParameters['Sku']
+ $null = $PSBoundParameters.Remove('Sku')
+ }
+ else {
+ $PSBoundParameters.SkuName = 'Standard_B1ms'
+ }
+
+ if ($PSBoundParameters.ContainsKey('BackupRetentionDay')) {
+ $PSBoundParameters.StorageProfileBackupRetentionDay = $PSBoundParameters['BackupRetentionDay']
+ $null = $PSBoundParameters.Remove('BackupRetentionDay')
+ }
+ else {
+ $PSBoundParameters.StorageProfileBackupRetentionDay = 7
+ }
+
+ if ($PSBoundParameters.ContainsKey('StorageInMb')) {
+ $PSBoundParameters.StorageProfileStorageMb = $PSBoundParameters['StorageInMb']
+ $null = $PSBoundParameters.Remove('StorageInMb')
+ }
+ else {
+ $PSBoundParameters.StorageProfileStorageMb = 10240
+ }
+
+ if (!$PSBoundParameters.ContainsKey('Version')) {
+ $PSBoundParameters.Version = '5.7'
+ }
+
+ if (!$PSBoundParameters.ContainsKey('SkuTier')) {
+ $PSBoundParameters.SkuTier = 'Burstable'
+ }
+
+ if ($PSBoundParameters.ContainsKey('AdministratorUserName')) {
+ $PSBoundParameters.AdministratorLogin = $PSBoundParameters['AdministratorUserName']
+ $null = $PSBoundParameters.Remove('AdministratorUserName')
+ }
+ else {
+ $PSBoundParameters.AdministratorLogin = Get-RandomName
+ }
+
+ # Handling Vnet & Subnet
+ $NetworkKeys = 'PublicAccess', 'Subnet', 'Vnet', 'SubnetPrefix', 'VnetPrefix'
+ $NetworkParameters = @{}
+ foreach($Key in $NetworkKeys){
+ if ($PSBoundParameters.ContainsKey($Key)){
+ $NetworkParameters[$Key] = $PSBoundParameters[$Key]
+ $null = $PSBoundParameters.Remove($Key)
+ }
+ }
+ $RequiredKeys = 'SubscriptionId', 'ResourceGroupName', 'Name', 'Location'
+ foreach($Key in $RequiredKeys){ $NetworkParameters[$Key] = $PSBoundParameters[$Key] }
+
+ if(!$NetworkParameters.ContainsKey('PublicAccess')){
+ $VnetSubnetParameters = CreateNetworkResource $NetworkParameters
+ $SubnetId = GetSubnetId $VnetSubnetParameters.ResourceGroupName $VnetSubnetParameters.VnetName $VnetSubnetParameters.SubnetName
+ $PSBoundParameters.DelegatedSubnetArgumentSubnetArmResourceId = $SubnetId
+ if ([string]::IsNullOrEmpty($PSBoundParameters.DelegatedSubnetArgumentSubnetArmResourceId)) {
+ $null = $PSBoundParameters.Remove('DelegatedSubnetArgumentSubnetArmResourceId')
}
+ }
+
+ $Msg = 'Creating MySQL server {0} in group {1}...' -f $PSBoundParameters.Name, $PSBoundParameters.resourceGroupName
+ Write-Host $Msg
+ $Msg = 'Your server {0} is using sku {1} (Paid Tier). Please refer to https://aka.ms/mysql-pricing for pricing details' -f $PSBoundParameters.Name, $PSBoundParameters.SkuName
+ Write-Host $Msg
+ $Server = Az.MySql.internal\New-AzMySqlFlexibleServer @PSBoundParameters
+
+ # # Create Database
+ $DatabaseParameter = [Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.Database]::new()
+ $DatabaseParameter.Charset = "utf8"
+ $DatabaseParameter.Collation = "utf8_general_ci"
+ $Msg = 'Creating database {0}...' -f $DEFAULT_DB_NAME
+ Write-Host $Msg
+ $null = New-AzMySqlFlexibleServerDatabase -Name $DEFAULT_DB_NAME -ResourceGroupName $PSBoundParameters.ResourceGroupName -ServerName $PSBoundParameters.Name -Parameter $DatabaseParameter
+
+ # Create Firewallrules
+ $FirewallRuleName = CreateFirewallRule $NetworkParameters
+
+ if (![string]::IsNullOrEmpty($FirewallRuleName)) {
+ $Server.FirewallRuleName = $FirewallRuleName
+ }
+ $Server.DatabaseName = $DEFAULT_DB_NAME
+ $Server.SecuredPassword = $PSBoundParameters.AdministratorLoginPassword | ConvertTo-SecureString -AsPlainText -Force
- if ($PSBoundParameters.ContainsKey('StorageInMb')) {
- $PSBoundParameters.StorageProfileStorageMb = $PSBoundParameters['StorageInMb']
- $null = $PSBoundParameters.Remove('StorageInMb')
+ return $Server
+
+ } catch {
+ throw
+ }
+}
+}
+function CreateNetworkResource($NetworkParameters) {
+ [OutputType([hashtable])]
+ $WarningPreference = 'silentlycontinue'
+ Import-Module -Name Az.Network
+
+ # 1. Error Handling
+ # Raise error when user passes values for both parameters
+ if ($NetworkParameters.Containskey('Subnet') -And $NetworkParameters.ContainsKey('PublicAccess')) {
+ throw "Incorrect usage : A combination of the parameters -Subnet and -PublicAccess is invalid. Use either one of them."
+ }
+
+ # When address space parameters are passed, the only valid combination is : --vnet, --subnet, --vnet-address-prefix, --subnet-address-prefix
+ if ($NetworkParameters.ContainsKey('Vnet') -Or $NetworkParameters.ContainsKey('Subnet')) {
+ if (($NetworkParameters.ContainsKey('VnetPrefix') -And !$NetworkParameters.ContainsKey('SubnetPrefix')) -Or
+ (!$NetworkParameters.ContainsKey('VnetPrefix') -And $NetworkParameters.ContainsKey('SubnetPrefix')) -Or
+ ($NetworkParameters.ContainsKey('VnetPrefix') -And $NetworkParameters.ContainsKey('SubnetPrefix') -And (!$NetworkParameters.ContainsKey('Vnet') -Or !$NetworkParameters.ContainsKey('Subnet')))){
+ throw "Incorrect usage : -Vnet, -Subnet, -VnetPrefix, -SubnetPrefix must be supplied together."
+ }
+ }
+
+ #Handle Vnet, Subnet scenario
+ if ($NetworkParameters.ContainsKey('Vnet') -Or $NetworkParameters.ContainsKey('Subnet')) {
+ # Only the Subnet ID provided..
+ if (!$NetworkParameters.ContainsKey('Vnet') -And $NetworkParameters.ContainsKey('Subnet')) {
+ if (IsValidSubnetId $NetworkParameters.Subnet) {
+ Write-Host "You have supplied a subnet Id. Verifying its existence..."
+ $ParsedResult = ParseResourceId $NetworkParameters.Subnet
+ $NetworkParameters.VnetName = $ParsedResult.VnetName
+ $NetworkParameters.SubnetName = $ParsedResult.SubnetName
+ $NetworkParameters.ResourceGroupName = $ParsedResult.ResourceGroupName
+ $SubnetFlag = $true
+ try { # Valid Subnet ID is provided
+ $Subnet = Get-AzVirtualNetworkSubnetConfig -ResourceId $NetworkParameters.Subnet -ErrorAction Stop
+ }
+ catch { # Invalid subnet ID is provided, creating a new one.
+ $SubnetFlag = $false
+ Write-Host "The subnet doesn't exist. Creating the subnet"
+ $Subnet = CreateVnetSubnet $NetworkParameters
+ }
+
+ if ($SubnetFlag){
+ $Delegations = Get-AzDelegation -Subnet $Subnet
+ if ($null -ne $Delegations){ # Valid but incorrect delegation
+ $Delegations | ForEach-Object {if ($PSItem.ServiceName -ne $DELEGATION_SERVICE_NAME) {
+ $Msg = "Can not use subnet with existing delegations other than {0}" -f $DELEGATION_SERVICE_NAME
+ throw $Msg
+ }}
+ }
+ else { # Valid but no delegation
+ $Vnet = Get-AzVirtualNetwork -ResourceGroupName $NetworkParameters.ResourceGroupName -Name $NetworkParameters.VnetName
+ $Subnet = Get-AzVirtualNetworkSubnetConfig -Name $NetworkParameters.SubnetName -VirtualNetwork $Vnet
+ $Subnet = Add-AzDelegation -Name $DELEGATION_SERVICE_NAME -ServiceName $DELEGATION_SERVICE_NAME -Subnet $Subnet
+ $Vnet | Set-AzVirtualNetwork
+ }
+ }
}
else {
- $PSBoundParameters.StorageProfileStorageMb = 10240
+ throw "The Subnet ID is not a valid form of resource id."
}
-
- if (!$PSBoundParameters.ContainsKey('Version')) {
- $PSBoundParameters.Version = '5.7'
+ }
+ elseif ($NetworkParameters.ContainsKey('Vnet') -And !$NetworkParameters.ContainsKey('Subnet')) {
+ if (IsValidVnetId $NetworkParameters.Vnet){
+ Write-Host "You have supplied a vnet Id. Verifying its existence..."
+ IsValidRgLocation $NetworkParameters.Vnet $NetworkParameters
+ $ParsedResult = ParseResourceId $NetworkParameters.Vnet
+ $NetworkParameters.VnetName = $ParsedResult.VnetName
+ $NetworkParameters.SubnetName = 'Subnet' + $NetworkParameters.Name
+ $Subnet = CreateVnetSubnet $NetworkParameters
}
-
- if (!$PSBoundParameters.ContainsKey('SkuTier')) {
- $PSBoundParameters.SkuTier = 'Burstable'
+ elseif ($NetworkParameters.Vnet -Match $AZURE_ARMNAME) {
+ Write-Host "You have supplied a vnet Name. Verifying its existence..."
+ $NetworkParameters.VnetName = $NetworkParameters.Vnet
+ $NetworkParameters.SubnetName = 'Subnet' + $NetworkParameters.Name
+ $Subnet = CreateVnetSubnet $NetworkParameters
+ IsValidRgLocation $Subnet.Id $NetworkParameters
}
-
- if (!$PSBoundParameters.ContainsKey('Location')) {
- $PSBoundParameters.Location = 'westus2'
+ else {
+ throw "Incorrectly formed Vnet id or Vnet name"
}
-
- if ($PSBoundParameters.ContainsKey('AdministratorUserName')) {
- $PSBoundParameters.AdministratorLogin = $PSBoundParameters['AdministratorUserName']
- $null = $PSBoundParameters.Remove('AdministratorUserName')
+ }
+ else { # Both Vnet and Subnet provided
+ if ($NetworkParameters.Vnet -Match $AZURE_ARMNAME -And $NetworkParameters.Subnet -Match $AZURE_ARMNAME) {
+ $NetworkParameters.VnetName = $NetworkParameters.Vnet
+ $NetworkParameters.SubnetName = $NetworkParameters.Subnet
+ $Subnet = CreateVnetSubnet $NetworkParameters
+ }
+ else {
+ if ($NetworkParameters.ContainsKey('SubnetPrefix') -And $NetworkParameters.ContainsKey('VnetPrefix')) {
+ $Msg = "if you pass an address prefix, please consider passing a name (instead of Id) for a subnet or vnet."
+ }
+ else { $Msg = "if you pass both --vnet and --subnet, consider passing names instead of ids." }
+ throw $Msg
}
+ }
+ }
+ # Handling create command without arguments
+ elseif (!$NetworkParameters.ContainsKey('PublicAccess') -And !$NetworkParameters.ContainsKey('Subnet') -And !$NetworkParameters.ContainsKey('Vnet')) {
+ $NetworkParameters.VnetName = 'VNET' + $NetworkParameters.Name
+ $NetworkParameters.SubnetName = 'Subnet' + $NetworkParameters.Name
+ $NetworkParameters.VnetPrefix = $DEFAULT_VNET_PREFIX
+ $NetworkParameters.SubnetPrefix = $DEFAULT_SUBNET_PREFIX
+
+ $Subnet = CreateVnetSubnet $NetworkParameters
+ }
+ return $NetworkParameters
+}
+
+function GetSubnetId($ResourceGroupName, $VnetName, $SubnetName){
+ if (!($ResourceGroupName -is [String])){ $ResourceGroupName = $ResourceGroupName[0]}
+ $Vnet = Get-AzVirtualNetwork -Name $VnetName -ResourceGroupName $ResourceGroupName
+ $Subnet = Get-AzVirtualNetworkSubnetConfig -Name $SubnetName -VirtualNetwork $Vnet
+ return $Subnet.Id
+}
- $PSBoundParameters.CreateMode = [Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.CreateMode]::Default
- $PSBoundParameters.AdministratorLoginPassword = . "$PSScriptRoot/../utils/Unprotect-SecureString.ps1" $PSBoundParameters['AdministratorLoginPassword']
+function CreateVnetSubnet($Parameters) {
+ if (!$Parameters.ContainsKey('SubnetPrefix')){$Parameters.SubnetPrefix = $DEFAULT_SUBNET_PREFIX}
+ if (!$Parameters.ContainsKey('VnetPrefix')){$Parameters.VnetPrefix = $DEFAULT_VNET_PREFIX}
- Az.MySql.internal\New-AzMySqlFlexibleServer @PSBoundParameters
- } catch {
- throw
+ try {
+ Get-AzVirtualNetwork -Name $Parameters.VnetName -ResourceGroupName $Parameters.ResourceGroupName -ErrorAction Stop
+ $Msg = "The provided vnet does exist."
+ Write-Host $Msg
+ }
+ catch {
+ $Msg = "Creating new vnet {0} in resource group {1}" -f $Parameters.VnetName, $Parameters.ResourceGroupName
+ Write-Host $Msg
+ if($PSCmdlet.ShouldProcess($Parameters.VnetName)) {
+ New-AzVirtualNetwork -Name $Parameters.VnetName -ResourceGroupName $Parameters.ResourceGroupName -Location $Parameters.Location -AddressPrefix $Parameters.VnetPrefix -Force
}
}
+
+ $Subnet = CreateAndDelegateSubnet $Parameters
+
+ return $Subnet
}
+function CreateAndDelegateSubnet($Parameters) {
+ $SubnetFlag = $true
+ $Vnet = Get-AzVirtualNetwork -Name $Parameters.VnetName -ResourceGroupName $Parameters.ResourceGroupName -ErrorAction Stop
+ try {
+ $Subnet = Get-AzVirtualNetworkSubnetConfig -VirtualNetwork $Vnet -Name $Parameters.SubnetName -ErrorAction Stop
+ $Msg = "The provided subnet does exist."
+ Write-Host $Msg
+ }
+ catch {
+ $SubnetFlag = $false
+ $Msg = 'Creating new subnet {0} in resource group {1} and delegating it to {2}' -f $Parameters.SubnetName, $Parameters.ResourceGroupName, $DELEGATION_SERVICE_NAME
+ Write-Host $Msg
+ }
+
+ if (!$SubnetFlag) {
+ $Delegation = New-AzDelegation -Name $DELEGATION_SERVICE_NAME -ServiceName $DELEGATION_SERVICE_NAME
+ Add-AzVirtualNetworkSubnetConfig -Name $Parameters.SubnetName -VirtualNetwork $Vnet -AddressPrefix $Parameters.SubnetPrefix -Delegation $Delegation | Set-AzVirtualNetwork
+ }
+ else { # check if existing subnet is delegated
+ $Delegations = Get-AzDelegation -Subnet $Subnet
+ if ($null -ne $Delegations){
+ $Delegations | ForEach-Object {if ($PSItem.ServiceName -ne $DELEGATION_SERVICE_NAME) {
+ $Msg = "Can not use subnet with existing delegations other than {0}" -f $DELEGATION_SERVICE_NAME
+ throw $Msg
+ }}
+ }
+ else { # Valid but no delegation
+ $Subnet = Add-AzDelegation -Name $DELEGATION_SERVICE_NAME -ServiceName $DELEGATION_SERVICE_NAME -Subnet $Subnet
+ $Vnet | Set-AzVirtualNetwork
+ }
+ }
+
+ return $Subnet
+}
+function CreateFirewallRule($Parameters) {
+ # # Adding firewall rule
+ if ($Parameters.ContainsKey('PublicAccess') -And $Parameters.PublicAccess.ToLower() -ne 'none') {
+ $Date = Get-Date -Format "yyyy-MM-dd_HH-mm-ss"
+ if ($Parameters.PublicAccess.ToLower() -eq 'all'){
+ $StartIp = '0.0.0.0'
+ $EndIp = '255.255.255.255'
+ $RuleName = "AllowAll_" + $Date
+ $FirewallRule = New-AzMySqlFlexibleServerFirewallRule -Name $RuleName -ResourceGroupName $Parameters.ResourceGroupName -ServerName $Parameters.Name -EndIPAddress $EndIp -StartIPAddress $StartIp
+ }
+ else {
+ $Parsed = $Parameters.PublicAccess -split "-"
+ if ($Parsed.length -eq 1) {
+ $StartIp = $Parsed[0]
+ $EndIp = $Parsed[0]
+ }
+ elseif ($Parsed.length -eq 2) {
+ $StartIp = $Parsed[0]
+ $EndIp = $Parsed[1]
+ }
+ else { throw "incorrect usage: --public-access. Acceptable values are \'all\', \'none\',\'\' and \'-\' where startIP and destinationIP ranges from 0.0.0.0 to 255.255.255.255" }
+
+ if ($StartIp -eq '0.0.0.0' -And $EndIp -eq '0.0.0.0') {
+ $RuleName = "AllowAllAzureServicesAndResourcesWithinAzureIps_" + $Date
+ $Msg = 'Configuring server firewall rule to accept connections from all Azure resources...'
+ }
+ elseif ($StartIP -eq $EndIP) {
+ $Msg = 'Configuring server firewall rule to accept connections from ' + $StartIP
+ }
+ else {
+ $Msg = 'Configuring server firewall rule to accept connections from {0} to {1}' -f $StartIP, $EndIp
+ $RuleName = "FirewallIPAddress_" + $Date
+ }
+ Write-Host $Msg
+ $FirewallRule = New-AzMySqlFlexibleServerFirewallRule -Name $RuleName -ResourceGroupName $Parameters.ResourceGroupName -ServerName $Parameters.Name -EndIPAddress $EndIp -StartIPAddress $StartIp
+ }
+ return $FirewallRule.Name
+ }
+ elseif ($Parameters.ContainsKey('PublicAccess') -And $Parameters.PublicAccess.ToLower() -ne 'none') {
+ Write-Host "No firewall rule was set"
+ }
+}
+function IsValidVnetId($Rid){
+ $VnetFormat = "\/subscriptions\/[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}\/resourceGroups\/[-\w\._\(\)]+\/providers\/Microsoft.Network\/virtualNetworks\/[^<>%&:\\?/]{1,260}$"
+ if ( $Rid -match $VnetFormat ) {
+ return $True
+ }
+ return $False
+}
+function IsValidSubnetId($Rid){
+ $SubnetFormat = "\/subscriptions\/[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}\/resourceGroups/[-\w\._\(\)]+\/providers\/Microsoft.Network\/virtualNetworks\/[^<>%&:\\?/]{1,260}\/subnets\/[^<>%&:\\?/]{1,260}$"
+ IF ( $Rid -match $SubnetFormat ) {
+ return $True
+ }
+ return $False
+}
+function ParseResourceId($Rid){
+ $Splits = $Rid -split "/"
+ $ParsedResults = @{}
+ if ($Splits.length -gt 1){
+ $ParsedResults["SubscriptionId"] = $Splits[2]
+ $ParsedResults["ResourceGroupName"] = $Splits[4]
+ $ParsedResults["VnetName"] = $Splits[8]
+ if ($Splits.length -eq 11) {
+ $ParsedResults["SubnetName"] = $Splits[10]
+ }
+ }
+ return $ParsedResults
+}
+function IsValidRgLocation($ResourceId, $Parameters){
+ $ParsedResults = ParseResourceId $ResourceId
+ $Group = Get-AzResourceGroup -Name $ParsedResults["ResourceGroupName"]
+ $ParsedResults["Location"] = $Group.Location
+
+ if ($Parameters.SubscriptionId -eq $ParsedResults.SubscriptionId -And $Parameters.Location -eq $ParsedResults.Location) {
+ return $True
+ }
+ throw "Incorrect Usage : The location and subscription of the server, Vnet and Subnet should be same."
+}
+
+function Get-RandomNumbers($Prefix, $Length) {
+ $Generated = ""
+ for($i = 0; $i -lt $Length; $i++){ $Generated += Get-Random -Maximum 10 }
+ return $Prefix + $Generated
+}
+
+function Get-RandomName() {
+ $Noun = Get-Content -Path (Join-Path $PSScriptRoot ".\nouns.txt") | Get-Random
+ $Adjective = Get-Content -Path (Join-Path $PSScriptRoot ".\adjectives.txt") | Get-Random
+ $Number = Get-Random -Maximum 10
+ $RandomName = $Adjective + (Get-Culture).TextInfo.ToTitleCase($Noun) + $Number
+ return $RandomName
+
+}
+
+function Get-GeneratePassword() {
+ $Password = ''
+ $Chars = 'abcdefghiklmnoprstuvwxyzABCDEFGHKLMNOPRSTUVWXYZ1234567890'
+ $SpecialChars = '!$%&/()=?}][{@#*+'
+ for ($i = 0; $i -lt 10; $i++ ) { $Password += $Chars[(Get-Random -Minimum 0 -Maximum $Chars.Length)] }
+ for ($i = 0; $i -lt 6; $i++ ) { $Password += $SpecialChars[(Get-Random -Minimum 0 -Maximum $SpecialChars.Length)] }
+ $Password = ($Password -split '' | Sort-Object {Get-Random}) -join ''
+ return $Password
+}
diff --git a/src/MySql/custom/New-AzMySqlFlexibleServerFirewallRule.ps1 b/src/MySql/custom/New-AzMySqlFlexibleServerFirewallRule.ps1
index 2ebfba5f8681..67286a45cbae 100644
--- a/src/MySql/custom/New-AzMySqlFlexibleServerFirewallRule.ps1
+++ b/src/MySql/custom/New-AzMySqlFlexibleServerFirewallRule.ps1
@@ -19,6 +19,7 @@ Creates a new firewall rule for MySQL flexible server
.Description
Creates a new firewall rule for MySQL flexible server
#>
+
function New-AzMySqlFlexibleServerFirewallRule {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IFirewallRule])]
[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
diff --git a/src/MySql/custom/New-AzMySqlFlexibleServerReplica.ps1 b/src/MySql/custom/New-AzMySqlFlexibleServerReplica.ps1
index 731b910d1b57..c68a9d215d34 100644
--- a/src/MySql/custom/New-AzMySqlFlexibleServerReplica.ps1
+++ b/src/MySql/custom/New-AzMySqlFlexibleServerReplica.ps1
@@ -21,109 +21,109 @@ Creates a replica server for a MySQL flexible server
#>
function New-AzMySqlFlexibleServerReplica {
- [OutputType([Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerAutoGenerated])]
- [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
- [Microsoft.Azure.PowerShell.Cmdlets.MySql.Description('Creates a new replica from an existing database.')]
- param(
- [Parameter(Mandatory, HelpMessage = 'The name of the server.')]
- [Alias('ReplicaServerName', 'Name')]
- [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Path')]
- [System.String]
- ${Replica},
-
- [Parameter(Mandatory, HelpMessage = 'The name of the resource group that contains the resource, You can obtain this value from the Azure Resource Manager API or the portal.')]
- [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Path')]
- [System.String]
- ${ResourceGroupName},
-
- [Parameter(HelpMessage='The subscription ID that identifies an Azure subscription.')]
- [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Path')]
- [Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
- [System.String]
- ${SubscriptionId},
-
- [Parameter(Mandatory, ValueFromPipeline, HelpMessage = 'The source server object to create replica from.')]
- [Alias('InputObject')]
- [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerAutoGenerated]
- ${Master},
-
- [Parameter(HelpMessage = 'The credentials, account, tenant, and subscription used for communication with Azure.')]
- [Alias('AzureRMContext', 'AzureCredential')]
- [ValidateNotNull()]
- [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Azure')]
- [System.Management.Automation.PSObject]
- ${DefaultProfile},
-
- [Parameter(HelpMessage = 'Run the command as a job.')]
- [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
- [System.Management.Automation.SwitchParameter]
- ${AsJob},
-
- [Parameter(DontShow, HelpMessage = 'Wait for .NET debugger to attach.')]
- [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
- [System.Management.Automation.SwitchParameter]
- ${Break},
-
- [Parameter(DontShow)]
- [ValidateNotNull()]
- [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
- [Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.SendAsyncStep[]]
- # SendAsync Pipeline Steps to be appended to the front of the pipeline.
- ${HttpPipelineAppend},
-
- [Parameter(DontShow)]
- [ValidateNotNull()]
- [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
- [Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.SendAsyncStep[]]
- # SendAsync Pipeline Steps to be prepended to the front of the pipeline.
- ${HttpPipelinePrepend},
-
- [Parameter(HelpMessage = 'Run the command asynchronously.')]
- [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
- [System.Management.Automation.SwitchParameter]
- ${NoWait},
-
- [Parameter(DontShow)]
- [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
- [System.Uri]
- # The URI for the proxy server to use.
- ${Proxy},
-
- [Parameter(DontShow)]
- [ValidateNotNull()]
- [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
- [System.Management.Automation.PSCredential]
- # Credentials for a proxy server to use for the remote call.
- ${ProxyCredential},
-
- [Parameter(DontShow)]
- [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
- [System.Management.Automation.SwitchParameter]
- # Use the default credentials for the proxy.
- ${ProxyUseDefaultCredentials}
- )
-
- process {
- try {
- $PSBoundParameters.CreateMode = [Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.CreateMode]::Replica
-
- $server = $PSBoundParameters['Master']
- $PSBoundParameters.SourceServerId = $server.Id
- $PSBoundParameters.Location = $server.Location
- $null = $PSBoundParameters.Remove('Master')
-
- if ($PSBoundParameters.ContainsKey('Replica'))
- {
- $PSBoundParameters['ServerName'] = $PSBoundParameters['Replica']
- $null = $PSBoundParameters.Remove('Replica')
- }
-
- Az.MySql.internal\New-AzMySqlFlexibleServer @PSBoundParameters
- } catch {
- throw
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerAutoGenerated])]
+[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+[Microsoft.Azure.PowerShell.Cmdlets.MySql.Description('Creates a new replica from an existing database.')]
+param(
+ [Parameter(Mandatory, HelpMessage = 'The name of the server.')]
+ [Alias('ReplicaServerName', 'Name')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Path')]
+ [System.String]
+ ${Replica},
+
+ [Parameter(Mandatory, HelpMessage = 'The name of the resource group that contains the resource, You can obtain this value from the Azure Resource Manager API or the portal.')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Path')]
+ [System.String]
+ ${ResourceGroupName},
+
+ [Parameter(HelpMessage='The subscription ID that identifies an Azure subscription.')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ ${SubscriptionId},
+
+ [Parameter(Mandatory, ValueFromPipeline, HelpMessage = 'The source server object to create replica from.')]
+ [Alias('InputObject')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerAutoGenerated]
+ ${Master},
+
+ [Parameter(HelpMessage = 'The credentials, account, tenant, and subscription used for communication with Azure.')]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ ${DefaultProfile},
+
+ [Parameter(HelpMessage = 'Run the command as a job.')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ ${AsJob},
+
+ [Parameter(DontShow, HelpMessage = 'Wait for .NET debugger to attach.')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline.
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline.
+ ${HttpPipelinePrepend},
+
+ [Parameter(HelpMessage = 'Run the command asynchronously.')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ ${NoWait},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use.
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call.
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy.
+ ${ProxyUseDefaultCredentials}
+)
+
+process {
+ try {
+ $PSBoundParameters.CreateMode = [Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.CreateMode]::Replica
+
+ $server = $PSBoundParameters['Master']
+ $PSBoundParameters.SourceServerId = $server.Id
+ $PSBoundParameters.Location = $server.Location
+ $null = $PSBoundParameters.Remove('Master')
+
+ if ($PSBoundParameters.ContainsKey('Replica'))
+ {
+ $PSBoundParameters['ServerName'] = $PSBoundParameters['Replica']
+ $null = $PSBoundParameters.Remove('Replica')
}
+
+ Az.MySql.internal\New-AzMySqlFlexibleServer @PSBoundParameters
+ } catch {
+ throw
}
}
+}
diff --git a/src/MySql/custom/New-AzMySqlServer.ps1 b/src/MySql/custom/New-AzMySqlServer.ps1
index 08b267a26ce0..df2b26c07015 100644
--- a/src/MySql/custom/New-AzMySqlServer.ps1
+++ b/src/MySql/custom/New-AzMySqlServer.ps1
@@ -62,6 +62,13 @@ function New-AzMySqlServer {
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SslEnforcementEnum]
${SslEnforcement},
+ [Parameter(HelpMessage = 'Set the minimal TLS version for connections to server when SSL is enabled. Default is TLSEnforcementDisabled.accepted values: TLS1_0, TLS1_1, TLS1_2, TLSEnforcementDisabled.')]
+ [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.MinimalTlsVersionEnum])]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.MinimalTlsVersionEnum]
+ # Enforce a minimal Tls version for the server.
+ ${MinimalTlsVersion},
+
[Parameter(HelpMessage = "Backup retention days for the server. Day count is between 7 and 35.")]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
[System.Int32]
@@ -177,6 +184,11 @@ function New-AzMySqlServer {
$Parameter.SslEnforcement = [Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SslEnforcementEnum]::Enable
}
+ if ($PSBoundParameters.ContainsKey('MinimalTlsVersion')) {
+ $Parameter.MinimalTlsVersion = $PSBoundParameters['MinimalTlsVersion']
+ $null = $PSBoundParameters.Remove('MinimalTlsVersion')
+ }
+
if ($PSBoundParameters.ContainsKey('BackupRetentionDay')) {
$Parameter.StorageProfileBackupRetentionDay = $PSBoundParameters['BackupRetentionDay']
$null = $PSBoundParameters.Remove('BackupRetentionDay')
diff --git a/src/MySql/custom/Update-AzMySqlFlexibleServer.ps1 b/src/MySql/custom/Update-AzMySqlFlexibleServer.ps1
index ee1d9961c2ad..c59a4264336a 100644
--- a/src/MySql/custom/Update-AzMySqlFlexibleServer.ps1
+++ b/src/MySql/custom/Update-AzMySqlFlexibleServer.ps1
@@ -161,6 +161,10 @@ function Update-AzMySqlFlexibleServer {
process {
try {
+ if ($PSBoundParameters.ContainsKey('AdministratorLoginPassword')) {
+ $PSBoundParameters.AdministratorLoginPassword = . "$PSScriptRoot/../utils/Unprotect-SecureString.ps1" $PSBoundParameters['AdministratorLoginPassword']
+ }
+
if ($PSBoundParameters.ContainsKey('StorageInMb')) {
$PSBoundParameters.StorageProfileStorageMb = $PSBoundParameters['StorageInMb']
$null = $PSBoundParameters.Remove('StorageInMb')
diff --git a/src/MySql/custom/Update-AzMySqlServer.ps1 b/src/MySql/custom/Update-AzMySqlServer.ps1
index 0b7cc7619c02..8eead1d8f584 100644
--- a/src/MySql/custom/Update-AzMySqlServer.ps1
+++ b/src/MySql/custom/Update-AzMySqlServer.ps1
@@ -77,6 +77,13 @@ function Update-AzMySqlServer {
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SslEnforcementEnum]
${SslEnforcement},
+ [Parameter(HelpMessage = 'Set the minimal TLS version for connections to server when SSL is enabled. Default is TLSEnforcementDisabled.accepted values: TLS1_0, TLS1_1, TLS1_2, TLSEnforcementDisabled.')]
+ [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.MinimalTlsVersionEnum])]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.MinimalTlsVersionEnum]
+ # Enforce a minimal Tls version for the server.
+ ${MinimalTlsVersion},
+
[Parameter(HelpMessage='Backup retention days for the server. Day count is between 7 and 35.')]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
[System.Int32]
diff --git a/src/MySql/custom/adjectives.txt b/src/MySql/custom/adjectives.txt
new file mode 100644
index 000000000000..cea08ef79731
--- /dev/null
+++ b/src/MySql/custom/adjectives.txt
@@ -0,0 +1,166 @@
+aboard
+acidic
+admired
+adoring
+ajar
+alert
+amazed
+amused
+angry
+annoyed
+anxious
+aquatic
+ardent
+ashamed
+awed
+best
+bored
+bossy
+bouncy
+bright
+broken
+bubbly
+calm
+cocky
+cold
+common
+content
+cranky
+crass
+cruel
+crushed
+curious
+curly
+cynical
+dim
+direful
+dopey
+dreary
+eager
+earthy
+eatable
+elastic
+elderly
+empty
+enraged
+entire
+envious
+excited
+exotic
+famous
+fearful
+fixed
+fluid
+formal
+free
+giddy
+gleeful
+gloomy
+goofy
+gross
+grouchy
+guilty
+harsh
+hateful
+hopeful
+hostile
+hurt
+impish
+insane
+irate
+jealous
+joyful
+junior
+kind
+last
+lazy
+lethal
+level
+liquid
+longing
+loving
+lowly
+loyal
+macho
+mad
+male
+measly
+medical
+mellow
+merry
+mild
+misty
+moral
+morbid
+muddled
+near
+needful
+needy
+next
+noted
+obvious
+overt
+panicky
+pensive
+picky
+pitiful
+playful
+pleased
+private
+prize
+proud
+prudent
+puffy
+puzzled
+rabid
+remote
+rigid
+rowdy
+rundown
+sad
+sane
+scared
+seemly
+selfish
+serene
+shocked
+shoddy
+shy
+sincere
+sinful
+smug
+solemn
+somber
+sorry
+sour
+speedy
+starchy
+stark
+stingy
+supreme
+swanky
+tenuous
+third
+trusty
+typical
+uneven
+unhappy
+unlined
+unruly
+untrue
+upset
+valid
+venal
+verdant
+vibrant
+violent
+vulgar
+wacky
+weary
+weekly
+wistful
+wornout
+worried
+yawning
+zesty
+zippy
diff --git a/src/MySql/custom/nouns.txt b/src/MySql/custom/nouns.txt
new file mode 100644
index 000000000000..8ea70f70f7a5
--- /dev/null
+++ b/src/MySql/custom/nouns.txt
@@ -0,0 +1,138 @@
+abalone
+apple
+auk
+avocet
+baboon
+badger
+bagels
+basmati
+beaver
+bittern
+boars
+bobcat
+bongo
+buffalo
+bustard
+cake
+camel
+caribou
+cattle
+caviar
+cheese
+cheetah
+chile
+chowder
+clam
+cobra
+coconut
+cod
+colt
+coot
+cordial
+coyote
+dingo
+donkey
+dunbird
+dunnock
+eagle
+eggs
+eland
+elk
+falcon
+ferret
+fish
+garlic
+gelding
+gerbil
+giraffe
+gnat
+goose
+goshawk
+granola
+grouse
+gull
+hamster
+hare
+hawk
+hinds
+hoopoe
+hornet
+hound
+hyena
+ibexe
+ibis
+iguana
+jay
+jerky
+kapi
+kitten
+lapwing
+lard
+linnet
+lion
+lizard
+llama
+lollies
+macaw
+magpie
+mare
+marten
+mole
+moth
+muesli
+oatmeal
+oil
+opossum
+orange
+ostrich
+owl
+ox
+oxbird
+paella
+parrot
+peacock
+pear
+penguin
+pepper
+pie
+plover
+polenta
+poultry
+pudding
+quiche
+raccoon
+raisins
+redwing
+relish
+rice
+robin
+roedeer
+ruffs
+salami
+salt
+sausage
+seafowl
+shads
+shrimp
+smelt
+snail
+snipe
+sparrow
+stoat
+stork
+syrup
+tacos
+tamarin
+termite
+thrushe
+tomatoe
+toucan
+truffle
+turtle
+venison
+vulture
+walrus
+wasp
+widgeon
+wigeon
+wildcat
\ No newline at end of file
diff --git a/src/MySql/custom/readme.md b/src/MySql/custom/readme.md
index f8336dda153d..3a9f91659ff3 100644
--- a/src/MySql/custom/readme.md
+++ b/src/MySql/custom/readme.md
@@ -31,11 +31,11 @@ These provide functionality to our HTTP pipeline and other useful features. In s
### Attributes
For processing the cmdlets, we've created some additional attributes:
-- `Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.DescriptionAttribute`
+- `Microsoft.Azure.PowerShell.Cmdlets.MySql.DescriptionAttribute`
- Used in C# cmdlets to provide a high-level description of the cmdlet. This is propegated to reference documentation via [help comments](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_comment_based_help) in the exported scripts.
-- `Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.DoNotExportAttribute`
+- `Microsoft.Azure.PowerShell.Cmdlets.MySql.DoNotExportAttribute`
- Used in C# and script cmdlets to suppress creating an exported cmdlet at build-time. These cmdlets will *not be exposed* by `Az.MySql`.
-- `Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.InternalExportAttribute`
+- `Microsoft.Azure.PowerShell.Cmdlets.MySql.InternalExportAttribute`
- Used in C# cmdlets to route exported cmdlets to the `..\internal`, which are *not exposed* by `Az.MySql`. For more information, see [readme.md](..\internal/readme.md) in the `..\internal` folder.
-- `Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.ProfileAttribute`
+- `Microsoft.Azure.PowerShell.Cmdlets.MySql.ProfileAttribute`
- Used in C# and script cmdlets to define which Azure profiles the cmdlet supports. This is only supported for Azure (`--azure`) modules.
\ No newline at end of file
diff --git a/src/MySql/examples/Get-AzMySqlFlexibleServerConnectionString.md b/src/MySql/examples/Get-AzMySqlFlexibleServerConnectionString.md
new file mode 100644
index 000000000000..06d3d41411ff
--- /dev/null
+++ b/src/MySql/examples/Get-AzMySqlFlexibleServerConnectionString.md
@@ -0,0 +1,16 @@
+### Example 1: Get connection string by name
+```powershell
+PS C:\> Get-AzMySqlFlexibleServerConnectionString -Client Python -ResourceGroupName PowershellMySqlTest -Name mysql-test
+
+cnx = mysql.connector.connect(user=mysql_user, password="{your_password}", host="mysql-test.mysql.database.azure.com", port=3306, database="{your_database}", ssl_ca="{ca-cert filename}", ssl_disabled=False)
+```
+This cmdlet shows connection string of a client by server name.
+
+### Example 2: Get MySql server connection string by identity
+```powershell
+PS C:\> Get-AzMySqlFlexibleServer -ResourceGroupName PowershellMySqlTest -ServerName mysql-test | Get-AzMySqlFlexibleServerConnectionString -Client PHP
+
+$con=mysqli_init(); mysqli_real_connect($con, "mysql-test.mysql.database.azure.com", "mysql_test", {your_password}, {your_database}, 3306);
+```
+
+This cmdlet gets MySql server connection string by identity.
diff --git a/src/MySql/examples/Get-AzMySqlFlexibleServerLocationBasedCapability.md b/src/MySql/examples/Get-AzMySqlFlexibleServerLocationBasedCapability.md
new file mode 100644
index 000000000000..9bfa66347ba5
--- /dev/null
+++ b/src/MySql/examples/Get-AzMySqlFlexibleServerLocationBasedCapability.md
@@ -0,0 +1,27 @@
+### Example 1: Get location capabilities by location name
+```powershell
+PS C:\> Get-AzMySqlFlexibleServerLocationBasedCapability -Location westus2
+"Please refer to https://aka.ms/mysql-pricing for pricing details"
+
+SKU Tier Memory vCore
+--- ---- ------ -----
+Standard_B1s Burstable 1024 1
+Standard_B1ms Burstable 2048 1
+Standard_B2s Burstable 2048 2
+Standard_D2ds_v4 GeneralPurpose 4096 2
+Standard_D4ds_v4 GeneralPurpose 4096 4
+Standard_D8ds_v4 GeneralPurpose 4096 8
+Standard_D16ds_v4 GeneralPurpose 4096 16
+Standard_D32ds_v4 GeneralPurpose 4096 32
+Standard_D48ds_v4 GeneralPurpose 4096 48
+Standard_D64ds_v4 GeneralPurpose 4096 64
+Standard_E2ds_v4 MemoryOptimized 8192 2
+Standard_E4ds_v4 MemoryOptimized 8192 4
+Standard_E8ds_v4 MemoryOptimized 8192 8
+Standard_E16ds_v4 MemoryOptimized 8192 16
+Standard_E32ds_v4 MemoryOptimized 8192 32
+Standard_E48ds_v4 MemoryOptimized 8192 48
+Standard_E64ds_v4 MemoryOptimized 8192 64
+
+```
+This cmdlet shows basic sku information of the provided location.
\ No newline at end of file
diff --git a/src/MySql/examples/New-AzMySqlFlexibleServer.md b/src/MySql/examples/New-AzMySqlFlexibleServer.md
index 64e45818b4d8..417eede91cff 100644
--- a/src/MySql/examples/New-AzMySqlFlexibleServer.md
+++ b/src/MySql/examples/New-AzMySqlFlexibleServer.md
@@ -1,22 +1,111 @@
-### Example 1: Create a new MySql flexible server
+### Example 1: Create a new MySql flexible server with arguments
```powershell
PS C:\> New-AzMySqlFlexibleServer -Name mysql-test -ResourceGroupName PowershellMySqlTest \
--Location eastus -AdministratorUserName mysqltest -AdministratorLoginPassword $password -Sku Standard_B1ms -SkuTier Burstable -Version 12 -StorageInMb 10240
+-Location eastus -AdministratorUserName mysqltest -AdministratorLoginPassword $password -Sku Standard_B1ms -SkuTier Burstable -Version 12 -StorageInMb 10240 -PublicAccess none
-Name Location AdministratorLogin Version StorageProfileStorageMb SkuName SkuTier
----- -------- ------------------ ------- ----------------------- ------------ -------------
-mysql-test West US 2 mysqltest 5.7 10240 Standard_B1ms Burstable
-```
+Checking the existence of the resource group PowershellMySqlTest ...
+Resource group PowershellMySqlTest exists ? : True
+Creating MySQL server mysql-test in group MySqlTest...
+Your server mysql-test is using sku Standard_B1ms (Paid Tier). Please refer to https://aka.ms/mysql-pricing for pricing details
+
+Name Location SkuName SkuTier AdministratorLogin Version StorageProfileStorageMb
+---- -------- ------- ------- ------------------ ------- -----------------------
+mysql-test West US 2 Standard_B1ms Burstable mysqltest 5.7 10240
+```
### Example 2: Create a new MySql flexible server with default setting
```powershell
-PS C:\> New-AzMySqlFlexibleServer -Name mysql-test -ResourceGroupName PowershellMySqlTest \
--AdministratorUserName mysqltest -AdministratorLoginPassword $password
+PS C:\> New-AzMySqlFlexibleServer
+
+Creating resource group group00000000...
+Creating new vnet VNETserver00000000 in resource group group00000000
+Creating new subnet Subnetserver00000000 in resource group group00000000 and delegating it to Microsoft.DBforMySQL/flexibleServers
+Creating MySQL server server00000000 in group group00000000...
+Your server mysql-test is using sku Standard_B1ms (Paid Tier). Please refer to https://aka.ms/mysql-pricing for pricing details
+Creating database flexibleserverdb...
+
+Name Location SkuName SkuTier AdministratorLogin Version StorageProfileStorageMb
+---- -------- ------- ------- ------------------ ------- -----------------------
+mysql-test West US 2 Standard_B1ms Burstable mysqltest 5.7 10240
+```
+This cmdlet creates MySql flexible server with default parameter values and provision the server inside a new virtual network and have a subnet delegated to the server. The default values of location is West US 2, Sku is Standard_B1ms, Sku tier is Burstable, and storage size is 10GiB.
+
+If you want to find the auto-generated password for your server, use ConvertFrom-SecureString to convert 'SecuredPassword' property to plain text.
+(E.g., $server.SecuredPassword | ConvertFrom-SecureString -AsPlainText)
+
+### Example 3: Create a new MySql flexible server with virtual network
+```powershell
+PS C:\> $Vnet = 'vnetname'
+PS C:\> New-AzMySqlFlexibleServer -ResourceGroupName PowershellMySqlTest -Vnet $Vnet
+
+or
+
+PS C:\> $Vnet = '/subscriptions/00000000-0000-0000-0000-0000000000/resourceGroups/PowershellMySqlTest/providers/Microsoft.Network/virtualNetworks/vnetname'
+PS C:\> New-AzMySqlFlexibleServer -ResourceGroupName PowershellMySqlTest -Vnet $Vnet
+
+Resource group PowershellMySqlTest exists ? : True
+You have supplied a vnet Id/name. Verifying its existence...
+Creating new vnet vnetname in resource group PowershellMySqlTest
+Creating new subnet Subnetserver00000000 in resource group PowershellMySqlTest and delegating it to Microsoft.DBforMySQL/flexibleServers
+Creating MySQL server server00000000 in group PowershellMySqlTest...
+Your server server00000000 is using sku Standard_B1ms (Paid Tier). Please refer to https://aka.ms/mysql-pricing for pricing details
+Creating database flexibleserverdb...
+
+Name Location SkuName SkuTier AdministratorLogin Version StorageProfileStorageMb
+---- -------- ------- ------- ------------------ ------- -----------------------
+mysql-test West US 2 Standard_B1ms Burstable mysqltest 5.7 10240
+
+```
+This cmdlet creates MySql flexible server with vnet id or vnet name provided by a user. If the virtual network doesn't exist, the cmdlet creates one.
+
+### Example 4: Create a new MySql flexible server with virtual network and subnet name
+```powershell
+PS C:\> New-AzMySqlFlexibleServer -Name mysql-test -ResourceGroupName PowershellMySqlTest -Vnet mysql-vnet -Subnet mysql-subnet -VnetPrefix 10.0.0.0/16 -SubnetPrefix 10.0.0.0/24
+
+Resource group PowershellMySqlTest exists ? : True
+Creating new vnet mysql-vnet in resource group PowershellMySqlTest
+Creating new subnet mysql-subnet in resource group PowershellMySqlTest and delegating it to Microsoft.DBforMySQL/flexibleServers
+Creating MySQL server mysql-test in group PowershellMySqlTest...
+Your server mysql-test is using sku Standard_B1ms (Paid Tier). Please refer to https://aka.ms/mysql-pricing for pricing details
+Creating database flexibleserverdb...
+
+Name Location SkuName SkuTier AdministratorLogin Version StorageProfileStorageMb
+---- -------- ------- ------- ------------------ ------- -----------------------
+mysql-test West US 2 Standard_B1ms Burstable mysqltest 5.7 10240
-Name Location AdministratorLogin Version StorageProfileStorageMb SkuName SkuTier
----- -------- ------------------ ------- ----------------------- ------------ -------------
-mysql-test West US 2 mysqltest 5.7 131072 Standard_B1ms Burstable
```
+This cmdlet creates MySql flexible server with vnet name, subnet name, vnet prefix, and subnet prefix. If the virtual network and subnet don't exist, the cmdlet creates one.
+
+### Example 7: Create a new MySql flexible server with public access to all IPs
+```powershell
+PS C:\> New-AzMySqlFlexibleServer -Name mysql-test -ResourceGroupName PowershellMySqlTest -PublicAccess All
+
+Resource group PowershellMySqlTest exists ? : True
+Creating MySQL server mysql-test in group PowershellMySqlTest...
+Your server mysql-test is using sku Standard_B1ms (Paid Tier). Please refer to https://aka.ms/mysql-pricing for pricing details
+Creating database flexibleserverdb...
+Configuring server firewall rule to accept connections from 0.0.0.0 to 255.255.255.255
-Create MySql server with default values. The default values of location is West US 2, Sku is Standard_B1ms, Sku tier is Burstable, and storage size is 10GiB.
\ No newline at end of file
+Name Location SkuName SkuTier AdministratorLogin Version StorageProfileStorageMb
+---- -------- ------- ------- ------------------ ------- -----------------------
+mysql-test West US 2 Standard_B1ms Burstable mysqltest 5.7 10240
+```
+This cmdlet creates MySql flexible server open to all IP addresses.
+
+### Example 8: Create a new MySql flexible server with firewall
+```powershell
+PS C:\> New-AzMySqlFlexibleServer -Name mysql-test -ResourceGroupName PowershellMySqlTest -PublicAccess 10.10.10.10-10.10.10.12
+
+Resource group PowershellMySqlTest exists ? : True
+Creating MySQL server mysql-test in group PowershellMySqlTest...
+Your server mysql-test is using sku Standard_B1ms (Paid Tier). Please refer to https://aka.ms/mysql-pricing for pricing details
+Creating database flexibleserverdb...
+Configuring server firewall rule to accept connections from 10.10.10.10 to 10.10.10.12
+
+Name Location SkuName SkuTier AdministratorLogin Version StorageProfileStorageMb
+---- -------- ------- ------- ------------------ ------- -----------------------
+mysql-test West US 2 Standard_B1ms Burstable mysqltest 5.7 10240
+
+```
+This cmdlet creates MySql flexible server open to specified IP addresses.
diff --git a/src/MySql/exports/Get-AzMySqlConnectionString.ps1 b/src/MySql/exports/Get-AzMySqlConnectionString.ps1
index 5c460a398cda..236dc9524617 100644
--- a/src/MySql/exports/Get-AzMySqlConnectionString.ps1
+++ b/src/MySql/exports/Get-AzMySqlConnectionString.ps1
@@ -36,9 +36,8 @@ 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.
-INPUTOBJECT : The source server object to create replica from.
+INPUTOBJECT : The server for the connection string.
Location : The geo-location where the resource lives
- SkuName : The name of the sku, typically, tier + family + cores, e.g. B_Gen4_1, GP_Gen5_8.
[Tag ]: Resource tags.
[(Any) ]: This indicates any property can be added to this object.
[AdministratorLogin ]: The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation).
@@ -53,6 +52,7 @@ INPUTOBJECT : The source server object to create replica from.
[ReplicationRole ]: The replication role of the server.
[SkuCapacity ]: The scale up/out capacity, representing server's compute units.
[SkuFamily ]: The family of hardware.
+ [SkuName ]: The name of the sku, typically, tier + family + cores, e.g. B_Gen4_1, GP_Gen5_8.
[SkuSize ]: The size code, to be interpreted by resource as appropriate.
[SkuTier ]: The tier of the particular SKU, e.g. Basic.
[SslEnforcement ]: Enable ssl enforcement or not when connect to server.
@@ -98,7 +98,7 @@ param(
[Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServer]
- # The source server object to create replica from.
+ # The server for the connection string.
# To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},
diff --git a/src/MySql/exports/Get-AzMySqlFlexibleServerConnectionString.ps1 b/src/MySql/exports/Get-AzMySqlFlexibleServerConnectionString.ps1
new file mode 100644
index 000000000000..90862b961add
--- /dev/null
+++ b/src/MySql/exports/Get-AzMySqlFlexibleServerConnectionString.ps1
@@ -0,0 +1,177 @@
+
+# ----------------------------------------------------------------------------------
+#
+# Copyright Microsoft Corporation
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Get the connection string according to client connection provider.
+.Description
+Get the connection string according to client connection provider.
+.Example
+PS C:\> Get-AzMySqlFlexibleServerConnectionString -Client Python -ResourceGroupName PowershellMySqlTest -Name mysql-test
+
+cnx = mysql.connector.connect(user=mysql_user, password="{your_password}", host="mysql-test.mysql.database.azure.com", port=3306, database="{your_database}", ssl_ca="{ca-cert filename}", ssl_disabled=False)
+.Example
+PS C:\> Get-AzMySqlFlexibleServer -ResourceGroupName PowershellMySqlTest -ServerName mysql-test | Get-AzMySqlFlexibleServerConnectionString -Client PHP
+
+$con=mysqli_init(); mysqli_real_connect($con, "mysql-test.mysql.database.azure.com", "mysql_test", {your_password}, {your_database}, 3306);
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.IMySqlIdentity
+.Outputs
+System.String
+.Notes
+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.
+
+INPUTOBJECT : The server for the connection string.
+ [ConfigurationName ]: The name of the server configuration.
+ [DatabaseName ]: The name of the database.
+ [FirewallRuleName ]: The name of the server firewall rule.
+ [Id ]: Resource identity path
+ [KeyName ]: The name of the server key.
+ [LocationName ]: The name of the location.
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [SecurityAlertPolicyName ]: The name of the security alert policy.
+ [ServerName ]: The name of the server.
+ [SubscriptionId ]: The ID of the target subscription.
+ [VirtualNetworkRuleName ]: The name of the virtual network rule.
+.Link
+https://docs.microsoft.com/en-us/powershell/module/az.mysql/get-azmysqlflexibleserverconnectionstring
+#>
+function Get-AzMySqlFlexibleServerConnectionString {
+[OutputType([System.String])]
+[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)]
+param(
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Path')]
+ [System.String]
+ # Client connection provider.
+ ${Client},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Alias('ServerName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Path')]
+ [System.String]
+ # The name of the server.
+ ${Name},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Path')]
+ [System.String]
+ # The name of the resource group that contains the resource, You can obtain this value from the Azure Resource Manager API or the portal.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='Get')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # The subscription ID that identifies an Azure subscription.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.IMySqlIdentity]
+ # The server for the connection string.
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach.
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline.
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline.
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use.
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call.
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy.
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+ $mapping = @{
+ Get = 'Az.MySql.custom\Get-AzMySqlFlexibleServerConnectionString';
+ GetViaIdentity = 'Az.MySql.custom\Get-AzMySqlFlexibleServerConnectionString';
+ }
+ if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ throw
+ }
+}
+
+end {
+ try {
+ $steppablePipeline.End()
+ } catch {
+ throw
+ }
+}
+}
diff --git a/src/MySql/exports/Get-AzMySqlFlexibleServerLocationBasedCapability.ps1 b/src/MySql/exports/Get-AzMySqlFlexibleServerLocationBasedCapability.ps1
new file mode 100644
index 000000000000..7a4e1a05b3ef
--- /dev/null
+++ b/src/MySql/exports/Get-AzMySqlFlexibleServerLocationBasedCapability.ps1
@@ -0,0 +1,153 @@
+
+# ----------------------------------------------------------------------------------
+#
+# Copyright Microsoft Corporation
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Get the available SKU information for the location
+.Description
+Get the available SKU information for the location
+.Example
+PS C:\> Get-AzMySqlFlexibleServerLocationBasedCapability -Location westus2
+"Please refer to https://aka.ms/mysql-pricing for pricing details"
+
+SKU Tier Memory vCore
+--- ---- ------ -----
+Standard_B1s Burstable 1024 1
+Standard_B1ms Burstable 2048 1
+Standard_B2s Burstable 2048 2
+Standard_D2ds_v4 GeneralPurpose 4096 2
+Standard_D4ds_v4 GeneralPurpose 4096 4
+Standard_D8ds_v4 GeneralPurpose 4096 8
+Standard_D16ds_v4 GeneralPurpose 4096 16
+Standard_D32ds_v4 GeneralPurpose 4096 32
+Standard_D48ds_v4 GeneralPurpose 4096 48
+Standard_D64ds_v4 GeneralPurpose 4096 64
+Standard_E2ds_v4 MemoryOptimized 8192 2
+Standard_E4ds_v4 MemoryOptimized 8192 4
+Standard_E8ds_v4 MemoryOptimized 8192 8
+Standard_E16ds_v4 MemoryOptimized 8192 16
+Standard_E32ds_v4 MemoryOptimized 8192 32
+Standard_E48ds_v4 MemoryOptimized 8192 48
+Standard_E64ds_v4 MemoryOptimized 8192 64
+
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ICapabilityProperties
+.Link
+https://docs.microsoft.com/en-us/powershell/module/az.mysql/get-azmysqlflexibleserverlocationbasedcapability
+#>
+function Get-AzMySqlFlexibleServerLocationBasedCapability {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ICapabilityProperties])]
+[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
+param(
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Path')]
+ [System.String]
+ # The name of the location.
+ ${Location},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String[]]
+ # The ID of the target subscription.
+ ${SubscriptionId},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+ $mapping = @{
+ List = 'Az.MySql.custom\Get-AzMySqlFlexibleServerLocationBasedCapability';
+ }
+ if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ throw
+ }
+}
+
+end {
+ try {
+ $steppablePipeline.End()
+ } catch {
+ throw
+ }
+}
+}
diff --git a/src/MySql/exports/New-AzMySqlFlexibleServer.ps1 b/src/MySql/exports/New-AzMySqlFlexibleServer.ps1
index 1a17c29c3d75..e1e7ac36f113 100644
--- a/src/MySql/exports/New-AzMySqlFlexibleServer.ps1
+++ b/src/MySql/exports/New-AzMySqlFlexibleServer.ps1
@@ -15,23 +15,95 @@
<#
.Synopsis
-Creates a new MySQL flexible server
+Creates a new MySQL flexible server.
.Description
-Creates a new server.
+Creates a new MySQL flexible server.
.Example
PS C:\> New-AzMySqlFlexibleServer -Name mysql-test -ResourceGroupName PowershellMySqlTest \
--Location eastus -AdministratorUserName mysqltest -AdministratorLoginPassword $password -Sku Standard_B1ms -SkuTier Burstable -Version 12 -StorageInMb 10240
+-Location eastus -AdministratorUserName mysqltest -AdministratorLoginPassword $password -Sku Standard_B1ms -SkuTier Burstable -Version 12 -StorageInMb 10240 -PublicAccess none
+
+Checking the existence of the resource group PowershellMySqlTest ...
+Resource group PowershellMySqlTest exists ? : True
+Creating MySQL server mysql-test in group MySqlTest...
+Your server mysql-test is using sku Standard_B1ms (Paid Tier). Please refer to https://aka.ms/mysql-pricing for pricing details
+
+Name Location SkuName SkuTier AdministratorLogin Version StorageProfileStorageMb
+---- -------- ------- ------- ------------------ ------- -----------------------
+mysql-test West US 2 Standard_B1ms Burstable mysqltest 5.7 10240
-Name Location AdministratorLogin Version StorageProfileStorageMb SkuName SkuTier
----- -------- ------------------ ------- ----------------------- ------------ -------------
-mysql-test West US 2 mysqltest 5.7 10240 Standard_B1ms Burstable
.Example
-PS C:\> New-AzMySqlFlexibleServer -Name mysql-test -ResourceGroupName PowershellMySqlTest \
--AdministratorUserName mysqltest -AdministratorLoginPassword $password
+PS C:\> New-AzMySqlFlexibleServer
+
+Creating resource group group00000000...
+Creating new vnet VNETserver00000000 in resource group group00000000
+Creating new subnet Subnetserver00000000 in resource group group00000000 and delegating it to Microsoft.DBforMySQL/flexibleServers
+Creating MySQL server server00000000 in group group00000000...
+Your server mysql-test is using sku Standard_B1ms (Paid Tier). Please refer to https://aka.ms/mysql-pricing for pricing details
+Creating database flexibleserverdb...
+
+Name Location SkuName SkuTier AdministratorLogin Version StorageProfileStorageMb
+---- -------- ------- ------- ------------------ ------- -----------------------
+mysql-test West US 2 Standard_B1ms Burstable mysqltest 5.7 10240
+.Example
+PS C:\> $Vnet = 'vnetname'
+PS C:\> New-AzMySqlFlexibleServer -ResourceGroupName PowershellMySqlTest -Vnet $Vnet
+
+or
+
+PS C:\> $Vnet = '/subscriptions/00000000-0000-0000-0000-0000000000/resourceGroups/PowershellMySqlTest/providers/Microsoft.Network/virtualNetworks/vnetname'
+PS C:\> New-AzMySqlFlexibleServer -ResourceGroupName PowershellMySqlTest -Vnet $Vnet
+
+Resource group PowershellMySqlTest exists ? : True
+You have supplied a vnet Id/name. Verifying its existence...
+Creating new vnet vnetname in resource group PowershellMySqlTest
+Creating new subnet Subnetserver00000000 in resource group PowershellMySqlTest and delegating it to Microsoft.DBforMySQL/flexibleServers
+Creating MySQL server server00000000 in group PowershellMySqlTest...
+Your server server00000000 is using sku Standard_B1ms (Paid Tier). Please refer to https://aka.ms/mysql-pricing for pricing details
+Creating database flexibleserverdb...
+
+Name Location SkuName SkuTier AdministratorLogin Version StorageProfileStorageMb
+---- -------- ------- ------- ------------------ ------- -----------------------
+mysql-test West US 2 Standard_B1ms Burstable mysqltest 5.7 10240
+
+.Example
+PS C:\> New-AzMySqlFlexibleServer -Name mysql-test -ResourceGroupName PowershellMySqlTest -Vnet mysql-vnet -Subnet mysql-subnet -VnetPrefix 10.0.0.0/16 -SubnetPrefix 10.0.0.0/24
+
+Resource group PowershellMySqlTest exists ? : True
+Creating new vnet mysql-vnet in resource group PowershellMySqlTest
+Creating new subnet mysql-subnet in resource group PowershellMySqlTest and delegating it to Microsoft.DBforMySQL/flexibleServers
+Creating MySQL server mysql-test in group PowershellMySqlTest...
+Your server mysql-test is using sku Standard_B1ms (Paid Tier). Please refer to https://aka.ms/mysql-pricing for pricing details
+Creating database flexibleserverdb...
+
+Name Location SkuName SkuTier AdministratorLogin Version StorageProfileStorageMb
+---- -------- ------- ------- ------------------ ------- -----------------------
+mysql-test West US 2 Standard_B1ms Burstable mysqltest 5.7 10240
+
+.Example
+PS C:\> New-AzMySqlFlexibleServer -Name mysql-test -ResourceGroupName PowershellMySqlTest -PublicAccess All
+
+Resource group PowershellMySqlTest exists ? : True
+Creating MySQL server mysql-test in group PowershellMySqlTest...
+Your server mysql-test is using sku Standard_B1ms (Paid Tier). Please refer to https://aka.ms/mysql-pricing for pricing details
+Creating database flexibleserverdb...
+Configuring server firewall rule to accept connections from 0.0.0.0 to 255.255.255.255
+
+Name Location SkuName SkuTier AdministratorLogin Version StorageProfileStorageMb
+---- -------- ------- ------- ------------------ ------- -----------------------
+mysql-test West US 2 Standard_B1ms Burstable mysqltest 5.7 10240
+.Example
+PS C:\> New-AzMySqlFlexibleServer -Name mysql-test -ResourceGroupName PowershellMySqlTest -PublicAccess 10.10.10.10-10.10.10.12
+
+Resource group PowershellMySqlTest exists ? : True
+Creating MySQL server mysql-test in group PowershellMySqlTest...
+Your server mysql-test is using sku Standard_B1ms (Paid Tier). Please refer to https://aka.ms/mysql-pricing for pricing details
+Creating database flexibleserverdb...
+Configuring server firewall rule to accept connections from 10.10.10.10 to 10.10.10.12
+
+Name Location SkuName SkuTier AdministratorLogin Version StorageProfileStorageMb
+---- -------- ------- ------- ------------------ ------- -----------------------
+mysql-test West US 2 Standard_B1ms Burstable mysqltest 5.7 10240
-Name Location AdministratorLogin Version StorageProfileStorageMb SkuName SkuTier
----- -------- ------------------ ------- ----------------------- ------------ -------------
-mysql-test West US 2 mysqltest 5.7 131072 Standard_B1ms Burstable
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerAutoGenerated
@@ -42,14 +114,14 @@ function New-AzMySqlFlexibleServer {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerAutoGenerated])]
[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
- [Parameter(Mandatory)]
+ [Parameter()]
[Alias('ServerName')]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Path')]
[System.String]
# The name of the server.
${Name},
- [Parameter(Mandatory)]
+ [Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Path')]
[System.String]
# The name of the resource group that contains the resource, You can obtain this value from the Azure Resource Manager API or the portal.
@@ -62,14 +134,20 @@ param(
# The subscription ID that identifies an Azure subscription.
${SubscriptionId},
- [Parameter(Mandatory)]
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
+ [System.String]
+ # The location the resource resides in.
+ ${Location},
+
+ [Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
[System.String]
# Administrator username for the server.
# Once set, it cannot be changed.
${AdministratorUserName},
- [Parameter(Mandatory)]
+ [Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
[System.Security.SecureString]
# The password of the administrator.
@@ -77,12 +155,6 @@ param(
# Password must contain characters from three of the following categories: English uppercase letters, English lowercase letters, numbers, and non-alphanumeric characters.
${AdministratorLoginPassword},
- [Parameter()]
- [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
- [System.String]
- # The location the resource resides in.
- ${Location},
-
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
[System.String]
@@ -125,6 +197,58 @@ param(
# Server version.
${Version},
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
+ [System.String]
+ # The subnet IP address prefix to use when creating a new vnet in CIDR format.
+ # Default value is 10.0.0.0/24.
+ ${SubnetPrefix},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
+ [System.String]
+ # The Name or Id of an existing Subnet or name of a new one to create.
+ # Please note that the subnet will be delegated to Microsoft.DBforMySQL/flexibleServers.
+ # After delegation, this subnet cannot be used for any other type of Azure resources.
+ ${Subnet},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
+ [System.String]
+ # The IP address prefix to use when creating a new vnet in CIDR format.
+ # Default value is 10.0.0.0/16.
+ ${VnetPrefix},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
+ [System.String]
+ # The Name or Id of an existing virtual network or name of a new one to create.
+ # The name must be between 2 to 64 characters.
+ # The name must begin with a letter or number, end with a letter, number or underscore, and may contain only letters, numbers, underscores, periods, or hyphens.
+ ${Vnet},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
+ [System.String]
+ # Determines the public access.
+ # Enter single or range of IP addresses to be
+ # included in the allowed list of IPs.
+ # IP address ranges must be dash-
+ # separated and not contain any spaces.
+ # Specifying 0.0.0.0 allows public
+ # access from any resources deployed within Azure to access your server.
+ # Specifying no IP address sets the server in public access mode but does
+ # not create a firewall rule.
+ ${PublicAccess},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
+ [System.Object]
+ # Enable or disable high availability feature.
+ # Default value is Disabled.
+ # Default: Disabled.
+ ${HighAvailability},
+
[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
@@ -149,14 +273,12 @@ param(
[ValidateNotNull()]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.SendAsyncStep[]]
- # SendAsync Pipeline Steps to be appended to the front of the pipeline.
${HttpPipelineAppend},
[Parameter(DontShow)]
[ValidateNotNull()]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.SendAsyncStep[]]
- # SendAsync Pipeline Steps to be prepended to the front of the pipeline.
${HttpPipelinePrepend},
[Parameter()]
@@ -168,20 +290,17 @@ param(
[Parameter(DontShow)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
[System.Uri]
- # The URI for the proxy server to use.
${Proxy},
[Parameter(DontShow)]
[ValidateNotNull()]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
[System.Management.Automation.PSCredential]
- # Credentials for a proxy server to use for the remote call.
${ProxyCredential},
[Parameter(DontShow)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
[System.Management.Automation.SwitchParameter]
- # Use the default credentials for the proxy.
${ProxyUseDefaultCredentials}
)
diff --git a/src/MySql/exports/New-AzMySqlFlexibleServerReplica.ps1 b/src/MySql/exports/New-AzMySqlFlexibleServerReplica.ps1
index d51bc9e3d3ae..30a1673dd79f 100644
--- a/src/MySql/exports/New-AzMySqlFlexibleServerReplica.ps1
+++ b/src/MySql/exports/New-AzMySqlFlexibleServerReplica.ps1
@@ -43,8 +43,6 @@ To create the parameters described below, construct a hash table containing the
MASTER : The source server object to create replica from.
Location : The geo-location where the resource lives
- SkuName : The name of the sku, e.g. Standard_D32s_v3.
- SkuTier : The tier of the particular SKU, e.g. GeneralPurpose.
[Tag ]: Resource tags.
[(Any) ]: This indicates any property can be added to this object.
[AdministratorLogin ]: The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation).
@@ -63,6 +61,8 @@ MASTER : The source server object to create replica from.
[(Any) ]: This indicates any property can be added to this object.
[ReplicationRole ]: The replication role.
[RestorePointInTime ]: Restore point creation time (ISO8601 format), specifying the time to restore from.
+ [SkuName ]: The name of the sku, e.g. Standard_D32s_v3.
+ [SkuTier ]: The tier of the particular SKU, e.g. GeneralPurpose.
[SourceServerId ]: The source MySQL server id.
[SslEnforcement ]: Enable ssl enforcement or not when connect to server.
[StorageProfileBackupRetentionDay ]: Backup retention days for the server.
diff --git a/src/MySql/exports/New-AzMySqlReplica.ps1 b/src/MySql/exports/New-AzMySqlReplica.ps1
index 6c3142532b6b..f856b5143777 100644
--- a/src/MySql/exports/New-AzMySqlReplica.ps1
+++ b/src/MySql/exports/New-AzMySqlReplica.ps1
@@ -43,7 +43,6 @@ To create the parameters described below, construct a hash table containing the
MASTER : The source server object to create replica from.
Location : The geo-location where the resource lives
- SkuName : The name of the sku, typically, tier + family + cores, e.g. B_Gen4_1, GP_Gen5_8.
[Tag ]: Resource tags.
[(Any) ]: This indicates any property can be added to this object.
[AdministratorLogin ]: The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation).
@@ -58,6 +57,7 @@ MASTER : The source server object to create replica from.
[ReplicationRole ]: The replication role of the server.
[SkuCapacity ]: The scale up/out capacity, representing server's compute units.
[SkuFamily ]: The family of hardware.
+ [SkuName ]: The name of the sku, typically, tier + family + cores, e.g. B_Gen4_1, GP_Gen5_8.
[SkuSize ]: The size code, to be interpreted by resource as appropriate.
[SkuTier ]: The tier of the particular SKU, e.g. Basic.
[SslEnforcement ]: Enable ssl enforcement or not when connect to server.
diff --git a/src/MySql/exports/New-AzMySqlServer.ps1 b/src/MySql/exports/New-AzMySqlServer.ps1
index ffebff86539d..c35fd6c2a799 100644
--- a/src/MySql/exports/New-AzMySqlServer.ps1
+++ b/src/MySql/exports/New-AzMySqlServer.ps1
@@ -89,6 +89,14 @@ param(
# Enable ssl enforcement or not when connect to server.
${SslEnforcement},
+ [Parameter()]
+ [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.MinimalTlsVersionEnum])]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.MinimalTlsVersionEnum]
+ # Set the minimal TLS version for connections to server when SSL is enabled.
+ # Default is TLSEnforcementDisabled.accepted values: TLS1_0, TLS1_1, TLS1_2, TLSEnforcementDisabled.
+ ${MinimalTlsVersion},
+
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
[System.Int32]
diff --git a/src/MySql/exports/ProxyCmdletDefinitions.ps1 b/src/MySql/exports/ProxyCmdletDefinitions.ps1
index f33e96c5f8c4..1ebe87407ab0 100644
--- a/src/MySql/exports/ProxyCmdletDefinitions.ps1
+++ b/src/MySql/exports/ProxyCmdletDefinitions.ps1
@@ -4588,9 +4588,8 @@ 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.
-INPUTOBJECT : The source server object to create replica from.
+INPUTOBJECT : The server for the connection string.
Location : The geo-location where the resource lives
- SkuName : The name of the sku, typically, tier + family + cores, e.g. B_Gen4_1, GP_Gen5_8.
[Tag ]: Resource tags.
[(Any) ]: This indicates any property can be added to this object.
[AdministratorLogin ]: The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation).
@@ -4605,6 +4604,7 @@ INPUTOBJECT : The source server object to create replica from.
[ReplicationRole ]: The replication role of the server.
[SkuCapacity ]: The scale up/out capacity, representing server's compute units.
[SkuFamily ]: The family of hardware.
+ [SkuName ]: The name of the sku, typically, tier + family + cores, e.g. B_Gen4_1, GP_Gen5_8.
[SkuSize ]: The size code, to be interpreted by resource as appropriate.
[SkuTier ]: The tier of the particular SKU, e.g. Basic.
[SslEnforcement ]: Enable ssl enforcement or not when connect to server.
@@ -4650,7 +4650,7 @@ param(
[Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServer]
- # The source server object to create replica from.
+ # The server for the connection string.
# To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},
@@ -4751,6 +4751,336 @@ end {
# limitations under the License.
# ----------------------------------------------------------------------------------
+<#
+.Synopsis
+Get the connection string according to client connection provider.
+.Description
+Get the connection string according to client connection provider.
+.Example
+PS C:\> Get-AzMySqlFlexibleServerConnectionString -Client Python -ResourceGroupName PowershellMySqlTest -Name mysql-test
+
+cnx = mysql.connector.connect(user=mysql_user, password="{your_password}", host="mysql-test.mysql.database.azure.com", port=3306, database="{your_database}", ssl_ca="{ca-cert filename}", ssl_disabled=False)
+.Example
+PS C:\> Get-AzMySqlFlexibleServer -ResourceGroupName PowershellMySqlTest -ServerName mysql-test | Get-AzMySqlFlexibleServerConnectionString -Client PHP
+
+$con=mysqli_init(); mysqli_real_connect($con, "mysql-test.mysql.database.azure.com", "mysql_test", {your_password}, {your_database}, 3306);
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.IMySqlIdentity
+.Outputs
+System.String
+.Notes
+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.
+
+INPUTOBJECT : The server for the connection string.
+ [ConfigurationName ]: The name of the server configuration.
+ [DatabaseName ]: The name of the database.
+ [FirewallRuleName ]: The name of the server firewall rule.
+ [Id ]: Resource identity path
+ [KeyName ]: The name of the server key.
+ [LocationName ]: The name of the location.
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [SecurityAlertPolicyName ]: The name of the security alert policy.
+ [ServerName ]: The name of the server.
+ [SubscriptionId ]: The ID of the target subscription.
+ [VirtualNetworkRuleName ]: The name of the virtual network rule.
+.Link
+https://docs.microsoft.com/en-us/powershell/module/az.mysql/get-azmysqlflexibleserverconnectionstring
+#>
+function Get-AzMySqlFlexibleServerConnectionString {
+[OutputType([System.String])]
+[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)]
+param(
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Path')]
+ [System.String]
+ # Client connection provider.
+ ${Client},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Alias('ServerName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Path')]
+ [System.String]
+ # The name of the server.
+ ${Name},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Path')]
+ [System.String]
+ # The name of the resource group that contains the resource, You can obtain this value from the Azure Resource Manager API or the portal.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='Get')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # The subscription ID that identifies an Azure subscription.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.IMySqlIdentity]
+ # The server for the connection string.
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach.
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline.
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline.
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use.
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call.
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy.
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+ $mapping = @{
+ Get = 'Az.MySql.custom\Get-AzMySqlFlexibleServerConnectionString';
+ GetViaIdentity = 'Az.MySql.custom\Get-AzMySqlFlexibleServerConnectionString';
+ }
+ if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ throw
+ }
+}
+
+end {
+ try {
+ $steppablePipeline.End()
+ } catch {
+ throw
+ }
+}
+}
+
+# ----------------------------------------------------------------------------------
+#
+# Copyright Microsoft Corporation
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Get the available SKU information for the location
+.Description
+Get the available SKU information for the location
+.Example
+PS C:\> Get-AzMySqlFlexibleServerLocationBasedCapability -Location westus2
+"Please refer to https://aka.ms/mysql-pricing for pricing details"
+
+SKU Tier Memory vCore
+--- ---- ------ -----
+Standard_B1s Burstable 1024 1
+Standard_B1ms Burstable 2048 1
+Standard_B2s Burstable 2048 2
+Standard_D2ds_v4 GeneralPurpose 4096 2
+Standard_D4ds_v4 GeneralPurpose 4096 4
+Standard_D8ds_v4 GeneralPurpose 4096 8
+Standard_D16ds_v4 GeneralPurpose 4096 16
+Standard_D32ds_v4 GeneralPurpose 4096 32
+Standard_D48ds_v4 GeneralPurpose 4096 48
+Standard_D64ds_v4 GeneralPurpose 4096 64
+Standard_E2ds_v4 MemoryOptimized 8192 2
+Standard_E4ds_v4 MemoryOptimized 8192 4
+Standard_E8ds_v4 MemoryOptimized 8192 8
+Standard_E16ds_v4 MemoryOptimized 8192 16
+Standard_E32ds_v4 MemoryOptimized 8192 32
+Standard_E48ds_v4 MemoryOptimized 8192 48
+Standard_E64ds_v4 MemoryOptimized 8192 64
+
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ICapabilityProperties
+.Link
+https://docs.microsoft.com/en-us/powershell/module/az.mysql/get-azmysqlflexibleserverlocationbasedcapability
+#>
+function Get-AzMySqlFlexibleServerLocationBasedCapability {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ICapabilityProperties])]
+[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
+param(
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Path')]
+ [System.String]
+ # The name of the location.
+ ${Location},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String[]]
+ # The ID of the target subscription.
+ ${SubscriptionId},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+ $mapping = @{
+ List = 'Az.MySql.custom\Get-AzMySqlFlexibleServerLocationBasedCapability';
+ }
+ if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ throw
+ }
+}
+
+end {
+ try {
+ $steppablePipeline.End()
+ } catch {
+ throw
+ }
+}
+}
+
+# ----------------------------------------------------------------------------------
+#
+# Copyright Microsoft Corporation
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------------
+
<#
.Synopsis
Creates a new firewall rule or updates an existing firewall rule.
@@ -4957,23 +5287,95 @@ end {
<#
.Synopsis
-Creates a new MySQL flexible server
+Creates a new MySQL flexible server.
.Description
-Creates a new server.
+Creates a new MySQL flexible server.
.Example
PS C:\> New-AzMySqlFlexibleServer -Name mysql-test -ResourceGroupName PowershellMySqlTest \
--Location eastus -AdministratorUserName mysqltest -AdministratorLoginPassword $password -Sku Standard_B1ms -SkuTier Burstable -Version 12 -StorageInMb 10240
+-Location eastus -AdministratorUserName mysqltest -AdministratorLoginPassword $password -Sku Standard_B1ms -SkuTier Burstable -Version 12 -StorageInMb 10240 -PublicAccess none
+
+Checking the existence of the resource group PowershellMySqlTest ...
+Resource group PowershellMySqlTest exists ? : True
+Creating MySQL server mysql-test in group MySqlTest...
+Your server mysql-test is using sku Standard_B1ms (Paid Tier). Please refer to https://aka.ms/mysql-pricing for pricing details
+
+Name Location SkuName SkuTier AdministratorLogin Version StorageProfileStorageMb
+---- -------- ------- ------- ------------------ ------- -----------------------
+mysql-test West US 2 Standard_B1ms Burstable mysqltest 5.7 10240
-Name Location AdministratorLogin Version StorageProfileStorageMb SkuName SkuTier
----- -------- ------------------ ------- ----------------------- ------------ -------------
-mysql-test West US 2 mysqltest 5.7 10240 Standard_B1ms Burstable
.Example
-PS C:\> New-AzMySqlFlexibleServer -Name mysql-test -ResourceGroupName PowershellMySqlTest \
--AdministratorUserName mysqltest -AdministratorLoginPassword $password
+PS C:\> New-AzMySqlFlexibleServer
+
+Creating resource group group00000000...
+Creating new vnet VNETserver00000000 in resource group group00000000
+Creating new subnet Subnetserver00000000 in resource group group00000000 and delegating it to Microsoft.DBforMySQL/flexibleServers
+Creating MySQL server server00000000 in group group00000000...
+Your server mysql-test is using sku Standard_B1ms (Paid Tier). Please refer to https://aka.ms/mysql-pricing for pricing details
+Creating database flexibleserverdb...
+
+Name Location SkuName SkuTier AdministratorLogin Version StorageProfileStorageMb
+---- -------- ------- ------- ------------------ ------- -----------------------
+mysql-test West US 2 Standard_B1ms Burstable mysqltest 5.7 10240
+.Example
+PS C:\> $Vnet = 'vnetname'
+PS C:\> New-AzMySqlFlexibleServer -ResourceGroupName PowershellMySqlTest -Vnet $Vnet
+
+or
+
+PS C:\> $Vnet = '/subscriptions/00000000-0000-0000-0000-0000000000/resourceGroups/PowershellMySqlTest/providers/Microsoft.Network/virtualNetworks/vnetname'
+PS C:\> New-AzMySqlFlexibleServer -ResourceGroupName PowershellMySqlTest -Vnet $Vnet
+
+Resource group PowershellMySqlTest exists ? : True
+You have supplied a vnet Id/name. Verifying its existence...
+Creating new vnet vnetname in resource group PowershellMySqlTest
+Creating new subnet Subnetserver00000000 in resource group PowershellMySqlTest and delegating it to Microsoft.DBforMySQL/flexibleServers
+Creating MySQL server server00000000 in group PowershellMySqlTest...
+Your server server00000000 is using sku Standard_B1ms (Paid Tier). Please refer to https://aka.ms/mysql-pricing for pricing details
+Creating database flexibleserverdb...
+
+Name Location SkuName SkuTier AdministratorLogin Version StorageProfileStorageMb
+---- -------- ------- ------- ------------------ ------- -----------------------
+mysql-test West US 2 Standard_B1ms Burstable mysqltest 5.7 10240
+
+.Example
+PS C:\> New-AzMySqlFlexibleServer -Name mysql-test -ResourceGroupName PowershellMySqlTest -Vnet mysql-vnet -Subnet mysql-subnet -VnetPrefix 10.0.0.0/16 -SubnetPrefix 10.0.0.0/24
+
+Resource group PowershellMySqlTest exists ? : True
+Creating new vnet mysql-vnet in resource group PowershellMySqlTest
+Creating new subnet mysql-subnet in resource group PowershellMySqlTest and delegating it to Microsoft.DBforMySQL/flexibleServers
+Creating MySQL server mysql-test in group PowershellMySqlTest...
+Your server mysql-test is using sku Standard_B1ms (Paid Tier). Please refer to https://aka.ms/mysql-pricing for pricing details
+Creating database flexibleserverdb...
+
+Name Location SkuName SkuTier AdministratorLogin Version StorageProfileStorageMb
+---- -------- ------- ------- ------------------ ------- -----------------------
+mysql-test West US 2 Standard_B1ms Burstable mysqltest 5.7 10240
+
+.Example
+PS C:\> New-AzMySqlFlexibleServer -Name mysql-test -ResourceGroupName PowershellMySqlTest -PublicAccess All
+
+Resource group PowershellMySqlTest exists ? : True
+Creating MySQL server mysql-test in group PowershellMySqlTest...
+Your server mysql-test is using sku Standard_B1ms (Paid Tier). Please refer to https://aka.ms/mysql-pricing for pricing details
+Creating database flexibleserverdb...
+Configuring server firewall rule to accept connections from 0.0.0.0 to 255.255.255.255
+
+Name Location SkuName SkuTier AdministratorLogin Version StorageProfileStorageMb
+---- -------- ------- ------- ------------------ ------- -----------------------
+mysql-test West US 2 Standard_B1ms Burstable mysqltest 5.7 10240
+.Example
+PS C:\> New-AzMySqlFlexibleServer -Name mysql-test -ResourceGroupName PowershellMySqlTest -PublicAccess 10.10.10.10-10.10.10.12
+
+Resource group PowershellMySqlTest exists ? : True
+Creating MySQL server mysql-test in group PowershellMySqlTest...
+Your server mysql-test is using sku Standard_B1ms (Paid Tier). Please refer to https://aka.ms/mysql-pricing for pricing details
+Creating database flexibleserverdb...
+Configuring server firewall rule to accept connections from 10.10.10.10 to 10.10.10.12
+
+Name Location SkuName SkuTier AdministratorLogin Version StorageProfileStorageMb
+---- -------- ------- ------- ------------------ ------- -----------------------
+mysql-test West US 2 Standard_B1ms Burstable mysqltest 5.7 10240
-Name Location AdministratorLogin Version StorageProfileStorageMb SkuName SkuTier
----- -------- ------------------ ------- ----------------------- ------------ -------------
-mysql-test West US 2 mysqltest 5.7 131072 Standard_B1ms Burstable
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerAutoGenerated
@@ -4984,14 +5386,14 @@ function New-AzMySqlFlexibleServer {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerAutoGenerated])]
[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
- [Parameter(Mandatory)]
+ [Parameter()]
[Alias('ServerName')]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Path')]
[System.String]
# The name of the server.
${Name},
- [Parameter(Mandatory)]
+ [Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Path')]
[System.String]
# The name of the resource group that contains the resource, You can obtain this value from the Azure Resource Manager API or the portal.
@@ -5004,14 +5406,20 @@ param(
# The subscription ID that identifies an Azure subscription.
${SubscriptionId},
- [Parameter(Mandatory)]
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
+ [System.String]
+ # The location the resource resides in.
+ ${Location},
+
+ [Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
[System.String]
# Administrator username for the server.
# Once set, it cannot be changed.
${AdministratorUserName},
- [Parameter(Mandatory)]
+ [Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
[System.Security.SecureString]
# The password of the administrator.
@@ -5019,12 +5427,6 @@ param(
# Password must contain characters from three of the following categories: English uppercase letters, English lowercase letters, numbers, and non-alphanumeric characters.
${AdministratorLoginPassword},
- [Parameter()]
- [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
- [System.String]
- # The location the resource resides in.
- ${Location},
-
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
[System.String]
@@ -5067,6 +5469,58 @@ param(
# Server version.
${Version},
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
+ [System.String]
+ # The subnet IP address prefix to use when creating a new vnet in CIDR format.
+ # Default value is 10.0.0.0/24.
+ ${SubnetPrefix},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
+ [System.String]
+ # The Name or Id of an existing Subnet or name of a new one to create.
+ # Please note that the subnet will be delegated to Microsoft.DBforMySQL/flexibleServers.
+ # After delegation, this subnet cannot be used for any other type of Azure resources.
+ ${Subnet},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
+ [System.String]
+ # The IP address prefix to use when creating a new vnet in CIDR format.
+ # Default value is 10.0.0.0/16.
+ ${VnetPrefix},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
+ [System.String]
+ # The Name or Id of an existing virtual network or name of a new one to create.
+ # The name must be between 2 to 64 characters.
+ # The name must begin with a letter or number, end with a letter, number or underscore, and may contain only letters, numbers, underscores, periods, or hyphens.
+ ${Vnet},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
+ [System.String]
+ # Determines the public access.
+ # Enter single or range of IP addresses to be
+ # included in the allowed list of IPs.
+ # IP address ranges must be dash-
+ # separated and not contain any spaces.
+ # Specifying 0.0.0.0 allows public
+ # access from any resources deployed within Azure to access your server.
+ # Specifying no IP address sets the server in public access mode but does
+ # not create a firewall rule.
+ ${PublicAccess},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
+ [System.Object]
+ # Enable or disable high availability feature.
+ # Default value is Disabled.
+ # Default: Disabled.
+ ${HighAvailability},
+
[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
@@ -5091,14 +5545,12 @@ param(
[ValidateNotNull()]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.SendAsyncStep[]]
- # SendAsync Pipeline Steps to be appended to the front of the pipeline.
${HttpPipelineAppend},
[Parameter(DontShow)]
[ValidateNotNull()]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.SendAsyncStep[]]
- # SendAsync Pipeline Steps to be prepended to the front of the pipeline.
${HttpPipelinePrepend},
[Parameter()]
@@ -5110,20 +5562,17 @@ param(
[Parameter(DontShow)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
[System.Uri]
- # The URI for the proxy server to use.
${Proxy},
[Parameter(DontShow)]
[ValidateNotNull()]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
[System.Management.Automation.PSCredential]
- # Credentials for a proxy server to use for the remote call.
${ProxyCredential},
[Parameter(DontShow)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Runtime')]
[System.Management.Automation.SwitchParameter]
- # Use the default credentials for the proxy.
${ProxyUseDefaultCredentials}
)
@@ -5414,8 +5863,6 @@ To create the parameters described below, construct a hash table containing the
MASTER : The source server object to create replica from.
Location : The geo-location where the resource lives
- SkuName : The name of the sku, e.g. Standard_D32s_v3.
- SkuTier : The tier of the particular SKU, e.g. GeneralPurpose.
[Tag ]: Resource tags.
[(Any) ]: This indicates any property can be added to this object.
[AdministratorLogin ]: The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation).
@@ -5434,6 +5881,8 @@ MASTER : The source server object to create replica from.
[(Any) ]: This indicates any property can be added to this object.
[ReplicationRole ]: The replication role.
[RestorePointInTime ]: Restore point creation time (ISO8601 format), specifying the time to restore from.
+ [SkuName ]: The name of the sku, e.g. Standard_D32s_v3.
+ [SkuTier ]: The tier of the particular SKU, e.g. GeneralPurpose.
[SourceServerId ]: The source MySQL server id.
[SslEnforcement ]: Enable ssl enforcement or not when connect to server.
[StorageProfileBackupRetentionDay ]: Backup retention days for the server.
@@ -5619,7 +6068,6 @@ To create the parameters described below, construct a hash table containing the
MASTER : The source server object to create replica from.
Location : The geo-location where the resource lives
- SkuName : The name of the sku, typically, tier + family + cores, e.g. B_Gen4_1, GP_Gen5_8.
[Tag ]: Resource tags.
[(Any) ]: This indicates any property can be added to this object.
[AdministratorLogin ]: The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation).
@@ -5634,6 +6082,7 @@ MASTER : The source server object to create replica from.
[ReplicationRole ]: The replication role of the server.
[SkuCapacity ]: The scale up/out capacity, representing server's compute units.
[SkuFamily ]: The family of hardware.
+ [SkuName ]: The name of the sku, typically, tier + family + cores, e.g. B_Gen4_1, GP_Gen5_8.
[SkuSize ]: The size code, to be interpreted by resource as appropriate.
[SkuTier ]: The tier of the particular SKU, e.g. Basic.
[SslEnforcement ]: Enable ssl enforcement or not when connect to server.
@@ -5875,6 +6324,14 @@ param(
# Enable ssl enforcement or not when connect to server.
${SslEnforcement},
+ [Parameter()]
+ [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.MinimalTlsVersionEnum])]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.MinimalTlsVersionEnum]
+ # Set the minimal TLS version for connections to server when SSL is enabled.
+ # Default is TLSEnforcementDisabled.accepted values: TLS1_0, TLS1_1, TLS1_2, TLSEnforcementDisabled.
+ ${MinimalTlsVersion},
+
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
[System.Int32]
@@ -6048,8 +6505,6 @@ To create the parameters described below, construct a hash table containing the
INPUTOBJECT : The source server object to restore from.
Location : The geo-location where the resource lives
- SkuName : The name of the sku, e.g. Standard_D32s_v3.
- SkuTier : The tier of the particular SKU, e.g. GeneralPurpose.
[Tag ]: Resource tags.
[(Any) ]: This indicates any property can be added to this object.
[AdministratorLogin ]: The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation).
@@ -6068,6 +6523,8 @@ INPUTOBJECT : The source server object to restore from.
[(Any) ]: This indicates any property can be added to this object.
[ReplicationRole ]: The replication role.
[RestorePointInTime ]: Restore point creation time (ISO8601 format), specifying the time to restore from.
+ [SkuName ]: The name of the sku, e.g. Standard_D32s_v3.
+ [SkuTier ]: The tier of the particular SKU, e.g. GeneralPurpose.
[SourceServerId ]: The source MySQL server id.
[SslEnforcement ]: Enable ssl enforcement or not when connect to server.
[StorageProfileBackupRetentionDay ]: Backup retention days for the server.
@@ -6259,7 +6716,6 @@ To create the parameters described below, construct a hash table containing the
INPUTOBJECT : The source server object to restore from.
Location : The geo-location where the resource lives
- SkuName : The name of the sku, typically, tier + family + cores, e.g. B_Gen4_1, GP_Gen5_8.
[Tag ]: Resource tags.
[(Any) ]: This indicates any property can be added to this object.
[AdministratorLogin ]: The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation).
@@ -6274,6 +6730,7 @@ INPUTOBJECT : The source server object to restore from.
[ReplicationRole ]: The replication role of the server.
[SkuCapacity ]: The scale up/out capacity, representing server's compute units.
[SkuFamily ]: The family of hardware.
+ [SkuName ]: The name of the sku, typically, tier + family + cores, e.g. B_Gen4_1, GP_Gen5_8.
[SkuSize ]: The size code, to be interpreted by resource as appropriate.
[SkuTier ]: The tier of the particular SKU, e.g. Basic.
[SslEnforcement ]: Enable ssl enforcement or not when connect to server.
@@ -7718,6 +8175,14 @@ param(
# Enable ssl enforcement or not when connect to server.
${SslEnforcement},
+ [Parameter()]
+ [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.MinimalTlsVersionEnum])]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.MinimalTlsVersionEnum]
+ # Set the minimal TLS version for connections to server when SSL is enabled.
+ # Default is TLSEnforcementDisabled.accepted values: TLS1_0, TLS1_1, TLS1_2, TLSEnforcementDisabled.
+ ${MinimalTlsVersion},
+
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
[System.Int32]
diff --git a/src/MySql/exports/Restore-AzMySqlFlexibleServer.ps1 b/src/MySql/exports/Restore-AzMySqlFlexibleServer.ps1
index 2d08f4f5ac4e..4c778cc6ce12 100644
--- a/src/MySql/exports/Restore-AzMySqlFlexibleServer.ps1
+++ b/src/MySql/exports/Restore-AzMySqlFlexibleServer.ps1
@@ -37,8 +37,6 @@ To create the parameters described below, construct a hash table containing the
INPUTOBJECT : The source server object to restore from.
Location : The geo-location where the resource lives
- SkuName : The name of the sku, e.g. Standard_D32s_v3.
- SkuTier : The tier of the particular SKU, e.g. GeneralPurpose.
[Tag ]: Resource tags.
[(Any) ]: This indicates any property can be added to this object.
[AdministratorLogin ]: The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation).
@@ -57,6 +55,8 @@ INPUTOBJECT : The source server object to restore from.
[(Any) ]: This indicates any property can be added to this object.
[ReplicationRole ]: The replication role.
[RestorePointInTime ]: Restore point creation time (ISO8601 format), specifying the time to restore from.
+ [SkuName ]: The name of the sku, e.g. Standard_D32s_v3.
+ [SkuTier ]: The tier of the particular SKU, e.g. GeneralPurpose.
[SourceServerId ]: The source MySQL server id.
[SslEnforcement ]: Enable ssl enforcement or not when connect to server.
[StorageProfileBackupRetentionDay ]: Backup retention days for the server.
diff --git a/src/MySql/exports/Restore-AzMySqlServer.ps1 b/src/MySql/exports/Restore-AzMySqlServer.ps1
index 24ac721de09d..d2a6f5681fe2 100644
--- a/src/MySql/exports/Restore-AzMySqlServer.ps1
+++ b/src/MySql/exports/Restore-AzMySqlServer.ps1
@@ -43,7 +43,6 @@ To create the parameters described below, construct a hash table containing the
INPUTOBJECT : The source server object to restore from.
Location : The geo-location where the resource lives
- SkuName : The name of the sku, typically, tier + family + cores, e.g. B_Gen4_1, GP_Gen5_8.
[Tag ]: Resource tags.
[(Any) ]: This indicates any property can be added to this object.
[AdministratorLogin ]: The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation).
@@ -58,6 +57,7 @@ INPUTOBJECT : The source server object to restore from.
[ReplicationRole ]: The replication role of the server.
[SkuCapacity ]: The scale up/out capacity, representing server's compute units.
[SkuFamily ]: The family of hardware.
+ [SkuName ]: The name of the sku, typically, tier + family + cores, e.g. B_Gen4_1, GP_Gen5_8.
[SkuSize ]: The size code, to be interpreted by resource as appropriate.
[SkuTier ]: The tier of the particular SKU, e.g. Basic.
[SslEnforcement ]: Enable ssl enforcement or not when connect to server.
diff --git a/src/MySql/exports/Update-AzMySqlServer.ps1 b/src/MySql/exports/Update-AzMySqlServer.ps1
index 41deddab3749..5e8d06fd5b54 100644
--- a/src/MySql/exports/Update-AzMySqlServer.ps1
+++ b/src/MySql/exports/Update-AzMySqlServer.ps1
@@ -137,6 +137,14 @@ param(
# Enable ssl enforcement or not when connect to server.
${SslEnforcement},
+ [Parameter()]
+ [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.MinimalTlsVersionEnum])]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.MinimalTlsVersionEnum]
+ # Set the minimal TLS version for connections to server when SSL is enabled.
+ # Default is TLSEnforcementDisabled.accepted values: TLS1_0, TLS1_1, TLS1_2, TLSEnforcementDisabled.
+ ${MinimalTlsVersion},
+
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Category('Body')]
[System.Int32]
diff --git a/src/MySql/generate-info.json b/src/MySql/generate-info.json
index 4355391d9d7b..4d55e4931d14 100644
--- a/src/MySql/generate-info.json
+++ b/src/MySql/generate-info.json
@@ -1,8 +1,12 @@
{
- "autorest_powershell": "3.0.403",
- "swagger_commit": "171eb5562c1d2e86eb0658923c54860cb25c8379",
+ "autorest_remodeler": "2.1.27",
+ "swagger_commit": "96ba256c1f61d4dc2a7928d7658e024b9b1615a6",
+ "autorest_core": "3.0.6320",
+ "microsoft.azure_autorest.csharp": "2.3.82",
"autorest_modelerfour": "4.15.414",
+ "node": "v10.16.0",
+ "microsoft.azure_autorest.modeler": "2.3.55",
+ "microsoft.azure_autorest-core": "2.0.4417",
"autorest": "3.0.6187",
- "autorest_core": "3.0.6320",
- "node": "v10.16.0"
+ "autorest_powershell": "3.0.403"
}
diff --git a/src/MySql/generated/api/Models/Api20171201/Configuration.cs b/src/MySql/generated/api/Models/Api20171201/Configuration.cs
index 62be5a892772..06ed250ea295 100644
--- a/src/MySql/generated/api/Models/Api20171201/Configuration.cs
+++ b/src/MySql/generated/api/Models/Api20171201/Configuration.cs
@@ -80,7 +80,7 @@ public partial class Configuration :
/// Source of the configuration.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.FormatTable(Index = 3)]
- public string Source { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IConfigurationPropertiesInternal)Property).Source; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IConfigurationPropertiesInternal)Property).Source = value; }
+ public string Source { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IConfigurationPropertiesInternal)Property).Source; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IConfigurationPropertiesInternal)Property).Source = value ?? null; }
///
/// The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
@@ -92,7 +92,7 @@ public partial class Configuration :
/// Value of the configuration.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.FormatTable(Index = 1)]
- public string Value { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IConfigurationPropertiesInternal)Property).Value; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IConfigurationPropertiesInternal)Property).Value = value; }
+ public string Value { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IConfigurationPropertiesInternal)Property).Value; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IConfigurationPropertiesInternal)Property).Value = value ?? null; }
/// Creates an new instance.
public Configuration()
diff --git a/src/MySql/generated/api/Models/Api20171201/Database.cs b/src/MySql/generated/api/Models/Api20171201/Database.cs
index f3176499ed60..c91e06fec3f8 100644
--- a/src/MySql/generated/api/Models/Api20171201/Database.cs
+++ b/src/MySql/generated/api/Models/Api20171201/Database.cs
@@ -16,12 +16,12 @@ public partial class Database :
/// The charset of the database.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.FormatTable(Index = 1)]
- public string Charset { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IDatabasePropertiesInternal)Property).Charset; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IDatabasePropertiesInternal)Property).Charset = value; }
+ public string Charset { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IDatabasePropertiesInternal)Property).Charset; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IDatabasePropertiesInternal)Property).Charset = value ?? null; }
/// The collation of the database.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.FormatTable(Index = 2)]
- public string Collation { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IDatabasePropertiesInternal)Property).Collation; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IDatabasePropertiesInternal)Property).Collation = value; }
+ public string Collation { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IDatabasePropertiesInternal)Property).Collation; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IDatabasePropertiesInternal)Property).Collation = value ?? null; }
///
/// Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
diff --git a/src/MySql/generated/api/Models/Api20171201/FirewallRule.cs b/src/MySql/generated/api/Models/Api20171201/FirewallRule.cs
index 0c42a6d1879f..99b56eef7096 100644
--- a/src/MySql/generated/api/Models/Api20171201/FirewallRule.cs
+++ b/src/MySql/generated/api/Models/Api20171201/FirewallRule.cs
@@ -16,7 +16,7 @@ public partial class FirewallRule :
/// The end IP address of the server firewall rule. Must be IPv4 format.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.FormatTable(Index = 2)]
- public string EndIPAddress { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IFirewallRulePropertiesInternal)Property).EndIPAddress; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IFirewallRulePropertiesInternal)Property).EndIPAddress = value; }
+ public string EndIPAddress { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IFirewallRulePropertiesInternal)Property).EndIPAddress; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IFirewallRulePropertiesInternal)Property).EndIPAddress = value ; }
///
/// Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
@@ -53,7 +53,7 @@ public partial class FirewallRule :
/// The start IP address of the server firewall rule. Must be IPv4 format.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.FormatTable(Index = 1)]
- public string StartIPAddress { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IFirewallRulePropertiesInternal)Property).StartIPAddress; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IFirewallRulePropertiesInternal)Property).StartIPAddress = value; }
+ public string StartIPAddress { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IFirewallRulePropertiesInternal)Property).StartIPAddress; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IFirewallRulePropertiesInternal)Property).StartIPAddress = value ; }
///
/// The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
diff --git a/src/MySql/generated/api/Models/Api20171201/LogFile.cs b/src/MySql/generated/api/Models/Api20171201/LogFile.cs
index dfbbb43897cf..6cc647b7a10c 100644
--- a/src/MySql/generated/api/Models/Api20171201/LogFile.cs
+++ b/src/MySql/generated/api/Models/Api20171201/LogFile.cs
@@ -51,7 +51,7 @@ public partial class LogFile :
/// Type of the log file.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public string PropertiesType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ILogFilePropertiesInternal)Property).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ILogFilePropertiesInternal)Property).Type = value; }
+ public string PropertiesType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ILogFilePropertiesInternal)Property).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ILogFilePropertiesInternal)Property).Type = value ?? null; }
/// Backing field for property.
private Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ILogFileProperties _property;
@@ -62,7 +62,7 @@ public partial class LogFile :
/// Size of the log file.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public long? SizeInKb { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ILogFilePropertiesInternal)Property).SizeInKb; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ILogFilePropertiesInternal)Property).SizeInKb = value; }
+ public long? SizeInKb { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ILogFilePropertiesInternal)Property).SizeInKb; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ILogFilePropertiesInternal)Property).SizeInKb = value ?? default(long); }
///
/// The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
@@ -72,7 +72,7 @@ public partial class LogFile :
/// The url to download the log file from.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public string Url { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ILogFilePropertiesInternal)Property).Url; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ILogFilePropertiesInternal)Property).Url = value; }
+ public string Url { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ILogFilePropertiesInternal)Property).Url; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ILogFilePropertiesInternal)Property).Url = value ?? null; }
/// Creates an new instance.
public LogFile()
diff --git a/src/MySql/generated/api/Models/Api20171201/Server.cs b/src/MySql/generated/api/Models/Api20171201/Server.cs
index 27c70a775ed6..358298084b3b 100644
--- a/src/MySql/generated/api/Models/Api20171201/Server.cs
+++ b/src/MySql/generated/api/Models/Api20171201/Server.cs
@@ -20,7 +20,7 @@ public partial class Server :
///
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.FormatTable(Index = 2)]
- public string AdministratorLogin { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).AdministratorLogin; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).AdministratorLogin = value; }
+ public string AdministratorLogin { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).AdministratorLogin; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).AdministratorLogin = value ?? null; }
///
/// Status showing whether the server data encryption is enabled with customer-managed keys.
@@ -32,12 +32,12 @@ public partial class Server :
/// Earliest restore point creation time (ISO8601 format)
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.DoNotFormat]
- public global::System.DateTime? EarliestRestoreDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).EarliestRestoreDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).EarliestRestoreDate = value; }
+ public global::System.DateTime? EarliestRestoreDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).EarliestRestoreDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).EarliestRestoreDate = value ?? default(global::System.DateTime); }
/// The fully qualified domain name of a server.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.DoNotFormat]
- public string FullyQualifiedDomainName { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).FullyQualifiedDomainName; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).FullyQualifiedDomainName = value; }
+ public string FullyQualifiedDomainName { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).FullyQualifiedDomainName; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).FullyQualifiedDomainName = value ?? null; }
///
/// Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
@@ -70,12 +70,12 @@ public partial class Server :
///
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.DoNotFormat]
- public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.IdentityType? IdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IResourceIdentityInternal)Identity).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IResourceIdentityInternal)Identity).Type = value; }
+ public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.IdentityType? IdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IResourceIdentityInternal)Identity).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IResourceIdentityInternal)Identity).Type = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.IdentityType)""); }
/// Status showing whether the server enabled infrastructure encryption.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.DoNotFormat]
- public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.InfrastructureEncryption? InfrastructureEncryption { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).InfrastructureEncryption; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).InfrastructureEncryption = value; }
+ public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.InfrastructureEncryption? InfrastructureEncryption { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).InfrastructureEncryption; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).InfrastructureEncryption = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.InfrastructureEncryption)""); }
/// The geo-location where the resource lives
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inherited)]
@@ -85,7 +85,7 @@ public partial class Server :
/// The master server id of a replica server.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.DoNotFormat]
- public string MasterServerId { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).MasterServerId; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).MasterServerId = value; }
+ public string MasterServerId { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).MasterServerId; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).MasterServerId = value ?? null; }
/// Internal Acessors for Id
string Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api10.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api10.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api10.IResourceInternal)__trackedResource).Id = value; }
@@ -123,7 +123,7 @@ public partial class Server :
/// Enforce a minimal Tls version for the server.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.DoNotFormat]
- public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.MinimalTlsVersionEnum? MinimalTlsVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).MinimalTlsVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).MinimalTlsVersion = value; }
+ public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.MinimalTlsVersionEnum? MinimalTlsVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).MinimalTlsVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).MinimalTlsVersion = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.MinimalTlsVersionEnum)""); }
/// The name of the resource
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inherited)]
@@ -149,17 +149,17 @@ public partial class Server :
///
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.DoNotFormat]
- public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.PublicNetworkAccessEnum? PublicNetworkAccess { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).PublicNetworkAccess; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).PublicNetworkAccess = value; }
+ public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.PublicNetworkAccessEnum? PublicNetworkAccess { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).PublicNetworkAccess; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).PublicNetworkAccess = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.PublicNetworkAccessEnum)""); }
/// The maximum number of replicas that a master server can have.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.DoNotFormat]
- public int? ReplicaCapacity { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).ReplicaCapacity; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).ReplicaCapacity = value; }
+ public int? ReplicaCapacity { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).ReplicaCapacity; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).ReplicaCapacity = value ?? default(int); }
/// The replication role of the server.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.DoNotFormat]
- public string ReplicationRole { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).ReplicationRole; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).ReplicationRole = value; }
+ public string ReplicationRole { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).ReplicationRole; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).ReplicationRole = value ?? null; }
/// Backing field for property.
private Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISku _sku;
@@ -172,54 +172,54 @@ public partial class Server :
/// The scale up/out capacity, representing server's compute units.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.DoNotFormat]
- public int? SkuCapacity { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Capacity; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Capacity = value; }
+ public int? SkuCapacity { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Capacity; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Capacity = value ?? default(int); }
/// The family of hardware.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.DoNotFormat]
- public string SkuFamily { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Family; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Family = value; }
+ public string SkuFamily { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Family; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Family = value ?? null; }
///
/// The name of the sku, typically, tier + family + cores, e.g. B_Gen4_1, GP_Gen5_8.
///
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.FormatTable(Index = 5)]
- public string SkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Name = value; }
+ public string SkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Name = value ?? null; }
/// The size code, to be interpreted by resource as appropriate.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.DoNotFormat]
- public string SkuSize { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Size; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Size = value; }
+ public string SkuSize { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Size; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Size = value ?? null; }
/// The tier of the particular SKU, e.g. Basic.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.FormatTable(Index = 6)]
- public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SkuTier? SkuTier { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Tier; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Tier = value; }
+ public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SkuTier? SkuTier { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Tier; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Tier = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SkuTier)""); }
/// Enable ssl enforcement or not when connect to server.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.FormatTable(Index = 7)]
- public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SslEnforcementEnum? SslEnforcement { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).SslEnforcement; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).SslEnforcement = value; }
+ public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SslEnforcementEnum? SslEnforcement { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).SslEnforcement; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).SslEnforcement = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SslEnforcementEnum)""); }
/// Backup retention days for the server.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.DoNotFormat]
- public int? StorageProfileBackupRetentionDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).StorageProfileBackupRetentionDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).StorageProfileBackupRetentionDay = value; }
+ public int? StorageProfileBackupRetentionDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).StorageProfileBackupRetentionDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).StorageProfileBackupRetentionDay = value ?? default(int); }
/// Enable Geo-redundant or not for server backup.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.DoNotFormat]
- public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.GeoRedundantBackup? StorageProfileGeoRedundantBackup { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).StorageProfileGeoRedundantBackup; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).StorageProfileGeoRedundantBackup = value; }
+ public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.GeoRedundantBackup? StorageProfileGeoRedundantBackup { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).StorageProfileGeoRedundantBackup; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).StorageProfileGeoRedundantBackup = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.GeoRedundantBackup)""); }
/// Enable Storage Auto Grow.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.DoNotFormat]
- public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.StorageAutogrow? StorageProfileStorageAutogrow { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).StorageProfileStorageAutogrow; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).StorageProfileStorageAutogrow = value; }
+ public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.StorageAutogrow? StorageProfileStorageAutogrow { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).StorageProfileStorageAutogrow; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).StorageProfileStorageAutogrow = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.StorageAutogrow)""); }
/// Max storage allowed for a server.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.FormatTable(Index = 4)]
- public int? StorageProfileStorageMb { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).StorageProfileStorageMb; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).StorageProfileStorageMb = value; }
+ public int? StorageProfileStorageMb { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).StorageProfileStorageMb; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).StorageProfileStorageMb = value ?? default(int); }
/// Resource tags.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inherited)]
@@ -236,12 +236,12 @@ public partial class Server :
/// A state of a server that is visible to user.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.DoNotFormat]
- public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.ServerState? UserVisibleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).UserVisibleState; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).UserVisibleState = value; }
+ public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.ServerState? UserVisibleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).UserVisibleState; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).UserVisibleState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.ServerState)""); }
/// Server version.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.FormatTable(Index = 3)]
- public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.ServerVersion? Version { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).Version; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).Version = value; }
+ public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.ServerVersion? Version { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).Version; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesInternal)Property).Version = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.ServerVersion)""); }
/// Creates an new instance.
public Server()
@@ -409,7 +409,7 @@ public partial interface IServer :
/// The name of the sku, typically, tier + family + cores, e.g. B_Gen4_1, GP_Gen5_8.
///
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Info(
- Required = true,
+ Required = false,
ReadOnly = false,
Description = @"The name of the sku, typically, tier + family + cores, e.g. B_Gen4_1, GP_Gen5_8.",
SerializedName = @"name",
diff --git a/src/MySql/generated/api/Models/Api20171201/ServerAdministratorResource.cs b/src/MySql/generated/api/Models/Api20171201/ServerAdministratorResource.cs
index eba95cf5ca4b..fb41071cb725 100644
--- a/src/MySql/generated/api/Models/Api20171201/ServerAdministratorResource.cs
+++ b/src/MySql/generated/api/Models/Api20171201/ServerAdministratorResource.cs
@@ -25,7 +25,7 @@ public partial class ServerAdministratorResource :
/// The server administrator login account name.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public string Login { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerAdministratorPropertiesInternal)Property).Login; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerAdministratorPropertiesInternal)Property).Login = value; }
+ public string Login { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerAdministratorPropertiesInternal)Property).Login; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerAdministratorPropertiesInternal)Property).Login = value ?? null; }
/// Internal Acessors for Id
string Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api10.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api10.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api10.IResourceInternal)__resource).Id = value; }
@@ -55,11 +55,11 @@ public partial class ServerAdministratorResource :
/// The server administrator Sid (Secure ID).
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public string Sid { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerAdministratorPropertiesInternal)Property).Sid; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerAdministratorPropertiesInternal)Property).Sid = value; }
+ public string Sid { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerAdministratorPropertiesInternal)Property).Sid; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerAdministratorPropertiesInternal)Property).Sid = value ?? null; }
/// The server Active Directory Administrator tenant id.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public string TenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerAdministratorPropertiesInternal)Property).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerAdministratorPropertiesInternal)Property).TenantId = value; }
+ public string TenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerAdministratorPropertiesInternal)Property).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerAdministratorPropertiesInternal)Property).TenantId = value ?? null; }
///
/// The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
@@ -92,7 +92,7 @@ public partial interface IServerAdministratorResource :
{
/// The type of administrator.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Info(
- Required = true,
+ Required = false,
ReadOnly = true,
Description = @"The type of administrator.",
SerializedName = @"administratorType",
@@ -100,7 +100,7 @@ public partial interface IServerAdministratorResource :
string AdministratorType { get; }
/// The server administrator login account name.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Info(
- Required = true,
+ Required = false,
ReadOnly = false,
Description = @"The server administrator login account name.",
SerializedName = @"login",
@@ -108,7 +108,7 @@ public partial interface IServerAdministratorResource :
string Login { get; set; }
/// The server administrator Sid (Secure ID).
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Info(
- Required = true,
+ Required = false,
ReadOnly = false,
Description = @"The server administrator Sid (Secure ID).",
SerializedName = @"sid",
@@ -116,7 +116,7 @@ public partial interface IServerAdministratorResource :
string Sid { get; set; }
/// The server Active Directory Administrator tenant id.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Info(
- Required = true,
+ Required = false,
ReadOnly = false,
Description = @"The server Active Directory Administrator tenant id.",
SerializedName = @"tenantId",
diff --git a/src/MySql/generated/api/Models/Api20171201/ServerForCreate.cs b/src/MySql/generated/api/Models/Api20171201/ServerForCreate.cs
index 8a6dcc209f8e..75c21ade34cb 100644
--- a/src/MySql/generated/api/Models/Api20171201/ServerForCreate.cs
+++ b/src/MySql/generated/api/Models/Api20171201/ServerForCreate.cs
@@ -10,7 +10,7 @@ public partial class ServerForCreate :
/// The mode to create a new server.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.CreateMode CreateMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesForCreateInternal)Property).CreateMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesForCreateInternal)Property).CreateMode = value; }
+ public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.CreateMode CreateMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesForCreateInternal)Property).CreateMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesForCreateInternal)Property).CreateMode = value ; }
/// Backing field for property.
private Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IResourceIdentity _identity;
@@ -32,11 +32,11 @@ public partial class ServerForCreate :
/// principal for the resource.
///
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.IdentityType? IdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IResourceIdentityInternal)Identity).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IResourceIdentityInternal)Identity).Type = value; }
+ public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.IdentityType? IdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IResourceIdentityInternal)Identity).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IResourceIdentityInternal)Identity).Type = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.IdentityType)""); }
/// Status showing whether the server enabled infrastructure encryption.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.InfrastructureEncryption? InfrastructureEncryption { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesForCreateInternal)Property).InfrastructureEncryption; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesForCreateInternal)Property).InfrastructureEncryption = value; }
+ public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.InfrastructureEncryption? InfrastructureEncryption { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesForCreateInternal)Property).InfrastructureEncryption; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesForCreateInternal)Property).InfrastructureEncryption = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.InfrastructureEncryption)""); }
/// Backing field for property.
private string _location;
@@ -65,7 +65,7 @@ public partial class ServerForCreate :
/// Enforce a minimal Tls version for the server.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.MinimalTlsVersionEnum? MinimalTlsVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesForCreateInternal)Property).MinimalTlsVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesForCreateInternal)Property).MinimalTlsVersion = value; }
+ public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.MinimalTlsVersionEnum? MinimalTlsVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesForCreateInternal)Property).MinimalTlsVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesForCreateInternal)Property).MinimalTlsVersion = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.MinimalTlsVersionEnum)""); }
/// Backing field for property.
private Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesForCreate _property;
@@ -79,7 +79,7 @@ public partial class ServerForCreate :
/// or 'Disabled'
///
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.PublicNetworkAccessEnum? PublicNetworkAccess { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesForCreateInternal)Property).PublicNetworkAccess; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesForCreateInternal)Property).PublicNetworkAccess = value; }
+ public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.PublicNetworkAccessEnum? PublicNetworkAccess { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesForCreateInternal)Property).PublicNetworkAccess; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesForCreateInternal)Property).PublicNetworkAccess = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.PublicNetworkAccessEnum)""); }
/// Backing field for property.
private Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISku _sku;
@@ -90,45 +90,45 @@ public partial class ServerForCreate :
/// The scale up/out capacity, representing server's compute units.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public int? SkuCapacity { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Capacity; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Capacity = value; }
+ public int? SkuCapacity { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Capacity; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Capacity = value ?? default(int); }
/// The family of hardware.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public string SkuFamily { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Family; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Family = value; }
+ public string SkuFamily { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Family; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Family = value ?? null; }
///
/// The name of the sku, typically, tier + family + cores, e.g. B_Gen4_1, GP_Gen5_8.
///
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public string SkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Name = value; }
+ public string SkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Name = value ?? null; }
/// The size code, to be interpreted by resource as appropriate.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public string SkuSize { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Size; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Size = value; }
+ public string SkuSize { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Size; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Size = value ?? null; }
/// The tier of the particular SKU, e.g. Basic.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SkuTier? SkuTier { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Tier; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Tier = value; }
+ public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SkuTier? SkuTier { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Tier; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Tier = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SkuTier)""); }
/// Enable ssl enforcement or not when connect to server.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SslEnforcementEnum? SslEnforcement { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesForCreateInternal)Property).SslEnforcement; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesForCreateInternal)Property).SslEnforcement = value; }
+ public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SslEnforcementEnum? SslEnforcement { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesForCreateInternal)Property).SslEnforcement; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesForCreateInternal)Property).SslEnforcement = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SslEnforcementEnum)""); }
/// Backup retention days for the server.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public int? StorageProfileBackupRetentionDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesForCreateInternal)Property).StorageProfileBackupRetentionDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesForCreateInternal)Property).StorageProfileBackupRetentionDay = value; }
+ public int? StorageProfileBackupRetentionDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesForCreateInternal)Property).StorageProfileBackupRetentionDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesForCreateInternal)Property).StorageProfileBackupRetentionDay = value ?? default(int); }
/// Enable Geo-redundant or not for server backup.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.GeoRedundantBackup? StorageProfileGeoRedundantBackup { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesForCreateInternal)Property).StorageProfileGeoRedundantBackup; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesForCreateInternal)Property).StorageProfileGeoRedundantBackup = value; }
+ public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.GeoRedundantBackup? StorageProfileGeoRedundantBackup { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesForCreateInternal)Property).StorageProfileGeoRedundantBackup; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesForCreateInternal)Property).StorageProfileGeoRedundantBackup = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.GeoRedundantBackup)""); }
/// Enable Storage Auto Grow.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.StorageAutogrow? StorageProfileStorageAutogrow { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesForCreateInternal)Property).StorageProfileStorageAutogrow; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesForCreateInternal)Property).StorageProfileStorageAutogrow = value; }
+ public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.StorageAutogrow? StorageProfileStorageAutogrow { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesForCreateInternal)Property).StorageProfileStorageAutogrow; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesForCreateInternal)Property).StorageProfileStorageAutogrow = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.StorageAutogrow)""); }
/// Max storage allowed for a server.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public int? StorageProfileStorageMb { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesForCreateInternal)Property).StorageProfileStorageMb; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesForCreateInternal)Property).StorageProfileStorageMb = value; }
+ public int? StorageProfileStorageMb { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesForCreateInternal)Property).StorageProfileStorageMb; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesForCreateInternal)Property).StorageProfileStorageMb = value ?? default(int); }
/// Backing field for property.
private Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerForCreateTags _tag;
@@ -139,7 +139,7 @@ public partial class ServerForCreate :
/// Server version.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.ServerVersion? Version { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesForCreateInternal)Property).Version; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesForCreateInternal)Property).Version = value; }
+ public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.ServerVersion? Version { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesForCreateInternal)Property).Version; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPropertiesForCreateInternal)Property).Version = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.ServerVersion)""); }
/// Creates an new instance.
public ServerForCreate()
@@ -241,7 +241,7 @@ public partial interface IServerForCreate :
/// The name of the sku, typically, tier + family + cores, e.g. B_Gen4_1, GP_Gen5_8.
///
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Info(
- Required = true,
+ Required = false,
ReadOnly = false,
Description = @"The name of the sku, typically, tier + family + cores, e.g. B_Gen4_1, GP_Gen5_8.",
SerializedName = @"name",
diff --git a/src/MySql/generated/api/Models/Api20171201/ServerPrivateEndpointConnection.cs b/src/MySql/generated/api/Models/Api20171201/ServerPrivateEndpointConnection.cs
index ed02b3144bc0..125b3275adfb 100644
--- a/src/MySql/generated/api/Models/Api20171201/ServerPrivateEndpointConnection.cs
+++ b/src/MySql/generated/api/Models/Api20171201/ServerPrivateEndpointConnection.cs
@@ -35,7 +35,7 @@ public partial class ServerPrivateEndpointConnection :
/// Resource id of the private endpoint.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public string PrivateEndpointId { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPrivateEndpointConnectionPropertiesInternal)Property).PrivateEndpointId; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPrivateEndpointConnectionPropertiesInternal)Property).PrivateEndpointId = value; }
+ public string PrivateEndpointId { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPrivateEndpointConnectionPropertiesInternal)Property).PrivateEndpointId; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPrivateEndpointConnectionPropertiesInternal)Property).PrivateEndpointId = value ?? null; }
/// The actions required for private link service connection.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
@@ -43,11 +43,11 @@ public partial class ServerPrivateEndpointConnection :
/// The private link service connection description.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public string PrivateLinkServiceConnectionStateDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionStateDescription; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionStateDescription = value; }
+ public string PrivateLinkServiceConnectionStateDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionStateDescription; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionStateDescription = value ?? null; }
/// The private link service connection status.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.PrivateLinkServiceConnectionStateStatus PrivateLinkServiceConnectionStateStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionStateStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionStateStatus = value; }
+ public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.PrivateLinkServiceConnectionStateStatus? PrivateLinkServiceConnectionStateStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionStateStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionStateStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.PrivateLinkServiceConnectionStateStatus)""); }
/// Backing field for property.
private Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPrivateEndpointConnectionProperties _property;
@@ -96,7 +96,7 @@ public partial interface IServerPrivateEndpointConnection :
Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.PrivateLinkServiceConnectionStateActionsRequire? PrivateLinkServiceConnectionStateActionsRequired { get; }
/// The private link service connection description.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Info(
- Required = true,
+ Required = false,
ReadOnly = false,
Description = @"The private link service connection description.",
SerializedName = @"description",
@@ -104,12 +104,12 @@ public partial interface IServerPrivateEndpointConnection :
string PrivateLinkServiceConnectionStateDescription { get; set; }
/// The private link service connection status.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Info(
- Required = true,
+ Required = false,
ReadOnly = false,
Description = @"The private link service connection status.",
SerializedName = @"status",
PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.PrivateLinkServiceConnectionStateStatus) })]
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.PrivateLinkServiceConnectionStateStatus PrivateLinkServiceConnectionStateStatus { get; set; }
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.PrivateLinkServiceConnectionStateStatus? PrivateLinkServiceConnectionStateStatus { get; set; }
/// State of the private endpoint connection.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Info(
Required = false,
@@ -137,7 +137,7 @@ internal partial interface IServerPrivateEndpointConnectionInternal
/// The private link service connection description.
string PrivateLinkServiceConnectionStateDescription { get; set; }
/// The private link service connection status.
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.PrivateLinkServiceConnectionStateStatus PrivateLinkServiceConnectionStateStatus { get; set; }
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.PrivateLinkServiceConnectionStateStatus? PrivateLinkServiceConnectionStateStatus { get; set; }
/// Private endpoint connection properties
Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPrivateEndpointConnectionProperties Property { get; set; }
/// State of the private endpoint connection.
diff --git a/src/MySql/generated/api/Models/Api20171201/ServerPrivateEndpointConnectionProperties.cs b/src/MySql/generated/api/Models/Api20171201/ServerPrivateEndpointConnectionProperties.cs
index 498e66c1be98..207d38591aed 100644
--- a/src/MySql/generated/api/Models/Api20171201/ServerPrivateEndpointConnectionProperties.cs
+++ b/src/MySql/generated/api/Models/Api20171201/ServerPrivateEndpointConnectionProperties.cs
@@ -29,7 +29,7 @@ public partial class ServerPrivateEndpointConnectionProperties :
/// Resource id of the private endpoint.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public string PrivateEndpointId { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IPrivateEndpointPropertyInternal)PrivateEndpoint).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IPrivateEndpointPropertyInternal)PrivateEndpoint).Id = value; }
+ public string PrivateEndpointId { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IPrivateEndpointPropertyInternal)PrivateEndpoint).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IPrivateEndpointPropertyInternal)PrivateEndpoint).Id = value ?? null; }
/// Backing field for property.
private Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPrivateLinkServiceConnectionStateProperty _privateLinkServiceConnectionState;
@@ -44,11 +44,11 @@ public partial class ServerPrivateEndpointConnectionProperties :
/// The private link service connection description.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public string PrivateLinkServiceConnectionStateDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPrivateLinkServiceConnectionStatePropertyInternal)PrivateLinkServiceConnectionState).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPrivateLinkServiceConnectionStatePropertyInternal)PrivateLinkServiceConnectionState).Description = value; }
+ public string PrivateLinkServiceConnectionStateDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPrivateLinkServiceConnectionStatePropertyInternal)PrivateLinkServiceConnectionState).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPrivateLinkServiceConnectionStatePropertyInternal)PrivateLinkServiceConnectionState).Description = value ?? null; }
/// The private link service connection status.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.PrivateLinkServiceConnectionStateStatus PrivateLinkServiceConnectionStateStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPrivateLinkServiceConnectionStatePropertyInternal)PrivateLinkServiceConnectionState).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPrivateLinkServiceConnectionStatePropertyInternal)PrivateLinkServiceConnectionState).Status = value; }
+ public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.PrivateLinkServiceConnectionStateStatus? PrivateLinkServiceConnectionStateStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPrivateLinkServiceConnectionStatePropertyInternal)PrivateLinkServiceConnectionState).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerPrivateLinkServiceConnectionStatePropertyInternal)PrivateLinkServiceConnectionState).Status = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.PrivateLinkServiceConnectionStateStatus)""); }
/// Backing field for property.
private Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.PrivateEndpointProvisioningState? _provisioningState;
@@ -87,7 +87,7 @@ public partial interface IServerPrivateEndpointConnectionProperties :
Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.PrivateLinkServiceConnectionStateActionsRequire? PrivateLinkServiceConnectionStateActionsRequired { get; }
/// The private link service connection description.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Info(
- Required = true,
+ Required = false,
ReadOnly = false,
Description = @"The private link service connection description.",
SerializedName = @"description",
@@ -95,12 +95,12 @@ public partial interface IServerPrivateEndpointConnectionProperties :
string PrivateLinkServiceConnectionStateDescription { get; set; }
/// The private link service connection status.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Info(
- Required = true,
+ Required = false,
ReadOnly = false,
Description = @"The private link service connection status.",
SerializedName = @"status",
PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.PrivateLinkServiceConnectionStateStatus) })]
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.PrivateLinkServiceConnectionStateStatus PrivateLinkServiceConnectionStateStatus { get; set; }
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.PrivateLinkServiceConnectionStateStatus? PrivateLinkServiceConnectionStateStatus { get; set; }
/// State of the private endpoint connection.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Info(
Required = false,
@@ -126,7 +126,7 @@ internal partial interface IServerPrivateEndpointConnectionPropertiesInternal
/// The private link service connection description.
string PrivateLinkServiceConnectionStateDescription { get; set; }
/// The private link service connection status.
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.PrivateLinkServiceConnectionStateStatus PrivateLinkServiceConnectionStateStatus { get; set; }
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.PrivateLinkServiceConnectionStateStatus? PrivateLinkServiceConnectionStateStatus { get; set; }
/// State of the private endpoint connection.
Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.PrivateEndpointProvisioningState? ProvisioningState { get; set; }
diff --git a/src/MySql/generated/api/Models/Api20171201/ServerProperties.cs b/src/MySql/generated/api/Models/Api20171201/ServerProperties.cs
index 3611def9643c..ac6c9e7e816f 100644
--- a/src/MySql/generated/api/Models/Api20171201/ServerProperties.cs
+++ b/src/MySql/generated/api/Models/Api20171201/ServerProperties.cs
@@ -118,19 +118,19 @@ public partial class ServerProperties :
/// Backup retention days for the server.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public int? StorageProfileBackupRetentionDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IStorageProfileInternal)StorageProfile).BackupRetentionDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IStorageProfileInternal)StorageProfile).BackupRetentionDay = value; }
+ public int? StorageProfileBackupRetentionDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IStorageProfileInternal)StorageProfile).BackupRetentionDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IStorageProfileInternal)StorageProfile).BackupRetentionDay = value ?? default(int); }
/// Enable Geo-redundant or not for server backup.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.GeoRedundantBackup? StorageProfileGeoRedundantBackup { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IStorageProfileInternal)StorageProfile).GeoRedundantBackup; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IStorageProfileInternal)StorageProfile).GeoRedundantBackup = value; }
+ public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.GeoRedundantBackup? StorageProfileGeoRedundantBackup { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IStorageProfileInternal)StorageProfile).GeoRedundantBackup; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IStorageProfileInternal)StorageProfile).GeoRedundantBackup = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.GeoRedundantBackup)""); }
/// Enable Storage Auto Grow.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.StorageAutogrow? StorageProfileStorageAutogrow { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IStorageProfileInternal)StorageProfile).StorageAutogrow; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IStorageProfileInternal)StorageProfile).StorageAutogrow = value; }
+ public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.StorageAutogrow? StorageProfileStorageAutogrow { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IStorageProfileInternal)StorageProfile).StorageAutogrow; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IStorageProfileInternal)StorageProfile).StorageAutogrow = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.StorageAutogrow)""); }
/// Max storage allowed for a server.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public int? StorageProfileStorageMb { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IStorageProfileInternal)StorageProfile).StorageMb; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IStorageProfileInternal)StorageProfile).StorageMb = value; }
+ public int? StorageProfileStorageMb { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IStorageProfileInternal)StorageProfile).StorageMb; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IStorageProfileInternal)StorageProfile).StorageMb = value ?? default(int); }
/// Backing field for property.
private Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.ServerState? _userVisibleState;
diff --git a/src/MySql/generated/api/Models/Api20171201/ServerPropertiesForCreate.cs b/src/MySql/generated/api/Models/Api20171201/ServerPropertiesForCreate.cs
index c873c4002e92..b4c0fb681484 100644
--- a/src/MySql/generated/api/Models/Api20171201/ServerPropertiesForCreate.cs
+++ b/src/MySql/generated/api/Models/Api20171201/ServerPropertiesForCreate.cs
@@ -58,19 +58,19 @@ public partial class ServerPropertiesForCreate :
/// Backup retention days for the server.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public int? StorageProfileBackupRetentionDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IStorageProfileInternal)StorageProfile).BackupRetentionDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IStorageProfileInternal)StorageProfile).BackupRetentionDay = value; }
+ public int? StorageProfileBackupRetentionDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IStorageProfileInternal)StorageProfile).BackupRetentionDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IStorageProfileInternal)StorageProfile).BackupRetentionDay = value ?? default(int); }
/// Enable Geo-redundant or not for server backup.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.GeoRedundantBackup? StorageProfileGeoRedundantBackup { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IStorageProfileInternal)StorageProfile).GeoRedundantBackup; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IStorageProfileInternal)StorageProfile).GeoRedundantBackup = value; }
+ public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.GeoRedundantBackup? StorageProfileGeoRedundantBackup { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IStorageProfileInternal)StorageProfile).GeoRedundantBackup; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IStorageProfileInternal)StorageProfile).GeoRedundantBackup = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.GeoRedundantBackup)""); }
/// Enable Storage Auto Grow.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.StorageAutogrow? StorageProfileStorageAutogrow { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IStorageProfileInternal)StorageProfile).StorageAutogrow; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IStorageProfileInternal)StorageProfile).StorageAutogrow = value; }
+ public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.StorageAutogrow? StorageProfileStorageAutogrow { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IStorageProfileInternal)StorageProfile).StorageAutogrow; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IStorageProfileInternal)StorageProfile).StorageAutogrow = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.StorageAutogrow)""); }
/// Max storage allowed for a server.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public int? StorageProfileStorageMb { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IStorageProfileInternal)StorageProfile).StorageMb; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IStorageProfileInternal)StorageProfile).StorageMb = value; }
+ public int? StorageProfileStorageMb { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IStorageProfileInternal)StorageProfile).StorageMb; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IStorageProfileInternal)StorageProfile).StorageMb = value ?? default(int); }
/// Backing field for property.
private Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.ServerVersion? _version;
diff --git a/src/MySql/generated/api/Models/Api20171201/ServerSecurityAlertPolicy.cs b/src/MySql/generated/api/Models/Api20171201/ServerSecurityAlertPolicy.cs
index f7cb76402364..a6bc0cdbb319 100644
--- a/src/MySql/generated/api/Models/Api20171201/ServerSecurityAlertPolicy.cs
+++ b/src/MySql/generated/api/Models/Api20171201/ServerSecurityAlertPolicy.cs
@@ -17,15 +17,15 @@ public partial class ServerSecurityAlertPolicy :
/// Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly
///
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public string[] DisabledAlert { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISecurityAlertPolicyPropertiesInternal)Property).DisabledAlert; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISecurityAlertPolicyPropertiesInternal)Property).DisabledAlert = value; }
+ public string[] DisabledAlert { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISecurityAlertPolicyPropertiesInternal)Property).DisabledAlert; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISecurityAlertPolicyPropertiesInternal)Property).DisabledAlert = value ?? null /* arrayOf */; }
/// Specifies that the alert is sent to the account administrators.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public bool? EmailAccountAdmin { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISecurityAlertPolicyPropertiesInternal)Property).EmailAccountAdmin; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISecurityAlertPolicyPropertiesInternal)Property).EmailAccountAdmin = value; }
+ public bool? EmailAccountAdmin { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISecurityAlertPolicyPropertiesInternal)Property).EmailAccountAdmin; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISecurityAlertPolicyPropertiesInternal)Property).EmailAccountAdmin = value ?? default(bool); }
/// Specifies an array of e-mail addresses to which the alert is sent.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public string[] EmailAddress { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISecurityAlertPolicyPropertiesInternal)Property).EmailAddress; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISecurityAlertPolicyPropertiesInternal)Property).EmailAddress = value; }
+ public string[] EmailAddress { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISecurityAlertPolicyPropertiesInternal)Property).EmailAddress; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISecurityAlertPolicyPropertiesInternal)Property).EmailAddress = value ?? null /* arrayOf */; }
///
/// Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
@@ -58,22 +58,22 @@ public partial class ServerSecurityAlertPolicy :
/// Specifies the number of days to keep in the Threat Detection audit logs.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public int? RetentionDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISecurityAlertPolicyPropertiesInternal)Property).RetentionDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISecurityAlertPolicyPropertiesInternal)Property).RetentionDay = value; }
+ public int? RetentionDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISecurityAlertPolicyPropertiesInternal)Property).RetentionDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISecurityAlertPolicyPropertiesInternal)Property).RetentionDay = value ?? default(int); }
/// Specifies the state of the policy, whether it is enabled or disabled.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.ServerSecurityAlertPolicyState State { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISecurityAlertPolicyPropertiesInternal)Property).State; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISecurityAlertPolicyPropertiesInternal)Property).State = value; }
+ public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.ServerSecurityAlertPolicyState? State { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISecurityAlertPolicyPropertiesInternal)Property).State; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISecurityAlertPolicyPropertiesInternal)Property).State = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.ServerSecurityAlertPolicyState)""); }
/// Specifies the identifier key of the Threat Detection audit storage account.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public string StorageAccountAccessKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISecurityAlertPolicyPropertiesInternal)Property).StorageAccountAccessKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISecurityAlertPolicyPropertiesInternal)Property).StorageAccountAccessKey = value; }
+ public string StorageAccountAccessKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISecurityAlertPolicyPropertiesInternal)Property).StorageAccountAccessKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISecurityAlertPolicyPropertiesInternal)Property).StorageAccountAccessKey = value ?? null; }
///
/// Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat
/// Detection audit logs.
///
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public string StorageEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISecurityAlertPolicyPropertiesInternal)Property).StorageEndpoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISecurityAlertPolicyPropertiesInternal)Property).StorageEndpoint = value; }
+ public string StorageEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISecurityAlertPolicyPropertiesInternal)Property).StorageEndpoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISecurityAlertPolicyPropertiesInternal)Property).StorageEndpoint = value ?? null; }
///
/// The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
@@ -140,12 +140,12 @@ public partial interface IServerSecurityAlertPolicy :
int? RetentionDay { get; set; }
/// Specifies the state of the policy, whether it is enabled or disabled.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Info(
- Required = true,
+ Required = false,
ReadOnly = false,
Description = @"Specifies the state of the policy, whether it is enabled or disabled.",
SerializedName = @"state",
PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.ServerSecurityAlertPolicyState) })]
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.ServerSecurityAlertPolicyState State { get; set; }
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.ServerSecurityAlertPolicyState? State { get; set; }
/// Specifies the identifier key of the Threat Detection audit storage account.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Info(
Required = false,
@@ -184,7 +184,7 @@ internal partial interface IServerSecurityAlertPolicyInternal :
/// Specifies the number of days to keep in the Threat Detection audit logs.
int? RetentionDay { get; set; }
/// Specifies the state of the policy, whether it is enabled or disabled.
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.ServerSecurityAlertPolicyState State { get; set; }
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.ServerSecurityAlertPolicyState? State { get; set; }
/// Specifies the identifier key of the Threat Detection audit storage account.
string StorageAccountAccessKey { get; set; }
///
diff --git a/src/MySql/generated/api/Models/Api20171201/ServerUpdateParameters.cs b/src/MySql/generated/api/Models/Api20171201/ServerUpdateParameters.cs
index fc488966bc34..49fac71d3636 100644
--- a/src/MySql/generated/api/Models/Api20171201/ServerUpdateParameters.cs
+++ b/src/MySql/generated/api/Models/Api20171201/ServerUpdateParameters.cs
@@ -10,7 +10,7 @@ public partial class ServerUpdateParameters :
/// The password of the administrator login.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public string AdministratorLoginPassword { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerUpdateParametersPropertiesInternal)Property).AdministratorLoginPassword; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerUpdateParametersPropertiesInternal)Property).AdministratorLoginPassword = value; }
+ public string AdministratorLoginPassword { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerUpdateParametersPropertiesInternal)Property).AdministratorLoginPassword; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerUpdateParametersPropertiesInternal)Property).AdministratorLoginPassword = value ?? null; }
/// Backing field for property.
private Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IResourceIdentity _identity;
@@ -32,7 +32,7 @@ public partial class ServerUpdateParameters :
/// principal for the resource.
///
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.IdentityType? IdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IResourceIdentityInternal)Identity).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IResourceIdentityInternal)Identity).Type = value; }
+ public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.IdentityType? IdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IResourceIdentityInternal)Identity).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IResourceIdentityInternal)Identity).Type = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.IdentityType)""); }
/// Internal Acessors for Identity
Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IResourceIdentity Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerUpdateParametersInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ResourceIdentity()); set { {_identity = value;} } }
@@ -54,7 +54,7 @@ public partial class ServerUpdateParameters :
/// Enforce a minimal Tls version for the server.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.MinimalTlsVersionEnum? MinimalTlsVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerUpdateParametersPropertiesInternal)Property).MinimalTlsVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerUpdateParametersPropertiesInternal)Property).MinimalTlsVersion = value; }
+ public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.MinimalTlsVersionEnum? MinimalTlsVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerUpdateParametersPropertiesInternal)Property).MinimalTlsVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerUpdateParametersPropertiesInternal)Property).MinimalTlsVersion = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.MinimalTlsVersionEnum)""); }
/// Backing field for property.
private Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerUpdateParametersProperties _property;
@@ -68,11 +68,11 @@ public partial class ServerUpdateParameters :
/// or 'Disabled'
///
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.PublicNetworkAccessEnum? PublicNetworkAccess { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerUpdateParametersPropertiesInternal)Property).PublicNetworkAccess; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerUpdateParametersPropertiesInternal)Property).PublicNetworkAccess = value; }
+ public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.PublicNetworkAccessEnum? PublicNetworkAccess { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerUpdateParametersPropertiesInternal)Property).PublicNetworkAccess; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerUpdateParametersPropertiesInternal)Property).PublicNetworkAccess = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.PublicNetworkAccessEnum)""); }
/// The replication role of the server.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public string ReplicationRole { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerUpdateParametersPropertiesInternal)Property).ReplicationRole; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerUpdateParametersPropertiesInternal)Property).ReplicationRole = value; }
+ public string ReplicationRole { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerUpdateParametersPropertiesInternal)Property).ReplicationRole; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerUpdateParametersPropertiesInternal)Property).ReplicationRole = value ?? null; }
/// Backing field for property.
private Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISku _sku;
@@ -83,45 +83,45 @@ public partial class ServerUpdateParameters :
/// The scale up/out capacity, representing server's compute units.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public int? SkuCapacity { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Capacity; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Capacity = value; }
+ public int? SkuCapacity { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Capacity; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Capacity = value ?? default(int); }
/// The family of hardware.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public string SkuFamily { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Family; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Family = value; }
+ public string SkuFamily { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Family; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Family = value ?? null; }
///
/// The name of the sku, typically, tier + family + cores, e.g. B_Gen4_1, GP_Gen5_8.
///
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public string SkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Name = value; }
+ public string SkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Name = value ?? null; }
/// The size code, to be interpreted by resource as appropriate.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public string SkuSize { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Size; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Size = value; }
+ public string SkuSize { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Size; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Size = value ?? null; }
/// The tier of the particular SKU, e.g. Basic.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SkuTier? SkuTier { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Tier; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Tier = value; }
+ public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SkuTier? SkuTier { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Tier; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ISkuInternal)Sku).Tier = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SkuTier)""); }
/// Enable ssl enforcement or not when connect to server.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SslEnforcementEnum? SslEnforcement { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerUpdateParametersPropertiesInternal)Property).SslEnforcement; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerUpdateParametersPropertiesInternal)Property).SslEnforcement = value; }
+ public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SslEnforcementEnum? SslEnforcement { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerUpdateParametersPropertiesInternal)Property).SslEnforcement; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerUpdateParametersPropertiesInternal)Property).SslEnforcement = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SslEnforcementEnum)""); }
/// Backup retention days for the server.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public int? StorageProfileBackupRetentionDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerUpdateParametersPropertiesInternal)Property).StorageProfileBackupRetentionDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerUpdateParametersPropertiesInternal)Property).StorageProfileBackupRetentionDay = value; }
+ public int? StorageProfileBackupRetentionDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerUpdateParametersPropertiesInternal)Property).StorageProfileBackupRetentionDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerUpdateParametersPropertiesInternal)Property).StorageProfileBackupRetentionDay = value ?? default(int); }
/// Enable Geo-redundant or not for server backup.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.GeoRedundantBackup? StorageProfileGeoRedundantBackup { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerUpdateParametersPropertiesInternal)Property).StorageProfileGeoRedundantBackup; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerUpdateParametersPropertiesInternal)Property).StorageProfileGeoRedundantBackup = value; }
+ public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.GeoRedundantBackup? StorageProfileGeoRedundantBackup { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerUpdateParametersPropertiesInternal)Property).StorageProfileGeoRedundantBackup; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerUpdateParametersPropertiesInternal)Property).StorageProfileGeoRedundantBackup = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.GeoRedundantBackup)""); }
/// Enable Storage Auto Grow.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.StorageAutogrow? StorageProfileStorageAutogrow { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerUpdateParametersPropertiesInternal)Property).StorageProfileStorageAutogrow; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerUpdateParametersPropertiesInternal)Property).StorageProfileStorageAutogrow = value; }
+ public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.StorageAutogrow? StorageProfileStorageAutogrow { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerUpdateParametersPropertiesInternal)Property).StorageProfileStorageAutogrow; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerUpdateParametersPropertiesInternal)Property).StorageProfileStorageAutogrow = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.StorageAutogrow)""); }
/// Max storage allowed for a server.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public int? StorageProfileStorageMb { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerUpdateParametersPropertiesInternal)Property).StorageProfileStorageMb; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerUpdateParametersPropertiesInternal)Property).StorageProfileStorageMb = value; }
+ public int? StorageProfileStorageMb { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerUpdateParametersPropertiesInternal)Property).StorageProfileStorageMb; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerUpdateParametersPropertiesInternal)Property).StorageProfileStorageMb = value ?? default(int); }
/// Backing field for property.
private Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerUpdateParametersTags _tag;
@@ -132,7 +132,7 @@ public partial class ServerUpdateParameters :
/// The version of a server.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.ServerVersion? Version { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerUpdateParametersPropertiesInternal)Property).Version; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerUpdateParametersPropertiesInternal)Property).Version = value; }
+ public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.ServerVersion? Version { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerUpdateParametersPropertiesInternal)Property).Version; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IServerUpdateParametersPropertiesInternal)Property).Version = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.ServerVersion)""); }
/// Creates an new instance.
public ServerUpdateParameters()
@@ -226,7 +226,7 @@ public partial interface IServerUpdateParameters :
/// The name of the sku, typically, tier + family + cores, e.g. B_Gen4_1, GP_Gen5_8.
///
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Info(
- Required = true,
+ Required = false,
ReadOnly = false,
Description = @"The name of the sku, typically, tier + family + cores, e.g. B_Gen4_1, GP_Gen5_8.",
SerializedName = @"name",
diff --git a/src/MySql/generated/api/Models/Api20171201/ServerUpdateParametersProperties.cs b/src/MySql/generated/api/Models/Api20171201/ServerUpdateParametersProperties.cs
index 068d697c0315..234bd6bcac99 100644
--- a/src/MySql/generated/api/Models/Api20171201/ServerUpdateParametersProperties.cs
+++ b/src/MySql/generated/api/Models/Api20171201/ServerUpdateParametersProperties.cs
@@ -58,19 +58,19 @@ public partial class ServerUpdateParametersProperties :
/// Backup retention days for the server.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public int? StorageProfileBackupRetentionDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IStorageProfileInternal)StorageProfile).BackupRetentionDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IStorageProfileInternal)StorageProfile).BackupRetentionDay = value; }
+ public int? StorageProfileBackupRetentionDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IStorageProfileInternal)StorageProfile).BackupRetentionDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IStorageProfileInternal)StorageProfile).BackupRetentionDay = value ?? default(int); }
/// Enable Geo-redundant or not for server backup.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.GeoRedundantBackup? StorageProfileGeoRedundantBackup { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IStorageProfileInternal)StorageProfile).GeoRedundantBackup; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IStorageProfileInternal)StorageProfile).GeoRedundantBackup = value; }
+ public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.GeoRedundantBackup? StorageProfileGeoRedundantBackup { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IStorageProfileInternal)StorageProfile).GeoRedundantBackup; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IStorageProfileInternal)StorageProfile).GeoRedundantBackup = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.GeoRedundantBackup)""); }
/// Enable Storage Auto Grow.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.StorageAutogrow? StorageProfileStorageAutogrow { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IStorageProfileInternal)StorageProfile).StorageAutogrow; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IStorageProfileInternal)StorageProfile).StorageAutogrow = value; }
+ public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.StorageAutogrow? StorageProfileStorageAutogrow { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IStorageProfileInternal)StorageProfile).StorageAutogrow; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IStorageProfileInternal)StorageProfile).StorageAutogrow = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.StorageAutogrow)""); }
/// Max storage allowed for a server.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public int? StorageProfileStorageMb { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IStorageProfileInternal)StorageProfile).StorageMb; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IStorageProfileInternal)StorageProfile).StorageMb = value; }
+ public int? StorageProfileStorageMb { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IStorageProfileInternal)StorageProfile).StorageMb; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IStorageProfileInternal)StorageProfile).StorageMb = value ?? default(int); }
/// Backing field for property.
private Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.ServerVersion? _version;
diff --git a/src/MySql/generated/api/Models/Api20171201/VirtualNetworkRule.cs b/src/MySql/generated/api/Models/Api20171201/VirtualNetworkRule.cs
index 4e68a413510c..0e0b262b2549 100644
--- a/src/MySql/generated/api/Models/Api20171201/VirtualNetworkRule.cs
+++ b/src/MySql/generated/api/Models/Api20171201/VirtualNetworkRule.cs
@@ -23,7 +23,7 @@ public partial class VirtualNetworkRule :
/// Create firewall rule before the virtual network has vnet service endpoint enabled.
///
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public bool? IgnoreMissingVnetServiceEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IVirtualNetworkRulePropertiesInternal)Property).IgnoreMissingVnetServiceEndpoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IVirtualNetworkRulePropertiesInternal)Property).IgnoreMissingVnetServiceEndpoint = value; }
+ public bool? IgnoreMissingVnetServiceEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IVirtualNetworkRulePropertiesInternal)Property).IgnoreMissingVnetServiceEndpoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IVirtualNetworkRulePropertiesInternal)Property).IgnoreMissingVnetServiceEndpoint = value ?? default(bool); }
/// Internal Acessors for Id
string Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api10.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api10.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api10.IResourceInternal)__resource).Id = value; }
@@ -63,7 +63,7 @@ public partial class VirtualNetworkRule :
/// The ARM resource id of the virtual network subnet.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public string VirtualNetworkSubnetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IVirtualNetworkRulePropertiesInternal)Property).VirtualNetworkSubnetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IVirtualNetworkRulePropertiesInternal)Property).VirtualNetworkSubnetId = value; }
+ public string VirtualNetworkSubnetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IVirtualNetworkRulePropertiesInternal)Property).VirtualNetworkSubnetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IVirtualNetworkRulePropertiesInternal)Property).VirtualNetworkSubnetId = value ; }
/// Validates that this object meets the validation criteria.
/// an instance that will receive validation
diff --git a/src/MySql/generated/api/Models/Api20200701Preview/ConfigurationAutoGenerated.cs b/src/MySql/generated/api/Models/Api20200701Preview/ConfigurationAutoGenerated.cs
index 022cf4c725e5..68f1b2f8dfe6 100644
--- a/src/MySql/generated/api/Models/Api20200701Preview/ConfigurationAutoGenerated.cs
+++ b/src/MySql/generated/api/Models/Api20200701Preview/ConfigurationAutoGenerated.cs
@@ -104,7 +104,7 @@ public partial class ConfigurationAutoGenerated :
/// Source of the configuration.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.FormatTable(Index = 3)]
- public string Source { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IConfigurationPropertiesAutoGeneratedInternal)Property).Source; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IConfigurationPropertiesAutoGeneratedInternal)Property).Source = value; }
+ public string Source { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IConfigurationPropertiesAutoGeneratedInternal)Property).Source; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IConfigurationPropertiesAutoGeneratedInternal)Property).Source = value ?? null; }
///
/// The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
@@ -116,7 +116,7 @@ public partial class ConfigurationAutoGenerated :
/// Value of the configuration.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.FormatTable(Index = 1)]
- public string Value { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IConfigurationPropertiesAutoGeneratedInternal)Property).Value; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IConfigurationPropertiesAutoGeneratedInternal)Property).Value = value; }
+ public string Value { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IConfigurationPropertiesAutoGeneratedInternal)Property).Value; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IConfigurationPropertiesAutoGeneratedInternal)Property).Value = value ?? null; }
/// Creates an new instance.
public ConfigurationAutoGenerated()
diff --git a/src/MySql/generated/api/Models/Api20200701Preview/ServerAutoGenerated.cs b/src/MySql/generated/api/Models/Api20200701Preview/ServerAutoGenerated.cs
index 97420f74fdac..f9c0157c2548 100644
--- a/src/MySql/generated/api/Models/Api20200701Preview/ServerAutoGenerated.cs
+++ b/src/MySql/generated/api/Models/Api20200701Preview/ServerAutoGenerated.cs
@@ -20,17 +20,17 @@ public partial class ServerAutoGenerated :
///
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.FormatTable(Index = 4)]
- public string AdministratorLogin { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).AdministratorLogin; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).AdministratorLogin = value; }
+ public string AdministratorLogin { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).AdministratorLogin; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).AdministratorLogin = value ?? null; }
/// The password of the administrator login (required for server creation).
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.DoNotFormat]
- public string AdministratorLoginPassword { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).AdministratorLoginPassword; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).AdministratorLoginPassword = value; }
+ public string AdministratorLoginPassword { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).AdministratorLoginPassword; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).AdministratorLoginPassword = value ?? null; }
/// availability Zone information of the server.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.DoNotFormat]
- public string AvailabilityZone { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).AvailabilityZone; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).AvailabilityZone = value; }
+ public string AvailabilityZone { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).AvailabilityZone; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).AvailabilityZone = value ?? null; }
///
/// Status showing whether the data encryption is enabled with customer-managed keys.
@@ -42,12 +42,12 @@ public partial class ServerAutoGenerated :
/// The mode to create a new MySQL server.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.DoNotFormat]
- public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.CreateMode? CreateMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).CreateMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).CreateMode = value; }
+ public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.CreateMode? CreateMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).CreateMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).CreateMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.CreateMode)""); }
/// delegated subnet arm resource id.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.DoNotFormat]
- public string DelegatedSubnetArgumentSubnetArmResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).DelegatedSubnetArgumentSubnetArmResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).DelegatedSubnetArgumentSubnetArmResourceId = value; }
+ public string DelegatedSubnetArgumentSubnetArmResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).DelegatedSubnetArgumentSubnetArmResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).DelegatedSubnetArgumentSubnetArmResourceId = value ?? null; }
/// Earliest restore point creation time (ISO8601 format)
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
@@ -62,7 +62,7 @@ public partial class ServerAutoGenerated :
/// Enable HA or not for a server.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.DoNotFormat]
- public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.HaEnabledEnum? HaEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).HaEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).HaEnabled = value; }
+ public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.HaEnabledEnum? HaEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).HaEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).HaEnabled = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.HaEnabledEnum)""); }
/// The state of a HA server.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
@@ -97,12 +97,12 @@ public partial class ServerAutoGenerated :
/// The identity type.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.DoNotFormat]
- public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.ResourceIdentityType? IdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api10.IIdentityInternal)Identity).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api10.IIdentityInternal)Identity).Type = value; }
+ public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.ResourceIdentityType? IdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api10.IIdentityInternal)Identity).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api10.IIdentityInternal)Identity).Type = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.ResourceIdentityType)""); }
/// Status showing whether the server enabled infrastructure encryption.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.DoNotFormat]
- public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.InfrastructureEncryptionEnum? InfrastructureEncryption { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).InfrastructureEncryption; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).InfrastructureEncryption = value; }
+ public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.InfrastructureEncryptionEnum? InfrastructureEncryption { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).InfrastructureEncryption; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).InfrastructureEncryption = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.InfrastructureEncryptionEnum)""); }
/// The geo-location where the resource lives
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inherited)]
@@ -112,22 +112,22 @@ public partial class ServerAutoGenerated :
/// indicates whether custom window is enabled or disabled
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.DoNotFormat]
- public string MaintenanceWindowCustomWindow { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).MaintenanceWindowCustomWindow; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).MaintenanceWindowCustomWindow = value; }
+ public string MaintenanceWindowCustomWindow { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).MaintenanceWindowCustomWindow; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).MaintenanceWindowCustomWindow = value ?? null; }
/// day of week for maintenance window
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.DoNotFormat]
- public int? MaintenanceWindowDayOfWeek { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).MaintenanceWindowDayOfWeek; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).MaintenanceWindowDayOfWeek = value; }
+ public int? MaintenanceWindowDayOfWeek { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).MaintenanceWindowDayOfWeek; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).MaintenanceWindowDayOfWeek = value ?? default(int); }
/// start hour for maintenance window
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.DoNotFormat]
- public int? MaintenanceWindowStartHour { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).MaintenanceWindowStartHour; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).MaintenanceWindowStartHour = value; }
+ public int? MaintenanceWindowStartHour { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).MaintenanceWindowStartHour; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).MaintenanceWindowStartHour = value ?? default(int); }
/// start minute for maintenance window
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.DoNotFormat]
- public int? MaintenanceWindowStartMinute { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).MaintenanceWindowStartMinute; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).MaintenanceWindowStartMinute = value; }
+ public int? MaintenanceWindowStartMinute { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).MaintenanceWindowStartMinute; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).MaintenanceWindowStartMinute = value ?? default(int); }
/// Internal Acessors for Id
string Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api10.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api10.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api10.IResourceInternal)__trackedResource).Id = value; }
@@ -194,7 +194,7 @@ public partial class ServerAutoGenerated :
/// Application-specific metadata in the form of key-value pairs.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.DoNotFormat]
- public Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesTags PropertiesTag { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).Tag = value; }
+ public Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesTags PropertiesTag { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).Tag = value ?? null /* model class */; }
/// Backing field for property.
private Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGenerated _property;
@@ -220,14 +220,14 @@ public partial class ServerAutoGenerated :
/// The replication role.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.DoNotFormat]
- public string ReplicationRole { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).ReplicationRole; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).ReplicationRole = value; }
+ public string ReplicationRole { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).ReplicationRole; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).ReplicationRole = value ?? null; }
///
/// Restore point creation time (ISO8601 format), specifying the time to restore from.
///
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.DoNotFormat]
- public global::System.DateTime? RestorePointInTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).RestorePointInTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).RestorePointInTime = value; }
+ public global::System.DateTime? RestorePointInTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).RestorePointInTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).RestorePointInTime = value ?? default(global::System.DateTime); }
/// Backing field for property.
private Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ISkuAutoGenerated _sku;
@@ -240,22 +240,22 @@ public partial class ServerAutoGenerated :
/// The name of the sku, e.g. Standard_D32s_v3.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.FormatTable(Index = 2)]
- public string SkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ISkuAutoGeneratedInternal)Sku).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ISkuAutoGeneratedInternal)Sku).Name = value; }
+ public string SkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ISkuAutoGeneratedInternal)Sku).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ISkuAutoGeneratedInternal)Sku).Name = value ?? null; }
/// The tier of the particular SKU, e.g. GeneralPurpose.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.FormatTable(Index = 3)]
- public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SkuTier SkuTier { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ISkuAutoGeneratedInternal)Sku).Tier; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ISkuAutoGeneratedInternal)Sku).Tier = value; }
+ public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SkuTier? SkuTier { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ISkuAutoGeneratedInternal)Sku).Tier; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ISkuAutoGeneratedInternal)Sku).Tier = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SkuTier)""); }
/// The source MySQL server id.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.DoNotFormat]
- public string SourceServerId { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).SourceServerId; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).SourceServerId = value; }
+ public string SourceServerId { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).SourceServerId; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).SourceServerId = value ?? null; }
/// Enable ssl enforcement or not when connect to server.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.DoNotFormat]
- public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SslEnforcementEnum? SslEnforcement { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).SslEnforcement; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).SslEnforcement = value; }
+ public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SslEnforcementEnum? SslEnforcement { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).SslEnforcement; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).SslEnforcement = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SslEnforcementEnum)""); }
/// availability Zone information of the server.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
@@ -270,22 +270,22 @@ public partial class ServerAutoGenerated :
/// Backup retention days for the server.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.DoNotFormat]
- public int? StorageProfileBackupRetentionDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).StorageProfileBackupRetentionDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).StorageProfileBackupRetentionDay = value; }
+ public int? StorageProfileBackupRetentionDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).StorageProfileBackupRetentionDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).StorageProfileBackupRetentionDay = value ?? default(int); }
/// Enable Storage Auto Grow.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.DoNotFormat]
- public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.StorageAutogrow? StorageProfileStorageAutogrow { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).StorageProfileStorageAutogrow; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).StorageProfileStorageAutogrow = value; }
+ public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.StorageAutogrow? StorageProfileStorageAutogrow { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).StorageProfileStorageAutogrow; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).StorageProfileStorageAutogrow = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.StorageAutogrow)""); }
/// Storage IOPS for a server.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.DoNotFormat]
- public int? StorageProfileStorageIop { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).StorageProfileStorageIop; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).StorageProfileStorageIop = value; }
+ public int? StorageProfileStorageIop { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).StorageProfileStorageIop; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).StorageProfileStorageIop = value ?? default(int); }
/// Max storage allowed for a server.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.FormatTable(Index = 6)]
- public int? StorageProfileStorageMb { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).StorageProfileStorageMb; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).StorageProfileStorageMb = value; }
+ public int? StorageProfileStorageMb { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).StorageProfileStorageMb; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).StorageProfileStorageMb = value ?? default(int); }
/// Resource tags.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inherited)]
@@ -302,7 +302,7 @@ public partial class ServerAutoGenerated :
/// Server version.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.MySql.FormatTable(Index = 5)]
- public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.ServerVersion? Version { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).Version; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).Version = value; }
+ public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.ServerVersion? Version { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).Version; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal)Property).Version = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.ServerVersion)""); }
/// Creates an new instance.
public ServerAutoGenerated()
@@ -523,7 +523,7 @@ public partial interface IServerAutoGenerated :
global::System.DateTime? RestorePointInTime { get; set; }
/// The name of the sku, e.g. Standard_D32s_v3.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Info(
- Required = true,
+ Required = false,
ReadOnly = false,
Description = @"The name of the sku, e.g. Standard_D32s_v3.",
SerializedName = @"name",
@@ -531,12 +531,12 @@ public partial interface IServerAutoGenerated :
string SkuName { get; set; }
/// The tier of the particular SKU, e.g. GeneralPurpose.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Info(
- Required = true,
+ Required = false,
ReadOnly = false,
Description = @"The tier of the particular SKU, e.g. GeneralPurpose.",
SerializedName = @"tier",
PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SkuTier) })]
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SkuTier SkuTier { get; set; }
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SkuTier? SkuTier { get; set; }
/// The source MySQL server id.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Info(
Required = false,
@@ -684,7 +684,7 @@ internal partial interface IServerAutoGeneratedInternal :
/// The name of the sku, e.g. Standard_D32s_v3.
string SkuName { get; set; }
/// The tier of the particular SKU, e.g. GeneralPurpose.
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SkuTier SkuTier { get; set; }
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SkuTier? SkuTier { get; set; }
/// The source MySQL server id.
string SourceServerId { get; set; }
/// Enable ssl enforcement or not when connect to server.
diff --git a/src/MySql/generated/api/Models/Api20200701Preview/ServerForUpdate.cs b/src/MySql/generated/api/Models/Api20200701Preview/ServerForUpdate.cs
index d09e6e00074a..a7e531c66c7c 100644
--- a/src/MySql/generated/api/Models/Api20200701Preview/ServerForUpdate.cs
+++ b/src/MySql/generated/api/Models/Api20200701Preview/ServerForUpdate.cs
@@ -10,31 +10,31 @@ public partial class ServerForUpdate :
/// The password of the administrator login.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public string AdministratorLoginPassword { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesForUpdateInternal)Property).AdministratorLoginPassword; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesForUpdateInternal)Property).AdministratorLoginPassword = value; }
+ public string AdministratorLoginPassword { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesForUpdateInternal)Property).AdministratorLoginPassword; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesForUpdateInternal)Property).AdministratorLoginPassword = value ?? null; }
/// delegated subnet arm resource id.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public string DelegatedSubnetArgumentSubnetArmResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesForUpdateInternal)Property).DelegatedSubnetArgumentSubnetArmResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesForUpdateInternal)Property).DelegatedSubnetArgumentSubnetArmResourceId = value; }
+ public string DelegatedSubnetArgumentSubnetArmResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesForUpdateInternal)Property).DelegatedSubnetArgumentSubnetArmResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesForUpdateInternal)Property).DelegatedSubnetArgumentSubnetArmResourceId = value ?? null; }
/// Enable HA or not for a server.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.HaEnabledEnum? HaEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesForUpdateInternal)Property).HaEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesForUpdateInternal)Property).HaEnabled = value; }
+ public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.HaEnabledEnum? HaEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesForUpdateInternal)Property).HaEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesForUpdateInternal)Property).HaEnabled = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.HaEnabledEnum)""); }
/// indicates whether custom window is enabled or disabled
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public string MaintenanceWindowCustomWindow { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesForUpdateInternal)Property).MaintenanceWindowCustomWindow; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesForUpdateInternal)Property).MaintenanceWindowCustomWindow = value; }
+ public string MaintenanceWindowCustomWindow { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesForUpdateInternal)Property).MaintenanceWindowCustomWindow; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesForUpdateInternal)Property).MaintenanceWindowCustomWindow = value ?? null; }
/// day of week for maintenance window
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public int? MaintenanceWindowDayOfWeek { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesForUpdateInternal)Property).MaintenanceWindowDayOfWeek; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesForUpdateInternal)Property).MaintenanceWindowDayOfWeek = value; }
+ public int? MaintenanceWindowDayOfWeek { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesForUpdateInternal)Property).MaintenanceWindowDayOfWeek; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesForUpdateInternal)Property).MaintenanceWindowDayOfWeek = value ?? default(int); }
/// start hour for maintenance window
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public int? MaintenanceWindowStartHour { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesForUpdateInternal)Property).MaintenanceWindowStartHour; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesForUpdateInternal)Property).MaintenanceWindowStartHour = value; }
+ public int? MaintenanceWindowStartHour { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesForUpdateInternal)Property).MaintenanceWindowStartHour; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesForUpdateInternal)Property).MaintenanceWindowStartHour = value ?? default(int); }
/// start minute for maintenance window
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public int? MaintenanceWindowStartMinute { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesForUpdateInternal)Property).MaintenanceWindowStartMinute; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesForUpdateInternal)Property).MaintenanceWindowStartMinute = value; }
+ public int? MaintenanceWindowStartMinute { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesForUpdateInternal)Property).MaintenanceWindowStartMinute; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesForUpdateInternal)Property).MaintenanceWindowStartMinute = value ?? default(int); }
/// Internal Acessors for DelegatedSubnetArgument
Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IDelegatedSubnetArguments Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerForUpdateInternal.DelegatedSubnetArgument { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesForUpdateInternal)Property).DelegatedSubnetArgument; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesForUpdateInternal)Property).DelegatedSubnetArgument = value; }
@@ -60,7 +60,7 @@ public partial class ServerForUpdate :
/// The replication role of the server.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public string ReplicationRole { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesForUpdateInternal)Property).ReplicationRole; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesForUpdateInternal)Property).ReplicationRole = value; }
+ public string ReplicationRole { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesForUpdateInternal)Property).ReplicationRole; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesForUpdateInternal)Property).ReplicationRole = value ?? null; }
/// Backing field for property.
private Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ISkuAutoGenerated _sku;
@@ -71,31 +71,31 @@ public partial class ServerForUpdate :
/// The name of the sku, e.g. Standard_D32s_v3.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public string SkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ISkuAutoGeneratedInternal)Sku).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ISkuAutoGeneratedInternal)Sku).Name = value; }
+ public string SkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ISkuAutoGeneratedInternal)Sku).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ISkuAutoGeneratedInternal)Sku).Name = value ?? null; }
/// The tier of the particular SKU, e.g. GeneralPurpose.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SkuTier SkuTier { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ISkuAutoGeneratedInternal)Sku).Tier; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ISkuAutoGeneratedInternal)Sku).Tier = value; }
+ public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SkuTier? SkuTier { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ISkuAutoGeneratedInternal)Sku).Tier; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ISkuAutoGeneratedInternal)Sku).Tier = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SkuTier)""); }
/// Enable ssl enforcement or not when connect to server.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SslEnforcementEnum? SslEnforcement { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesForUpdateInternal)Property).SslEnforcement; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesForUpdateInternal)Property).SslEnforcement = value; }
+ public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SslEnforcementEnum? SslEnforcement { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesForUpdateInternal)Property).SslEnforcement; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesForUpdateInternal)Property).SslEnforcement = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SslEnforcementEnum)""); }
/// Backup retention days for the server.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public int? StorageProfileBackupRetentionDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesForUpdateInternal)Property).StorageProfileBackupRetentionDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesForUpdateInternal)Property).StorageProfileBackupRetentionDay = value; }
+ public int? StorageProfileBackupRetentionDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesForUpdateInternal)Property).StorageProfileBackupRetentionDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesForUpdateInternal)Property).StorageProfileBackupRetentionDay = value ?? default(int); }
/// Enable Storage Auto Grow.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.StorageAutogrow? StorageProfileStorageAutogrow { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesForUpdateInternal)Property).StorageProfileStorageAutogrow; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesForUpdateInternal)Property).StorageProfileStorageAutogrow = value; }
+ public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.StorageAutogrow? StorageProfileStorageAutogrow { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesForUpdateInternal)Property).StorageProfileStorageAutogrow; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesForUpdateInternal)Property).StorageProfileStorageAutogrow = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.StorageAutogrow)""); }
/// Storage IOPS for a server.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public int? StorageProfileStorageIop { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesForUpdateInternal)Property).StorageProfileStorageIop; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesForUpdateInternal)Property).StorageProfileStorageIop = value; }
+ public int? StorageProfileStorageIop { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesForUpdateInternal)Property).StorageProfileStorageIop; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesForUpdateInternal)Property).StorageProfileStorageIop = value ?? default(int); }
/// Max storage allowed for a server.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public int? StorageProfileStorageMb { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesForUpdateInternal)Property).StorageProfileStorageMb; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesForUpdateInternal)Property).StorageProfileStorageMb = value; }
+ public int? StorageProfileStorageMb { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesForUpdateInternal)Property).StorageProfileStorageMb; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesForUpdateInternal)Property).StorageProfileStorageMb = value ?? default(int); }
/// Backing field for property.
private Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerForUpdateTags _tag;
@@ -180,7 +180,7 @@ public partial interface IServerForUpdate :
string ReplicationRole { get; set; }
/// The name of the sku, e.g. Standard_D32s_v3.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Info(
- Required = true,
+ Required = false,
ReadOnly = false,
Description = @"The name of the sku, e.g. Standard_D32s_v3.",
SerializedName = @"name",
@@ -188,12 +188,12 @@ public partial interface IServerForUpdate :
string SkuName { get; set; }
/// The tier of the particular SKU, e.g. GeneralPurpose.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Info(
- Required = true,
+ Required = false,
ReadOnly = false,
Description = @"The tier of the particular SKU, e.g. GeneralPurpose.",
SerializedName = @"tier",
PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SkuTier) })]
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SkuTier SkuTier { get; set; }
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SkuTier? SkuTier { get; set; }
/// Enable ssl enforcement or not when connect to server.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Info(
Required = false,
@@ -275,7 +275,7 @@ internal partial interface IServerForUpdateInternal
/// The name of the sku, e.g. Standard_D32s_v3.
string SkuName { get; set; }
/// The tier of the particular SKU, e.g. GeneralPurpose.
- Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SkuTier SkuTier { get; set; }
+ Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SkuTier? SkuTier { get; set; }
/// Enable ssl enforcement or not when connect to server.
Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SslEnforcementEnum? SslEnforcement { get; set; }
/// Storage profile of a server.
diff --git a/src/MySql/generated/api/Models/Api20200701Preview/ServerKey.cs b/src/MySql/generated/api/Models/Api20200701Preview/ServerKey.cs
index 53c0aa7ede23..5af6689eeb25 100644
--- a/src/MySql/generated/api/Models/Api20200701Preview/ServerKey.cs
+++ b/src/MySql/generated/api/Models/Api20200701Preview/ServerKey.cs
@@ -74,7 +74,7 @@ public partial class ServerKey :
/// The URI of the key.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public string Uri { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerKeyPropertiesInternal)Property).Uri; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerKeyPropertiesInternal)Property).Uri = value; }
+ public string Uri { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerKeyPropertiesInternal)Property).Uri; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerKeyPropertiesInternal)Property).Uri = value ?? null; }
/// Creates an new instance.
public ServerKey()
@@ -117,7 +117,7 @@ public partial interface IServerKey :
string Kind { get; }
/// The key type like 'AzureKeyVault'.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Info(
- Required = true,
+ Required = false,
ReadOnly = true,
Description = @"The key type like 'AzureKeyVault'.",
SerializedName = @"serverKeyType",
diff --git a/src/MySql/generated/api/Models/Api20200701Preview/ServerPropertiesAutoGenerated.cs b/src/MySql/generated/api/Models/Api20200701Preview/ServerPropertiesAutoGenerated.cs
index a7b06914fa34..9465a3e3a241 100644
--- a/src/MySql/generated/api/Models/Api20200701Preview/ServerPropertiesAutoGenerated.cs
+++ b/src/MySql/generated/api/Models/Api20200701Preview/ServerPropertiesAutoGenerated.cs
@@ -57,7 +57,7 @@ public partial class ServerPropertiesAutoGenerated :
/// delegated subnet arm resource id.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public string DelegatedSubnetArgumentSubnetArmResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IDelegatedSubnetArgumentsInternal)DelegatedSubnetArgument).SubnetArmResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IDelegatedSubnetArgumentsInternal)DelegatedSubnetArgument).SubnetArmResourceId = value; }
+ public string DelegatedSubnetArgumentSubnetArmResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IDelegatedSubnetArgumentsInternal)DelegatedSubnetArgument).SubnetArmResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IDelegatedSubnetArgumentsInternal)DelegatedSubnetArgument).SubnetArmResourceId = value ?? null; }
/// Backing field for property.
private global::System.DateTime? _earliestRestoreDate;
@@ -103,19 +103,19 @@ public partial class ServerPropertiesAutoGenerated :
/// indicates whether custom window is enabled or disabled
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public string MaintenanceWindowCustomWindow { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IMaintenanceWindowInternal)MaintenanceWindow).CustomWindow; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IMaintenanceWindowInternal)MaintenanceWindow).CustomWindow = value; }
+ public string MaintenanceWindowCustomWindow { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IMaintenanceWindowInternal)MaintenanceWindow).CustomWindow; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IMaintenanceWindowInternal)MaintenanceWindow).CustomWindow = value ?? null; }
/// day of week for maintenance window
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public int? MaintenanceWindowDayOfWeek { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IMaintenanceWindowInternal)MaintenanceWindow).DayOfWeek; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IMaintenanceWindowInternal)MaintenanceWindow).DayOfWeek = value; }
+ public int? MaintenanceWindowDayOfWeek { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IMaintenanceWindowInternal)MaintenanceWindow).DayOfWeek; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IMaintenanceWindowInternal)MaintenanceWindow).DayOfWeek = value ?? default(int); }
/// start hour for maintenance window
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public int? MaintenanceWindowStartHour { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IMaintenanceWindowInternal)MaintenanceWindow).StartHour; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IMaintenanceWindowInternal)MaintenanceWindow).StartHour = value; }
+ public int? MaintenanceWindowStartHour { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IMaintenanceWindowInternal)MaintenanceWindow).StartHour; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IMaintenanceWindowInternal)MaintenanceWindow).StartHour = value ?? default(int); }
/// start minute for maintenance window
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public int? MaintenanceWindowStartMinute { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IMaintenanceWindowInternal)MaintenanceWindow).StartMinute; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IMaintenanceWindowInternal)MaintenanceWindow).StartMinute = value; }
+ public int? MaintenanceWindowStartMinute { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IMaintenanceWindowInternal)MaintenanceWindow).StartMinute; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IMaintenanceWindowInternal)MaintenanceWindow).StartMinute = value ?? default(int); }
/// Internal Acessors for ByokEnforcement
string Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesAutoGeneratedInternal.ByokEnforcement { get => this._byokEnforcement; set { {_byokEnforcement = value;} } }
@@ -220,19 +220,19 @@ public partial class ServerPropertiesAutoGenerated :
/// Backup retention days for the server.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public int? StorageProfileBackupRetentionDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IStorageProfileAutoGeneratedInternal)StorageProfile).BackupRetentionDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IStorageProfileAutoGeneratedInternal)StorageProfile).BackupRetentionDay = value; }
+ public int? StorageProfileBackupRetentionDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IStorageProfileAutoGeneratedInternal)StorageProfile).BackupRetentionDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IStorageProfileAutoGeneratedInternal)StorageProfile).BackupRetentionDay = value ?? default(int); }
/// Enable Storage Auto Grow.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.StorageAutogrow? StorageProfileStorageAutogrow { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IStorageProfileAutoGeneratedInternal)StorageProfile).StorageAutogrow; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IStorageProfileAutoGeneratedInternal)StorageProfile).StorageAutogrow = value; }
+ public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.StorageAutogrow? StorageProfileStorageAutogrow { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IStorageProfileAutoGeneratedInternal)StorageProfile).StorageAutogrow; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IStorageProfileAutoGeneratedInternal)StorageProfile).StorageAutogrow = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.StorageAutogrow)""); }
/// Storage IOPS for a server.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public int? StorageProfileStorageIop { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IStorageProfileAutoGeneratedInternal)StorageProfile).StorageIop; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IStorageProfileAutoGeneratedInternal)StorageProfile).StorageIop = value; }
+ public int? StorageProfileStorageIop { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IStorageProfileAutoGeneratedInternal)StorageProfile).StorageIop; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IStorageProfileAutoGeneratedInternal)StorageProfile).StorageIop = value ?? default(int); }
/// Max storage allowed for a server.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public int? StorageProfileStorageMb { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IStorageProfileAutoGeneratedInternal)StorageProfile).StorageMb; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IStorageProfileAutoGeneratedInternal)StorageProfile).StorageMb = value; }
+ public int? StorageProfileStorageMb { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IStorageProfileAutoGeneratedInternal)StorageProfile).StorageMb; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IStorageProfileAutoGeneratedInternal)StorageProfile).StorageMb = value ?? default(int); }
/// Backing field for property.
private Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesTags _tag;
diff --git a/src/MySql/generated/api/Models/Api20200701Preview/ServerPropertiesForUpdate.cs b/src/MySql/generated/api/Models/Api20200701Preview/ServerPropertiesForUpdate.cs
index 5c71c191b156..2718465c2839 100644
--- a/src/MySql/generated/api/Models/Api20200701Preview/ServerPropertiesForUpdate.cs
+++ b/src/MySql/generated/api/Models/Api20200701Preview/ServerPropertiesForUpdate.cs
@@ -24,7 +24,7 @@ public partial class ServerPropertiesForUpdate :
/// delegated subnet arm resource id.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public string DelegatedSubnetArgumentSubnetArmResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IDelegatedSubnetArgumentsInternal)DelegatedSubnetArgument).SubnetArmResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IDelegatedSubnetArgumentsInternal)DelegatedSubnetArgument).SubnetArmResourceId = value; }
+ public string DelegatedSubnetArgumentSubnetArmResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IDelegatedSubnetArgumentsInternal)DelegatedSubnetArgument).SubnetArmResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IDelegatedSubnetArgumentsInternal)DelegatedSubnetArgument).SubnetArmResourceId = value ?? null; }
/// Backing field for property.
private Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.HaEnabledEnum? _haEnabled;
@@ -42,19 +42,19 @@ public partial class ServerPropertiesForUpdate :
/// indicates whether custom window is enabled or disabled
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public string MaintenanceWindowCustomWindow { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IMaintenanceWindowInternal)MaintenanceWindow).CustomWindow; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IMaintenanceWindowInternal)MaintenanceWindow).CustomWindow = value; }
+ public string MaintenanceWindowCustomWindow { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IMaintenanceWindowInternal)MaintenanceWindow).CustomWindow; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IMaintenanceWindowInternal)MaintenanceWindow).CustomWindow = value ?? null; }
/// day of week for maintenance window
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public int? MaintenanceWindowDayOfWeek { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IMaintenanceWindowInternal)MaintenanceWindow).DayOfWeek; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IMaintenanceWindowInternal)MaintenanceWindow).DayOfWeek = value; }
+ public int? MaintenanceWindowDayOfWeek { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IMaintenanceWindowInternal)MaintenanceWindow).DayOfWeek; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IMaintenanceWindowInternal)MaintenanceWindow).DayOfWeek = value ?? default(int); }
/// start hour for maintenance window
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public int? MaintenanceWindowStartHour { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IMaintenanceWindowInternal)MaintenanceWindow).StartHour; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IMaintenanceWindowInternal)MaintenanceWindow).StartHour = value; }
+ public int? MaintenanceWindowStartHour { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IMaintenanceWindowInternal)MaintenanceWindow).StartHour; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IMaintenanceWindowInternal)MaintenanceWindow).StartHour = value ?? default(int); }
/// start minute for maintenance window
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public int? MaintenanceWindowStartMinute { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IMaintenanceWindowInternal)MaintenanceWindow).StartMinute; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IMaintenanceWindowInternal)MaintenanceWindow).StartMinute = value; }
+ public int? MaintenanceWindowStartMinute { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IMaintenanceWindowInternal)MaintenanceWindow).StartMinute; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IMaintenanceWindowInternal)MaintenanceWindow).StartMinute = value ?? default(int); }
/// Internal Acessors for DelegatedSubnetArgument
Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IDelegatedSubnetArguments Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerPropertiesForUpdateInternal.DelegatedSubnetArgument { get => (this._delegatedSubnetArgument = this._delegatedSubnetArgument ?? new Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.DelegatedSubnetArguments()); set { {_delegatedSubnetArgument = value;} } }
@@ -88,19 +88,19 @@ public partial class ServerPropertiesForUpdate :
/// Backup retention days for the server.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public int? StorageProfileBackupRetentionDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IStorageProfileAutoGeneratedInternal)StorageProfile).BackupRetentionDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IStorageProfileAutoGeneratedInternal)StorageProfile).BackupRetentionDay = value; }
+ public int? StorageProfileBackupRetentionDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IStorageProfileAutoGeneratedInternal)StorageProfile).BackupRetentionDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IStorageProfileAutoGeneratedInternal)StorageProfile).BackupRetentionDay = value ?? default(int); }
/// Enable Storage Auto Grow.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.StorageAutogrow? StorageProfileStorageAutogrow { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IStorageProfileAutoGeneratedInternal)StorageProfile).StorageAutogrow; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IStorageProfileAutoGeneratedInternal)StorageProfile).StorageAutogrow = value; }
+ public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.StorageAutogrow? StorageProfileStorageAutogrow { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IStorageProfileAutoGeneratedInternal)StorageProfile).StorageAutogrow; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IStorageProfileAutoGeneratedInternal)StorageProfile).StorageAutogrow = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.StorageAutogrow)""); }
/// Storage IOPS for a server.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public int? StorageProfileStorageIop { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IStorageProfileAutoGeneratedInternal)StorageProfile).StorageIop; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IStorageProfileAutoGeneratedInternal)StorageProfile).StorageIop = value; }
+ public int? StorageProfileStorageIop { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IStorageProfileAutoGeneratedInternal)StorageProfile).StorageIop; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IStorageProfileAutoGeneratedInternal)StorageProfile).StorageIop = value ?? default(int); }
/// Max storage allowed for a server.
[Microsoft.Azure.PowerShell.Cmdlets.MySql.Origin(Microsoft.Azure.PowerShell.Cmdlets.MySql.PropertyOrigin.Inlined)]
- public int? StorageProfileStorageMb { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IStorageProfileAutoGeneratedInternal)StorageProfile).StorageMb; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IStorageProfileAutoGeneratedInternal)StorageProfile).StorageMb = value; }
+ public int? StorageProfileStorageMb { get => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IStorageProfileAutoGeneratedInternal)StorageProfile).StorageMb; set => ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IStorageProfileAutoGeneratedInternal)StorageProfile).StorageMb = value ?? default(int); }
/// Creates an new instance.
public ServerPropertiesForUpdate()
diff --git a/src/MySql/generated/api/MySql.cs b/src/MySql/generated/api/MySql.cs
index 28ee5062d9b8..d222ff323de9 100644
--- a/src/MySql/generated/api/MySql.cs
+++ b/src/MySql/generated/api/MySql.cs
@@ -34,8 +34,8 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
+ global::System.Uri.EscapeDataString(resourceGroupName)
@@ -45,19 +45,20 @@ public partial class MySql
+ global::System.Uri.EscapeDataString(configurationName)
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Put, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// set body content
request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8);
request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.ConfigurationsCreateOrUpdate_Call(request,onOk,eventListener,sender);
}
@@ -92,8 +93,8 @@ public partial class MySql
var serverName = _match.Groups["serverName"].Value;
var configurationName = _match.Groups["configurationName"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/resourceGroups/"
+ resourceGroupName
@@ -103,19 +104,20 @@ public partial class MySql
+ configurationName
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Put, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// set body content
request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8);
request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.ConfigurationsCreateOrUpdate_Call(request,onOk,eventListener,sender);
}
@@ -136,15 +138,16 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// this operation supports x-ms-long-running-operation
var _originalUri = request.RequestUri.AbsoluteUri;
// declared final-state-via: default
var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
var location = _response.GetFirstHeader(@"Location");
- while (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
{
// get the delay before polling. (default to 30 seconds if not present)
@@ -170,33 +173,35 @@ public partial class MySql
// check for cancellation
if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, $"Polling {_uri}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// drop the old response
_response?.Dispose();
// make the polling call
_response = await sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// if we got back an OK, take a peek inside and see if it's done
if( _response.StatusCode == global::System.Net.HttpStatusCode.OK)
{
+ var error = false;
try {
if( Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject json)
{
var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status");
if( state is null )
{
- // the body doesn't contain any information that has the state of the LRO
- // we're going to just get out, and let the consumer have the result
- break;
+ // the body doesn't contain any information that has the state of the LRO
+ // we're going to just get out, and let the consumer have the result
+ break;
}
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, $"Polled {_uri} provisioning state {state}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
switch( state?.ToString()?.ToLower() )
{
- case "succeeded":
case "failed":
+ error = true;
+ break;
+ case "succeeded":
case "canceled":
// we're done polling.
break;
@@ -211,6 +216,9 @@ public partial class MySql
// if we run into a problem peeking into the result,
// we really don't want to do anything special.
}
+ if (error) {
+ throw new Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.UndeclaredResponseException(_response);
+ }
}
// check for terminal status code
@@ -306,8 +314,8 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
+ global::System.Uri.EscapeDataString(resourceGroupName)
@@ -317,15 +325,16 @@ public partial class MySql
+ global::System.Uri.EscapeDataString(configurationName)
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.ConfigurationsGet_Call(request,onOk,eventListener,sender);
}
@@ -359,8 +368,8 @@ public partial class MySql
var serverName = _match.Groups["serverName"].Value;
var configurationName = _match.Groups["configurationName"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/resourceGroups/"
+ resourceGroupName
@@ -370,15 +379,16 @@ public partial class MySql
+ configurationName
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.ConfigurationsGet_Call(request,onOk,eventListener,sender);
}
@@ -399,8 +409,9 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
@@ -472,8 +483,8 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
+ global::System.Uri.EscapeDataString(resourceGroupName)
@@ -482,15 +493,16 @@ public partial class MySql
+ "/configurations"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.ConfigurationsListByServer_Call(request,onOk,eventListener,sender);
}
@@ -523,8 +535,8 @@ public partial class MySql
var resourceGroupName = _match.Groups["resourceGroupName"].Value;
var serverName = _match.Groups["serverName"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/resourceGroups/"
+ resourceGroupName
@@ -533,15 +545,16 @@ public partial class MySql
+ "/configurations"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.ConfigurationsListByServer_Call(request,onOk,eventListener,sender);
}
@@ -562,8 +575,9 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
@@ -635,8 +649,8 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
+ global::System.Uri.EscapeDataString(resourceGroupName)
@@ -646,19 +660,20 @@ public partial class MySql
+ global::System.Uri.EscapeDataString(databaseName)
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Put, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// set body content
request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8);
request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.DatabasesCreateOrUpdate_Call(request,onOk,eventListener,sender);
}
@@ -693,8 +708,8 @@ public partial class MySql
var serverName = _match.Groups["serverName"].Value;
var databaseName = _match.Groups["databaseName"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/resourceGroups/"
+ resourceGroupName
@@ -704,19 +719,20 @@ public partial class MySql
+ databaseName
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Put, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// set body content
request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8);
request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.DatabasesCreateOrUpdate_Call(request,onOk,eventListener,sender);
}
@@ -737,15 +753,16 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// this operation supports x-ms-long-running-operation
var _originalUri = request.RequestUri.AbsoluteUri;
// declared final-state-via: default
var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
var location = _response.GetFirstHeader(@"Location");
- while (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
{
// get the delay before polling. (default to 30 seconds if not present)
@@ -771,33 +788,35 @@ public partial class MySql
// check for cancellation
if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, $"Polling {_uri}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// drop the old response
_response?.Dispose();
// make the polling call
_response = await sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// if we got back an OK, take a peek inside and see if it's done
if( _response.StatusCode == global::System.Net.HttpStatusCode.OK)
{
+ var error = false;
try {
if( Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject json)
{
var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status");
if( state is null )
{
- // the body doesn't contain any information that has the state of the LRO
- // we're going to just get out, and let the consumer have the result
- break;
+ // the body doesn't contain any information that has the state of the LRO
+ // we're going to just get out, and let the consumer have the result
+ break;
}
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, $"Polled {_uri} provisioning state {state}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
switch( state?.ToString()?.ToLower() )
{
- case "succeeded":
case "failed":
+ error = true;
+ break;
+ case "succeeded":
case "canceled":
// we're done polling.
break;
@@ -812,6 +831,9 @@ public partial class MySql
// if we run into a problem peeking into the result,
// we really don't want to do anything special.
}
+ if (error) {
+ throw new Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.UndeclaredResponseException(_response);
+ }
}
// check for terminal status code
@@ -908,8 +930,8 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
+ global::System.Uri.EscapeDataString(resourceGroupName)
@@ -919,15 +941,16 @@ public partial class MySql
+ global::System.Uri.EscapeDataString(databaseName)
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Delete, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.DatabasesDelete_Call(request,onOk,onNoContent,eventListener,sender);
}
@@ -962,8 +985,8 @@ public partial class MySql
var serverName = _match.Groups["serverName"].Value;
var databaseName = _match.Groups["databaseName"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/resourceGroups/"
+ resourceGroupName
@@ -973,15 +996,16 @@ public partial class MySql
+ databaseName
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Delete, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.DatabasesDelete_Call(request,onOk,onNoContent,eventListener,sender);
}
@@ -1003,8 +1027,9 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// this operation supports x-ms-long-running-operation
var _originalUri = request.RequestUri.AbsoluteUri;
@@ -1012,7 +1037,7 @@ public partial class MySql
var _finalUri = _response.GetFirstHeader(@"Location");
var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
var location = _response.GetFirstHeader(@"Location");
- while (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
{
// get the delay before polling. (default to 30 seconds if not present)
@@ -1038,33 +1063,35 @@ public partial class MySql
// check for cancellation
if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, $"Polling {_uri}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// drop the old response
_response?.Dispose();
// make the polling call
_response = await sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// if we got back an OK, take a peek inside and see if it's done
if( _response.StatusCode == global::System.Net.HttpStatusCode.OK)
{
+ var error = false;
try {
if( Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject json)
{
var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status");
if( state is null )
{
- // the body doesn't contain any information that has the state of the LRO
- // we're going to just get out, and let the consumer have the result
- break;
+ // the body doesn't contain any information that has the state of the LRO
+ // we're going to just get out, and let the consumer have the result
+ break;
}
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, $"Polled {_uri} provisioning state {state}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
switch( state?.ToString()?.ToLower() )
{
- case "succeeded":
case "failed":
+ error = true;
+ break;
+ case "succeeded":
case "canceled":
// we're done polling.
break;
@@ -1079,6 +1106,9 @@ public partial class MySql
// if we run into a problem peeking into the result,
// we really don't want to do anything special.
}
+ if (error) {
+ throw new Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.UndeclaredResponseException(_response);
+ }
}
// check for terminal status code
@@ -1177,8 +1207,8 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
+ global::System.Uri.EscapeDataString(resourceGroupName)
@@ -1188,15 +1218,16 @@ public partial class MySql
+ global::System.Uri.EscapeDataString(databaseName)
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.DatabasesGet_Call(request,onOk,eventListener,sender);
}
@@ -1230,8 +1261,8 @@ public partial class MySql
var serverName = _match.Groups["serverName"].Value;
var databaseName = _match.Groups["databaseName"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/resourceGroups/"
+ resourceGroupName
@@ -1241,15 +1272,16 @@ public partial class MySql
+ databaseName
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.DatabasesGet_Call(request,onOk,eventListener,sender);
}
@@ -1270,8 +1302,9 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
@@ -1343,8 +1376,8 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
+ global::System.Uri.EscapeDataString(resourceGroupName)
@@ -1353,15 +1386,16 @@ public partial class MySql
+ "/databases"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.DatabasesListByServer_Call(request,onOk,eventListener,sender);
}
@@ -1394,8 +1428,8 @@ public partial class MySql
var resourceGroupName = _match.Groups["resourceGroupName"].Value;
var serverName = _match.Groups["serverName"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/resourceGroups/"
+ resourceGroupName
@@ -1404,15 +1438,16 @@ public partial class MySql
+ "/databases"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.DatabasesListByServer_Call(request,onOk,eventListener,sender);
}
@@ -1433,8 +1468,9 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
@@ -1506,8 +1542,8 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
+ global::System.Uri.EscapeDataString(resourceGroupName)
@@ -1517,19 +1553,20 @@ public partial class MySql
+ global::System.Uri.EscapeDataString(firewallRuleName)
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Put, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// set body content
request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8);
request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FirewallRulesCreateOrUpdate_Call(request,onOk,eventListener,sender);
}
@@ -1564,8 +1601,8 @@ public partial class MySql
var serverName = _match.Groups["serverName"].Value;
var firewallRuleName = _match.Groups["firewallRuleName"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/resourceGroups/"
+ resourceGroupName
@@ -1575,19 +1612,20 @@ public partial class MySql
+ firewallRuleName
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Put, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// set body content
request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8);
request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FirewallRulesCreateOrUpdate_Call(request,onOk,eventListener,sender);
}
@@ -1608,15 +1646,16 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// this operation supports x-ms-long-running-operation
var _originalUri = request.RequestUri.AbsoluteUri;
// declared final-state-via: default
var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
var location = _response.GetFirstHeader(@"Location");
- while (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
{
// get the delay before polling. (default to 30 seconds if not present)
@@ -1642,33 +1681,35 @@ public partial class MySql
// check for cancellation
if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, $"Polling {_uri}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// drop the old response
_response?.Dispose();
// make the polling call
_response = await sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// if we got back an OK, take a peek inside and see if it's done
if( _response.StatusCode == global::System.Net.HttpStatusCode.OK)
{
+ var error = false;
try {
if( Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject json)
{
var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status");
if( state is null )
{
- // the body doesn't contain any information that has the state of the LRO
- // we're going to just get out, and let the consumer have the result
- break;
+ // the body doesn't contain any information that has the state of the LRO
+ // we're going to just get out, and let the consumer have the result
+ break;
}
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, $"Polled {_uri} provisioning state {state}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
switch( state?.ToString()?.ToLower() )
{
- case "succeeded":
case "failed":
+ error = true;
+ break;
+ case "succeeded":
case "canceled":
// we're done polling.
break;
@@ -1683,6 +1724,9 @@ public partial class MySql
// if we run into a problem peeking into the result,
// we really don't want to do anything special.
}
+ if (error) {
+ throw new Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.UndeclaredResponseException(_response);
+ }
}
// check for terminal status code
@@ -1779,8 +1823,8 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
+ global::System.Uri.EscapeDataString(resourceGroupName)
@@ -1790,15 +1834,16 @@ public partial class MySql
+ global::System.Uri.EscapeDataString(firewallRuleName)
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Delete, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FirewallRulesDelete_Call(request,onOk,onNoContent,eventListener,sender);
}
@@ -1833,8 +1878,8 @@ public partial class MySql
var serverName = _match.Groups["serverName"].Value;
var firewallRuleName = _match.Groups["firewallRuleName"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/resourceGroups/"
+ resourceGroupName
@@ -1844,15 +1889,16 @@ public partial class MySql
+ firewallRuleName
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Delete, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FirewallRulesDelete_Call(request,onOk,onNoContent,eventListener,sender);
}
@@ -1874,8 +1920,9 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// this operation supports x-ms-long-running-operation
var _originalUri = request.RequestUri.AbsoluteUri;
@@ -1883,7 +1930,7 @@ public partial class MySql
var _finalUri = _response.GetFirstHeader(@"Location");
var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
var location = _response.GetFirstHeader(@"Location");
- while (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
{
// get the delay before polling. (default to 30 seconds if not present)
@@ -1909,33 +1956,35 @@ public partial class MySql
// check for cancellation
if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, $"Polling {_uri}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// drop the old response
_response?.Dispose();
// make the polling call
_response = await sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// if we got back an OK, take a peek inside and see if it's done
if( _response.StatusCode == global::System.Net.HttpStatusCode.OK)
{
+ var error = false;
try {
if( Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject json)
{
var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status");
if( state is null )
{
- // the body doesn't contain any information that has the state of the LRO
- // we're going to just get out, and let the consumer have the result
- break;
+ // the body doesn't contain any information that has the state of the LRO
+ // we're going to just get out, and let the consumer have the result
+ break;
}
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, $"Polled {_uri} provisioning state {state}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
switch( state?.ToString()?.ToLower() )
{
- case "succeeded":
case "failed":
+ error = true;
+ break;
+ case "succeeded":
case "canceled":
// we're done polling.
break;
@@ -1950,6 +1999,9 @@ public partial class MySql
// if we run into a problem peeking into the result,
// we really don't want to do anything special.
}
+ if (error) {
+ throw new Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.UndeclaredResponseException(_response);
+ }
}
// check for terminal status code
@@ -2048,8 +2100,8 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
+ global::System.Uri.EscapeDataString(resourceGroupName)
@@ -2059,15 +2111,16 @@ public partial class MySql
+ global::System.Uri.EscapeDataString(firewallRuleName)
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FirewallRulesGet_Call(request,onOk,eventListener,sender);
}
@@ -2101,8 +2154,8 @@ public partial class MySql
var serverName = _match.Groups["serverName"].Value;
var firewallRuleName = _match.Groups["firewallRuleName"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/resourceGroups/"
+ resourceGroupName
@@ -2112,15 +2165,16 @@ public partial class MySql
+ firewallRuleName
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FirewallRulesGet_Call(request,onOk,eventListener,sender);
}
@@ -2141,8 +2195,9 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
@@ -2214,8 +2269,8 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
+ global::System.Uri.EscapeDataString(resourceGroupName)
@@ -2224,15 +2279,16 @@ public partial class MySql
+ "/firewallRules"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FirewallRulesListByServer_Call(request,onOk,eventListener,sender);
}
@@ -2265,8 +2321,8 @@ public partial class MySql
var resourceGroupName = _match.Groups["resourceGroupName"].Value;
var serverName = _match.Groups["serverName"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/resourceGroups/"
+ resourceGroupName
@@ -2275,15 +2331,16 @@ public partial class MySql
+ "/firewallRules"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FirewallRulesListByServer_Call(request,onOk,eventListener,sender);
}
@@ -2304,8 +2361,9 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
@@ -2378,8 +2436,8 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
+ global::System.Uri.EscapeDataString(resourceGroupName)
@@ -2389,15 +2447,16 @@ public partial class MySql
+ global::System.Uri.EscapeDataString(configurationName)
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FlexibleServerConfigurationsGet_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -2433,8 +2492,8 @@ public partial class MySql
var serverName = _match.Groups["serverName"].Value;
var configurationName = _match.Groups["configurationName"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/resourceGroups/"
+ resourceGroupName
@@ -2444,15 +2503,16 @@ public partial class MySql
+ configurationName
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FlexibleServerConfigurationsGet_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -2475,8 +2535,9 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
@@ -2552,8 +2613,8 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
+ global::System.Uri.EscapeDataString(resourceGroupName)
@@ -2562,15 +2623,16 @@ public partial class MySql
+ "/configurations"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FlexibleServerConfigurationsListByServer_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -2605,8 +2667,8 @@ public partial class MySql
var resourceGroupName = _match.Groups["resourceGroupName"].Value;
var serverName = _match.Groups["serverName"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/resourceGroups/"
+ resourceGroupName
@@ -2615,15 +2677,16 @@ public partial class MySql
+ "/configurations"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FlexibleServerConfigurationsListByServer_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -2648,8 +2711,9 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
@@ -2725,8 +2789,8 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
+ global::System.Uri.EscapeDataString(resourceGroupName)
@@ -2736,19 +2800,20 @@ public partial class MySql
+ global::System.Uri.EscapeDataString(configurationName)
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Patch, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// set body content
request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8);
request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FlexibleServerConfigurationsUpdate_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -2785,8 +2850,8 @@ public partial class MySql
var serverName = _match.Groups["serverName"].Value;
var configurationName = _match.Groups["configurationName"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/resourceGroups/"
+ resourceGroupName
@@ -2796,19 +2861,20 @@ public partial class MySql
+ configurationName
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Patch, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// set body content
request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8);
request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FlexibleServerConfigurationsUpdate_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -2831,15 +2897,16 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// this operation supports x-ms-long-running-operation
var _originalUri = request.RequestUri.AbsoluteUri;
// declared final-state-via: default
var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
var location = _response.GetFirstHeader(@"Location");
- while (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
{
// get the delay before polling. (default to 30 seconds if not present)
@@ -2865,33 +2932,35 @@ public partial class MySql
// check for cancellation
if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, $"Polling {_uri}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// drop the old response
_response?.Dispose();
// make the polling call
_response = await sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// if we got back an OK, take a peek inside and see if it's done
if( _response.StatusCode == global::System.Net.HttpStatusCode.OK)
{
+ var error = false;
try {
if( Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject json)
{
var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status");
if( state is null )
{
- // the body doesn't contain any information that has the state of the LRO
- // we're going to just get out, and let the consumer have the result
- break;
+ // the body doesn't contain any information that has the state of the LRO
+ // we're going to just get out, and let the consumer have the result
+ break;
}
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, $"Polled {_uri} provisioning state {state}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
switch( state?.ToString()?.ToLower() )
{
- case "succeeded":
case "failed":
+ error = true;
+ break;
+ case "succeeded":
case "canceled":
// we're done polling.
break;
@@ -2906,6 +2975,9 @@ public partial class MySql
// if we run into a problem peeking into the result,
// we really don't want to do anything special.
}
+ if (error) {
+ throw new Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.UndeclaredResponseException(_response);
+ }
}
// check for terminal status code
@@ -3006,8 +3078,8 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
+ global::System.Uri.EscapeDataString(resourceGroupName)
@@ -3017,19 +3089,20 @@ public partial class MySql
+ global::System.Uri.EscapeDataString(databaseName)
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Put, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// set body content
request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8);
request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FlexibleServerDatabasesCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -3066,8 +3139,8 @@ public partial class MySql
var serverName = _match.Groups["serverName"].Value;
var databaseName = _match.Groups["databaseName"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/resourceGroups/"
+ resourceGroupName
@@ -3077,19 +3150,20 @@ public partial class MySql
+ databaseName
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Put, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// set body content
request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8);
request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FlexibleServerDatabasesCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -3114,15 +3188,16 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// this operation supports x-ms-long-running-operation
var _originalUri = request.RequestUri.AbsoluteUri;
// declared final-state-via: default
var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
var location = _response.GetFirstHeader(@"Location");
- while (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
{
// get the delay before polling. (default to 30 seconds if not present)
@@ -3148,33 +3223,35 @@ public partial class MySql
// check for cancellation
if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, $"Polling {_uri}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// drop the old response
_response?.Dispose();
// make the polling call
_response = await sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// if we got back an OK, take a peek inside and see if it's done
if( _response.StatusCode == global::System.Net.HttpStatusCode.OK)
{
+ var error = false;
try {
if( Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject json)
{
var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status");
if( state is null )
{
- // the body doesn't contain any information that has the state of the LRO
- // we're going to just get out, and let the consumer have the result
- break;
+ // the body doesn't contain any information that has the state of the LRO
+ // we're going to just get out, and let the consumer have the result
+ break;
}
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, $"Polled {_uri} provisioning state {state}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
switch( state?.ToString()?.ToLower() )
{
- case "succeeded":
case "failed":
+ error = true;
+ break;
+ case "succeeded":
case "canceled":
// we're done polling.
break;
@@ -3189,6 +3266,9 @@ public partial class MySql
// if we run into a problem peeking into the result,
// we really don't want to do anything special.
}
+ if (error) {
+ throw new Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.UndeclaredResponseException(_response);
+ }
}
// check for terminal status code
@@ -3289,8 +3369,8 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
+ global::System.Uri.EscapeDataString(resourceGroupName)
@@ -3300,15 +3380,16 @@ public partial class MySql
+ global::System.Uri.EscapeDataString(databaseName)
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Delete, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FlexibleServerDatabasesDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender);
}
@@ -3345,8 +3426,8 @@ public partial class MySql
var serverName = _match.Groups["serverName"].Value;
var databaseName = _match.Groups["databaseName"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/resourceGroups/"
+ resourceGroupName
@@ -3356,15 +3437,16 @@ public partial class MySql
+ databaseName
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Delete, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FlexibleServerDatabasesDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender);
}
@@ -3388,8 +3470,9 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// this operation supports x-ms-long-running-operation
var _originalUri = request.RequestUri.AbsoluteUri;
@@ -3397,7 +3480,7 @@ public partial class MySql
var _finalUri = _response.GetFirstHeader(@"Location");
var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
var location = _response.GetFirstHeader(@"Location");
- while (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
{
// get the delay before polling. (default to 30 seconds if not present)
@@ -3423,33 +3506,35 @@ public partial class MySql
// check for cancellation
if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, $"Polling {_uri}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// drop the old response
_response?.Dispose();
// make the polling call
_response = await sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// if we got back an OK, take a peek inside and see if it's done
if( _response.StatusCode == global::System.Net.HttpStatusCode.OK)
{
+ var error = false;
try {
if( Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject json)
{
var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status");
if( state is null )
{
- // the body doesn't contain any information that has the state of the LRO
- // we're going to just get out, and let the consumer have the result
- break;
+ // the body doesn't contain any information that has the state of the LRO
+ // we're going to just get out, and let the consumer have the result
+ break;
}
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, $"Polled {_uri} provisioning state {state}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
switch( state?.ToString()?.ToLower() )
{
- case "succeeded":
case "failed":
+ error = true;
+ break;
+ case "succeeded":
case "canceled":
// we're done polling.
break;
@@ -3464,6 +3549,9 @@ public partial class MySql
// if we run into a problem peeking into the result,
// we really don't want to do anything special.
}
+ if (error) {
+ throw new Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.UndeclaredResponseException(_response);
+ }
}
// check for terminal status code
@@ -3566,8 +3654,8 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
+ global::System.Uri.EscapeDataString(resourceGroupName)
@@ -3577,15 +3665,16 @@ public partial class MySql
+ global::System.Uri.EscapeDataString(databaseName)
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FlexibleServerDatabasesGet_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -3621,8 +3710,8 @@ public partial class MySql
var serverName = _match.Groups["serverName"].Value;
var databaseName = _match.Groups["databaseName"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/resourceGroups/"
+ resourceGroupName
@@ -3632,15 +3721,16 @@ public partial class MySql
+ databaseName
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FlexibleServerDatabasesGet_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -3663,8 +3753,9 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
@@ -3740,8 +3831,8 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
+ global::System.Uri.EscapeDataString(resourceGroupName)
@@ -3750,15 +3841,16 @@ public partial class MySql
+ "/databases"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FlexibleServerDatabasesListByServer_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -3793,8 +3885,8 @@ public partial class MySql
var resourceGroupName = _match.Groups["resourceGroupName"].Value;
var serverName = _match.Groups["serverName"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/resourceGroups/"
+ resourceGroupName
@@ -3803,15 +3895,16 @@ public partial class MySql
+ "/databases"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FlexibleServerDatabasesListByServer_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -3834,8 +3927,9 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
@@ -3911,8 +4005,8 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
+ global::System.Uri.EscapeDataString(resourceGroupName)
@@ -3922,19 +4016,20 @@ public partial class MySql
+ global::System.Uri.EscapeDataString(firewallRuleName)
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Put, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// set body content
request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8);
request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FlexibleServerFirewallRulesCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -3971,8 +4066,8 @@ public partial class MySql
var serverName = _match.Groups["serverName"].Value;
var firewallRuleName = _match.Groups["firewallRuleName"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/resourceGroups/"
+ resourceGroupName
@@ -3982,19 +4077,20 @@ public partial class MySql
+ firewallRuleName
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Put, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// set body content
request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8);
request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FlexibleServerFirewallRulesCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -4019,15 +4115,16 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// this operation supports x-ms-long-running-operation
var _originalUri = request.RequestUri.AbsoluteUri;
// declared final-state-via: default
var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
var location = _response.GetFirstHeader(@"Location");
- while (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
{
// get the delay before polling. (default to 30 seconds if not present)
@@ -4053,33 +4150,35 @@ public partial class MySql
// check for cancellation
if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, $"Polling {_uri}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// drop the old response
_response?.Dispose();
// make the polling call
_response = await sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// if we got back an OK, take a peek inside and see if it's done
if( _response.StatusCode == global::System.Net.HttpStatusCode.OK)
{
+ var error = false;
try {
if( Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject json)
{
var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status");
if( state is null )
{
- // the body doesn't contain any information that has the state of the LRO
- // we're going to just get out, and let the consumer have the result
- break;
+ // the body doesn't contain any information that has the state of the LRO
+ // we're going to just get out, and let the consumer have the result
+ break;
}
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, $"Polled {_uri} provisioning state {state}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
switch( state?.ToString()?.ToLower() )
{
- case "succeeded":
case "failed":
+ error = true;
+ break;
+ case "succeeded":
case "canceled":
// we're done polling.
break;
@@ -4094,6 +4193,9 @@ public partial class MySql
// if we run into a problem peeking into the result,
// we really don't want to do anything special.
}
+ if (error) {
+ throw new Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.UndeclaredResponseException(_response);
+ }
}
// check for terminal status code
@@ -4194,8 +4296,8 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
+ global::System.Uri.EscapeDataString(resourceGroupName)
@@ -4205,15 +4307,16 @@ public partial class MySql
+ global::System.Uri.EscapeDataString(firewallRuleName)
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Delete, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FlexibleServerFirewallRulesDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender);
}
@@ -4250,8 +4353,8 @@ public partial class MySql
var serverName = _match.Groups["serverName"].Value;
var firewallRuleName = _match.Groups["firewallRuleName"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/resourceGroups/"
+ resourceGroupName
@@ -4261,15 +4364,16 @@ public partial class MySql
+ firewallRuleName
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Delete, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FlexibleServerFirewallRulesDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender);
}
@@ -4293,8 +4397,9 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// this operation supports x-ms-long-running-operation
var _originalUri = request.RequestUri.AbsoluteUri;
@@ -4302,7 +4407,7 @@ public partial class MySql
var _finalUri = _response.GetFirstHeader(@"Location");
var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
var location = _response.GetFirstHeader(@"Location");
- while (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
{
// get the delay before polling. (default to 30 seconds if not present)
@@ -4328,33 +4433,35 @@ public partial class MySql
// check for cancellation
if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, $"Polling {_uri}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// drop the old response
_response?.Dispose();
// make the polling call
_response = await sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// if we got back an OK, take a peek inside and see if it's done
if( _response.StatusCode == global::System.Net.HttpStatusCode.OK)
{
+ var error = false;
try {
if( Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject json)
{
var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status");
if( state is null )
{
- // the body doesn't contain any information that has the state of the LRO
- // we're going to just get out, and let the consumer have the result
- break;
+ // the body doesn't contain any information that has the state of the LRO
+ // we're going to just get out, and let the consumer have the result
+ break;
}
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, $"Polled {_uri} provisioning state {state}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
switch( state?.ToString()?.ToLower() )
{
- case "succeeded":
case "failed":
+ error = true;
+ break;
+ case "succeeded":
case "canceled":
// we're done polling.
break;
@@ -4369,6 +4476,9 @@ public partial class MySql
// if we run into a problem peeking into the result,
// we really don't want to do anything special.
}
+ if (error) {
+ throw new Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.UndeclaredResponseException(_response);
+ }
}
// check for terminal status code
@@ -4471,8 +4581,8 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
+ global::System.Uri.EscapeDataString(resourceGroupName)
@@ -4482,15 +4592,16 @@ public partial class MySql
+ global::System.Uri.EscapeDataString(firewallRuleName)
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FlexibleServerFirewallRulesGet_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -4526,8 +4637,8 @@ public partial class MySql
var serverName = _match.Groups["serverName"].Value;
var firewallRuleName = _match.Groups["firewallRuleName"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/resourceGroups/"
+ resourceGroupName
@@ -4537,15 +4648,16 @@ public partial class MySql
+ firewallRuleName
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FlexibleServerFirewallRulesGet_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -4568,8 +4680,9 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
@@ -4645,8 +4758,8 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
+ global::System.Uri.EscapeDataString(resourceGroupName)
@@ -4655,15 +4768,16 @@ public partial class MySql
+ "/firewallRules"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FlexibleServerFirewallRulesListByServer_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -4698,8 +4812,8 @@ public partial class MySql
var resourceGroupName = _match.Groups["resourceGroupName"].Value;
var serverName = _match.Groups["serverName"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/resourceGroups/"
+ resourceGroupName
@@ -4708,15 +4822,16 @@ public partial class MySql
+ "/firewallRules"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FlexibleServerFirewallRulesListByServer_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -4741,8 +4856,9 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
@@ -4818,8 +4934,8 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
+ global::System.Uri.EscapeDataString(resourceGroupName)
@@ -4829,19 +4945,20 @@ public partial class MySql
+ global::System.Uri.EscapeDataString(keyName)
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Put, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// set body content
request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8);
request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FlexibleServerKeysCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -4878,8 +4995,8 @@ public partial class MySql
var serverName = _match.Groups["serverName"].Value;
var keyName = _match.Groups["keyName"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/resourceGroups/"
+ resourceGroupName
@@ -4889,19 +5006,20 @@ public partial class MySql
+ keyName
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Put, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// set body content
request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8);
request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FlexibleServerKeysCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -4924,15 +5042,16 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// this operation supports x-ms-long-running-operation
var _originalUri = request.RequestUri.AbsoluteUri;
// declared final-state-via: default
var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
var location = _response.GetFirstHeader(@"Location");
- while (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
{
// get the delay before polling. (default to 30 seconds if not present)
@@ -4958,33 +5077,35 @@ public partial class MySql
// check for cancellation
if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, $"Polling {_uri}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// drop the old response
_response?.Dispose();
// make the polling call
_response = await sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// if we got back an OK, take a peek inside and see if it's done
if( _response.StatusCode == global::System.Net.HttpStatusCode.OK)
{
+ var error = false;
try {
if( Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject json)
{
var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status");
if( state is null )
{
- // the body doesn't contain any information that has the state of the LRO
- // we're going to just get out, and let the consumer have the result
- break;
+ // the body doesn't contain any information that has the state of the LRO
+ // we're going to just get out, and let the consumer have the result
+ break;
}
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, $"Polled {_uri} provisioning state {state}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
switch( state?.ToString()?.ToLower() )
{
- case "succeeded":
case "failed":
+ error = true;
+ break;
+ case "succeeded":
case "canceled":
// we're done polling.
break;
@@ -4999,6 +5120,9 @@ public partial class MySql
// if we run into a problem peeking into the result,
// we really don't want to do anything special.
}
+ if (error) {
+ throw new Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.UndeclaredResponseException(_response);
+ }
}
// check for terminal status code
@@ -5099,8 +5223,8 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
+ global::System.Uri.EscapeDataString(resourceGroupName)
@@ -5110,15 +5234,16 @@ public partial class MySql
+ global::System.Uri.EscapeDataString(keyName)
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Delete, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FlexibleServerKeysDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender);
}
@@ -5155,8 +5280,8 @@ public partial class MySql
var serverName = _match.Groups["serverName"].Value;
var keyName = _match.Groups["keyName"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/resourceGroups/"
+ resourceGroupName
@@ -5166,15 +5291,16 @@ public partial class MySql
+ keyName
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Delete, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FlexibleServerKeysDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender);
}
@@ -5198,8 +5324,9 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// this operation supports x-ms-long-running-operation
var _originalUri = request.RequestUri.AbsoluteUri;
@@ -5207,7 +5334,7 @@ public partial class MySql
var _finalUri = _response.GetFirstHeader(@"Location");
var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
var location = _response.GetFirstHeader(@"Location");
- while (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
{
// get the delay before polling. (default to 30 seconds if not present)
@@ -5233,33 +5360,35 @@ public partial class MySql
// check for cancellation
if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, $"Polling {_uri}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// drop the old response
_response?.Dispose();
// make the polling call
_response = await sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// if we got back an OK, take a peek inside and see if it's done
if( _response.StatusCode == global::System.Net.HttpStatusCode.OK)
{
+ var error = false;
try {
if( Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject json)
{
var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status");
if( state is null )
{
- // the body doesn't contain any information that has the state of the LRO
- // we're going to just get out, and let the consumer have the result
- break;
+ // the body doesn't contain any information that has the state of the LRO
+ // we're going to just get out, and let the consumer have the result
+ break;
}
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, $"Polled {_uri} provisioning state {state}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
switch( state?.ToString()?.ToLower() )
{
- case "succeeded":
case "failed":
+ error = true;
+ break;
+ case "succeeded":
case "canceled":
// we're done polling.
break;
@@ -5274,6 +5403,9 @@ public partial class MySql
// if we run into a problem peeking into the result,
// we really don't want to do anything special.
}
+ if (error) {
+ throw new Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.UndeclaredResponseException(_response);
+ }
}
// check for terminal status code
@@ -5376,8 +5508,8 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
+ global::System.Uri.EscapeDataString(resourceGroupName)
@@ -5387,15 +5519,16 @@ public partial class MySql
+ global::System.Uri.EscapeDataString(keyName)
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FlexibleServerKeysGet_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -5431,8 +5564,8 @@ public partial class MySql
var serverName = _match.Groups["serverName"].Value;
var keyName = _match.Groups["keyName"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/resourceGroups/"
+ resourceGroupName
@@ -5442,15 +5575,16 @@ public partial class MySql
+ keyName
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FlexibleServerKeysGet_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -5473,8 +5607,9 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
@@ -5550,8 +5685,8 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
+ global::System.Uri.EscapeDataString(resourceGroupName)
@@ -5560,15 +5695,16 @@ public partial class MySql
+ "/keys"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FlexibleServerKeysListByServer_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -5603,8 +5739,8 @@ public partial class MySql
var resourceGroupName = _match.Groups["resourceGroupName"].Value;
var serverName = _match.Groups["serverName"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/resourceGroups/"
+ resourceGroupName
@@ -5613,15 +5749,16 @@ public partial class MySql
+ "/keys"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FlexibleServerKeysListByServer_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -5644,8 +5781,9 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
@@ -5718,23 +5856,24 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/providers/Microsoft.DBForMySql/locations/"
+ global::System.Uri.EscapeDataString(locationName)
+ "/capabilities"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FlexibleServerLocationBasedCapabilitiesList_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -5768,23 +5907,24 @@ public partial class MySql
var subscriptionId = _match.Groups["subscriptionId"].Value;
var locationName = _match.Groups["locationName"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/providers/Microsoft.DBForMySql/locations/"
+ locationName
+ "/capabilities"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FlexibleServerLocationBasedCapabilitiesList_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -5809,8 +5949,9 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
@@ -5878,25 +6019,26 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/providers/Microsoft.DBForMySql/checkNameAvailability"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Post, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// set body content
request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8);
request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FlexibleServerNameAvailabilityTest_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -5930,25 +6072,26 @@ public partial class MySql
// replace URI parameters with values from identity
var subscriptionId = _match.Groups["subscriptionId"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/providers/Microsoft.DBForMySql/checkNameAvailability"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Post, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// set body content
request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8);
request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FlexibleServerNameAvailabilityTest_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -5971,8 +6114,9 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
@@ -6042,8 +6186,8 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
+ global::System.Uri.EscapeDataString(resourceGroupName)
@@ -6052,15 +6196,16 @@ public partial class MySql
+ "/replicas"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FlexibleServerReplicasListByServer_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -6095,8 +6240,8 @@ public partial class MySql
var resourceGroupName = _match.Groups["resourceGroupName"].Value;
var serverName = _match.Groups["serverName"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/resourceGroups/"
+ resourceGroupName
@@ -6105,15 +6250,16 @@ public partial class MySql
+ "/replicas"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FlexibleServerReplicasListByServer_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -6136,8 +6282,9 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
@@ -6211,27 +6358,28 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/providers/Microsoft.DBForMySql/locations/"
+ global::System.Uri.EscapeDataString(locationName)
+ "/checkVirtualNetworkSubnetUsage"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Post, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// set body content
request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8);
request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FlexibleServerVirtualNetworkSubnetUsageGet_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -6266,27 +6414,28 @@ public partial class MySql
var subscriptionId = _match.Groups["subscriptionId"].Value;
var locationName = _match.Groups["locationName"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/providers/Microsoft.DBForMySql/locations/"
+ locationName
+ "/checkVirtualNetworkSubnetUsage"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Post, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// set body content
request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8);
request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FlexibleServerVirtualNetworkSubnetUsageGet_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -6311,8 +6460,9 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
@@ -6387,8 +6537,8 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
+ global::System.Uri.EscapeDataString(resourceGroupName)
@@ -6396,19 +6546,20 @@ public partial class MySql
+ global::System.Uri.EscapeDataString(serverName)
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Put, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// set body content
request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8);
request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FlexibleServersCreate_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -6446,8 +6597,8 @@ public partial class MySql
var resourceGroupName = _match.Groups["resourceGroupName"].Value;
var serverName = _match.Groups["serverName"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/resourceGroups/"
+ resourceGroupName
@@ -6455,19 +6606,20 @@ public partial class MySql
+ serverName
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Put, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// set body content
request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8);
request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FlexibleServersCreate_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -6490,15 +6642,16 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// this operation supports x-ms-long-running-operation
var _originalUri = request.RequestUri.AbsoluteUri;
// declared final-state-via: default
var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
var location = _response.GetFirstHeader(@"Location");
- while (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
{
// get the delay before polling. (default to 30 seconds if not present)
@@ -6524,33 +6677,35 @@ public partial class MySql
// check for cancellation
if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, $"Polling {_uri}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// drop the old response
_response?.Dispose();
// make the polling call
_response = await sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// if we got back an OK, take a peek inside and see if it's done
if( _response.StatusCode == global::System.Net.HttpStatusCode.OK)
{
+ var error = false;
try {
if( Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject json)
{
var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status");
if( state is null )
{
- // the body doesn't contain any information that has the state of the LRO
- // we're going to just get out, and let the consumer have the result
- break;
+ // the body doesn't contain any information that has the state of the LRO
+ // we're going to just get out, and let the consumer have the result
+ break;
}
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, $"Polled {_uri} provisioning state {state}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
switch( state?.ToString()?.ToLower() )
{
- case "succeeded":
case "failed":
+ error = true;
+ break;
+ case "succeeded":
case "canceled":
// we're done polling.
break;
@@ -6565,6 +6720,9 @@ public partial class MySql
// if we run into a problem peeking into the result,
// we really don't want to do anything special.
}
+ if (error) {
+ throw new Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.UndeclaredResponseException(_response);
+ }
}
// check for terminal status code
@@ -6662,8 +6820,8 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
+ global::System.Uri.EscapeDataString(resourceGroupName)
@@ -6671,15 +6829,16 @@ public partial class MySql
+ global::System.Uri.EscapeDataString(serverName)
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Delete, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FlexibleServersDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender);
}
@@ -6715,8 +6874,8 @@ public partial class MySql
var resourceGroupName = _match.Groups["resourceGroupName"].Value;
var serverName = _match.Groups["serverName"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/resourceGroups/"
+ resourceGroupName
@@ -6724,15 +6883,16 @@ public partial class MySql
+ serverName
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Delete, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FlexibleServersDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender);
}
@@ -6756,8 +6916,9 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// this operation supports x-ms-long-running-operation
var _originalUri = request.RequestUri.AbsoluteUri;
@@ -6765,7 +6926,7 @@ public partial class MySql
var _finalUri = _response.GetFirstHeader(@"Location");
var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
var location = _response.GetFirstHeader(@"Location");
- while (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
{
// get the delay before polling. (default to 30 seconds if not present)
@@ -6791,33 +6952,35 @@ public partial class MySql
// check for cancellation
if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, $"Polling {_uri}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// drop the old response
_response?.Dispose();
// make the polling call
_response = await sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// if we got back an OK, take a peek inside and see if it's done
if( _response.StatusCode == global::System.Net.HttpStatusCode.OK)
{
+ var error = false;
try {
if( Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject json)
{
var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status");
if( state is null )
{
- // the body doesn't contain any information that has the state of the LRO
- // we're going to just get out, and let the consumer have the result
- break;
+ // the body doesn't contain any information that has the state of the LRO
+ // we're going to just get out, and let the consumer have the result
+ break;
}
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, $"Polled {_uri} provisioning state {state}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
switch( state?.ToString()?.ToLower() )
{
- case "succeeded":
case "failed":
+ error = true;
+ break;
+ case "succeeded":
case "canceled":
// we're done polling.
break;
@@ -6832,6 +6995,9 @@ public partial class MySql
// if we run into a problem peeking into the result,
// we really don't want to do anything special.
}
+ if (error) {
+ throw new Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.UndeclaredResponseException(_response);
+ }
}
// check for terminal status code
@@ -6931,8 +7097,8 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
+ global::System.Uri.EscapeDataString(resourceGroupName)
@@ -6940,15 +7106,16 @@ public partial class MySql
+ global::System.Uri.EscapeDataString(serverName)
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FlexibleServersGet_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -6983,8 +7150,8 @@ public partial class MySql
var resourceGroupName = _match.Groups["resourceGroupName"].Value;
var serverName = _match.Groups["serverName"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/resourceGroups/"
+ resourceGroupName
@@ -6992,15 +7159,16 @@ public partial class MySql
+ serverName
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FlexibleServersGet_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -7023,8 +7191,9 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
@@ -7096,21 +7265,22 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/providers/Microsoft.DBForMySql/flexibleServers"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FlexibleServersList_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -7134,23 +7304,24 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
+ global::System.Uri.EscapeDataString(resourceGroupName)
+ "/providers/Microsoft.DBForMySql/flexibleServers"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FlexibleServersListByResourceGroup_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -7184,23 +7355,24 @@ public partial class MySql
var subscriptionId = _match.Groups["subscriptionId"].Value;
var resourceGroupName = _match.Groups["resourceGroupName"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/resourceGroups/"
+ resourceGroupName
+ "/providers/Microsoft.DBForMySql/flexibleServers"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FlexibleServersListByResourceGroup_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -7223,8 +7395,9 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
@@ -7304,21 +7477,22 @@ public partial class MySql
// replace URI parameters with values from identity
var subscriptionId = _match.Groups["subscriptionId"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/providers/Microsoft.DBForMySql/flexibleServers"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FlexibleServersList_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -7341,8 +7515,9 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
@@ -7409,8 +7584,8 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
+ global::System.Uri.EscapeDataString(resourceGroupName)
@@ -7419,15 +7594,16 @@ public partial class MySql
+ "/restart"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Post, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FlexibleServersRestart_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -7462,8 +7638,8 @@ public partial class MySql
var resourceGroupName = _match.Groups["resourceGroupName"].Value;
var serverName = _match.Groups["serverName"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/resourceGroups/"
+ resourceGroupName
@@ -7472,15 +7648,16 @@ public partial class MySql
+ "/restart"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Post, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FlexibleServersRestart_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -7503,8 +7680,9 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// this operation supports x-ms-long-running-operation
var _originalUri = request.RequestUri.AbsoluteUri;
@@ -7512,7 +7690,7 @@ public partial class MySql
var _finalUri = _response.GetFirstHeader(@"Location");
var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
var location = _response.GetFirstHeader(@"Location");
- while (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
{
// get the delay before polling. (default to 30 seconds if not present)
@@ -7538,33 +7716,35 @@ public partial class MySql
// check for cancellation
if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, $"Polling {_uri}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// drop the old response
_response?.Dispose();
// make the polling call
_response = await sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// if we got back an OK, take a peek inside and see if it's done
if( _response.StatusCode == global::System.Net.HttpStatusCode.OK)
{
+ var error = false;
try {
if( Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject json)
{
var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status");
if( state is null )
{
- // the body doesn't contain any information that has the state of the LRO
- // we're going to just get out, and let the consumer have the result
- break;
+ // the body doesn't contain any information that has the state of the LRO
+ // we're going to just get out, and let the consumer have the result
+ break;
}
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, $"Polled {_uri} provisioning state {state}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
switch( state?.ToString()?.ToLower() )
{
- case "succeeded":
case "failed":
+ error = true;
+ break;
+ case "succeeded":
case "canceled":
// we're done polling.
break;
@@ -7579,6 +7759,9 @@ public partial class MySql
// if we run into a problem peeking into the result,
// we really don't want to do anything special.
}
+ if (error) {
+ throw new Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.UndeclaredResponseException(_response);
+ }
}
// check for terminal status code
@@ -7672,8 +7855,8 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
+ global::System.Uri.EscapeDataString(resourceGroupName)
@@ -7682,15 +7865,16 @@ public partial class MySql
+ "/start"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Post, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FlexibleServersStart_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -7725,8 +7909,8 @@ public partial class MySql
var resourceGroupName = _match.Groups["resourceGroupName"].Value;
var serverName = _match.Groups["serverName"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/resourceGroups/"
+ resourceGroupName
@@ -7735,15 +7919,16 @@ public partial class MySql
+ "/start"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Post, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FlexibleServersStart_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -7766,8 +7951,9 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// this operation supports x-ms-long-running-operation
var _originalUri = request.RequestUri.AbsoluteUri;
@@ -7775,7 +7961,7 @@ public partial class MySql
var _finalUri = _response.GetFirstHeader(@"Location");
var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
var location = _response.GetFirstHeader(@"Location");
- while (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
{
// get the delay before polling. (default to 30 seconds if not present)
@@ -7801,33 +7987,35 @@ public partial class MySql
// check for cancellation
if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, $"Polling {_uri}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// drop the old response
_response?.Dispose();
// make the polling call
_response = await sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// if we got back an OK, take a peek inside and see if it's done
if( _response.StatusCode == global::System.Net.HttpStatusCode.OK)
{
+ var error = false;
try {
if( Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject json)
{
var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status");
if( state is null )
{
- // the body doesn't contain any information that has the state of the LRO
- // we're going to just get out, and let the consumer have the result
- break;
+ // the body doesn't contain any information that has the state of the LRO
+ // we're going to just get out, and let the consumer have the result
+ break;
}
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, $"Polled {_uri} provisioning state {state}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
switch( state?.ToString()?.ToLower() )
{
- case "succeeded":
case "failed":
+ error = true;
+ break;
+ case "succeeded":
case "canceled":
// we're done polling.
break;
@@ -7842,6 +8030,9 @@ public partial class MySql
// if we run into a problem peeking into the result,
// we really don't want to do anything special.
}
+ if (error) {
+ throw new Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.UndeclaredResponseException(_response);
+ }
}
// check for terminal status code
@@ -7935,8 +8126,8 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
+ global::System.Uri.EscapeDataString(resourceGroupName)
@@ -7945,15 +8136,16 @@ public partial class MySql
+ "/stop"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Post, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FlexibleServersStop_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -7988,8 +8180,8 @@ public partial class MySql
var resourceGroupName = _match.Groups["resourceGroupName"].Value;
var serverName = _match.Groups["serverName"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/resourceGroups/"
+ resourceGroupName
@@ -7998,15 +8190,16 @@ public partial class MySql
+ "/stop"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Post, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FlexibleServersStop_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -8029,8 +8222,9 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// this operation supports x-ms-long-running-operation
var _originalUri = request.RequestUri.AbsoluteUri;
@@ -8038,7 +8232,7 @@ public partial class MySql
var _finalUri = _response.GetFirstHeader(@"Location");
var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
var location = _response.GetFirstHeader(@"Location");
- while (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
{
// get the delay before polling. (default to 30 seconds if not present)
@@ -8064,33 +8258,35 @@ public partial class MySql
// check for cancellation
if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, $"Polling {_uri}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// drop the old response
_response?.Dispose();
// make the polling call
_response = await sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// if we got back an OK, take a peek inside and see if it's done
if( _response.StatusCode == global::System.Net.HttpStatusCode.OK)
{
+ var error = false;
try {
if( Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject json)
{
var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status");
if( state is null )
{
- // the body doesn't contain any information that has the state of the LRO
- // we're going to just get out, and let the consumer have the result
- break;
+ // the body doesn't contain any information that has the state of the LRO
+ // we're going to just get out, and let the consumer have the result
+ break;
}
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, $"Polled {_uri} provisioning state {state}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
switch( state?.ToString()?.ToLower() )
{
- case "succeeded":
case "failed":
+ error = true;
+ break;
+ case "succeeded":
case "canceled":
// we're done polling.
break;
@@ -8105,6 +8301,9 @@ public partial class MySql
// if we run into a problem peeking into the result,
// we really don't want to do anything special.
}
+ if (error) {
+ throw new Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.UndeclaredResponseException(_response);
+ }
}
// check for terminal status code
@@ -8201,8 +8400,8 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
+ global::System.Uri.EscapeDataString(resourceGroupName)
@@ -8210,19 +8409,20 @@ public partial class MySql
+ global::System.Uri.EscapeDataString(serverName)
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Patch, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// set body content
request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8);
request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FlexibleServersUpdate_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -8260,8 +8460,8 @@ public partial class MySql
var resourceGroupName = _match.Groups["resourceGroupName"].Value;
var serverName = _match.Groups["serverName"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/resourceGroups/"
+ resourceGroupName
@@ -8269,19 +8469,20 @@ public partial class MySql
+ serverName
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Patch, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// set body content
request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8);
request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.FlexibleServersUpdate_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -8304,15 +8505,16 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// this operation supports x-ms-long-running-operation
var _originalUri = request.RequestUri.AbsoluteUri;
// declared final-state-via: default
var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
var location = _response.GetFirstHeader(@"Location");
- while (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
{
// get the delay before polling. (default to 30 seconds if not present)
@@ -8338,33 +8540,35 @@ public partial class MySql
// check for cancellation
if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, $"Polling {_uri}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// drop the old response
_response?.Dispose();
// make the polling call
_response = await sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// if we got back an OK, take a peek inside and see if it's done
if( _response.StatusCode == global::System.Net.HttpStatusCode.OK)
{
+ var error = false;
try {
if( Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject json)
{
var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status");
if( state is null )
{
- // the body doesn't contain any information that has the state of the LRO
- // we're going to just get out, and let the consumer have the result
- break;
+ // the body doesn't contain any information that has the state of the LRO
+ // we're going to just get out, and let the consumer have the result
+ break;
}
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, $"Polled {_uri} provisioning state {state}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
switch( state?.ToString()?.ToLower() )
{
- case "succeeded":
case "failed":
+ error = true;
+ break;
+ case "succeeded":
case "canceled":
// we're done polling.
break;
@@ -8379,6 +8583,9 @@ public partial class MySql
// if we run into a problem peeking into the result,
// we really don't want to do anything special.
}
+ if (error) {
+ throw new Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.UndeclaredResponseException(_response);
+ }
}
// check for terminal status code
@@ -8472,23 +8679,24 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/providers/Microsoft.DBForMySQL/locations/"
+ global::System.Uri.EscapeDataString(locationName)
+ "/performanceTiers"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.LocationBasedPerformanceTierList_Call(request,onOk,eventListener,sender);
}
@@ -8520,23 +8728,24 @@ public partial class MySql
var subscriptionId = _match.Groups["subscriptionId"].Value;
var locationName = _match.Groups["locationName"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/providers/Microsoft.DBForMySQL/locations/"
+ locationName
+ "/performanceTiers"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.LocationBasedPerformanceTierList_Call(request,onOk,eventListener,sender);
}
@@ -8557,8 +8766,9 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
@@ -8623,8 +8833,8 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
+ global::System.Uri.EscapeDataString(resourceGroupName)
@@ -8633,15 +8843,16 @@ public partial class MySql
+ "/logFiles"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.LogFilesListByServer_Call(request,onOk,eventListener,sender);
}
@@ -8674,8 +8885,8 @@ public partial class MySql
var resourceGroupName = _match.Groups["resourceGroupName"].Value;
var serverName = _match.Groups["serverName"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/resourceGroups/"
+ resourceGroupName
@@ -8684,15 +8895,16 @@ public partial class MySql
+ "/logFiles"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.LogFilesListByServer_Call(request,onOk,eventListener,sender);
}
@@ -8713,8 +8925,9 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
@@ -8783,25 +8996,26 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/providers/Microsoft.DBForMySQL/checkNameAvailability"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Post, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// set body content
request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8);
request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.NameAvailabilityTest_Call(request,onOk,eventListener,sender);
}
@@ -8833,25 +9047,26 @@ public partial class MySql
// replace URI parameters with values from identity
var subscriptionId = _match.Groups["subscriptionId"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/providers/Microsoft.DBForMySQL/checkNameAvailability"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Post, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// set body content
request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8);
request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.NameAvailabilityTest_Call(request,onOk,eventListener,sender);
}
@@ -8872,8 +9087,9 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
@@ -8936,19 +9152,20 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/providers/Microsoft.DBForMySQL/operations"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/providers/Microsoft.DBForMySQL/operations"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.OperationsList_Call(request,onOk,eventListener,sender);
}
@@ -8970,19 +9187,20 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/providers/Microsoft.DBForMySql/operations"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/providers/Microsoft.DBForMySql/operations"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.OperationsList1_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -9014,19 +9232,20 @@ public partial class MySql
// replace URI parameters with values from identity
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/providers/Microsoft.DBForMySql/operations"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/providers/Microsoft.DBForMySql/operations"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.OperationsList1_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -9049,8 +9268,9 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
@@ -9120,19 +9340,20 @@ public partial class MySql
// replace URI parameters with values from identity
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/providers/Microsoft.DBForMySQL/operations"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/providers/Microsoft.DBForMySQL/operations"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.OperationsList_Call(request,onOk,eventListener,sender);
}
@@ -9153,8 +9374,9 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
@@ -9215,8 +9437,8 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
+ global::System.Uri.EscapeDataString(resourceGroupName)
@@ -9225,15 +9447,16 @@ public partial class MySql
+ "/replicas"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.ReplicasListByServer_Call(request,onOk,eventListener,sender);
}
@@ -9266,8 +9489,8 @@ public partial class MySql
var resourceGroupName = _match.Groups["resourceGroupName"].Value;
var serverName = _match.Groups["serverName"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/resourceGroups/"
+ resourceGroupName
@@ -9276,15 +9499,16 @@ public partial class MySql
+ "/replicas"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.ReplicasListByServer_Call(request,onOk,eventListener,sender);
}
@@ -9305,8 +9529,9 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
@@ -9382,8 +9607,8 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
+ global::System.Uri.EscapeDataString(resourceGroupName)
@@ -9392,19 +9617,20 @@ public partial class MySql
+ "/Administrators/activeDirectory"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Put, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// set body content
request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8);
request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.ServerAdministratorsCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -9443,8 +9669,8 @@ public partial class MySql
var resourceGroupName = _match.Groups["resourceGroupName"].Value;
var serverName = _match.Groups["serverName"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/resourceGroups/"
+ resourceGroupName
@@ -9453,19 +9679,20 @@ public partial class MySql
+ "/Administrators/activeDirectory"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Put, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// set body content
request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8);
request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.ServerAdministratorsCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -9488,15 +9715,16 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// this operation supports x-ms-long-running-operation
var _originalUri = request.RequestUri.AbsoluteUri;
// declared final-state-via: default
var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
var location = _response.GetFirstHeader(@"Location");
- while (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
{
// get the delay before polling. (default to 30 seconds if not present)
@@ -9522,33 +9750,35 @@ public partial class MySql
// check for cancellation
if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, $"Polling {_uri}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// drop the old response
_response?.Dispose();
// make the polling call
_response = await sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// if we got back an OK, take a peek inside and see if it's done
if( _response.StatusCode == global::System.Net.HttpStatusCode.OK)
{
+ var error = false;
try {
if( Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject json)
{
var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status");
if( state is null )
{
- // the body doesn't contain any information that has the state of the LRO
- // we're going to just get out, and let the consumer have the result
- break;
+ // the body doesn't contain any information that has the state of the LRO
+ // we're going to just get out, and let the consumer have the result
+ break;
}
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, $"Polled {_uri} provisioning state {state}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
switch( state?.ToString()?.ToLower() )
{
- case "succeeded":
case "failed":
+ error = true;
+ break;
+ case "succeeded":
case "canceled":
// we're done polling.
break;
@@ -9563,6 +9793,9 @@ public partial class MySql
// if we run into a problem peeking into the result,
// we really don't want to do anything special.
}
+ if (error) {
+ throw new Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.UndeclaredResponseException(_response);
+ }
}
// check for terminal status code
@@ -9660,8 +9893,8 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
+ global::System.Uri.EscapeDataString(resourceGroupName)
@@ -9670,15 +9903,16 @@ public partial class MySql
+ "/Administrators/activeDirectory"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Delete, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.ServerAdministratorsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender);
}
@@ -9714,8 +9948,8 @@ public partial class MySql
var resourceGroupName = _match.Groups["resourceGroupName"].Value;
var serverName = _match.Groups["serverName"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/resourceGroups/"
+ resourceGroupName
@@ -9724,15 +9958,16 @@ public partial class MySql
+ "/Administrators/activeDirectory"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Delete, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.ServerAdministratorsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender);
}
@@ -9756,8 +9991,9 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// this operation supports x-ms-long-running-operation
var _originalUri = request.RequestUri.AbsoluteUri;
@@ -9765,7 +10001,7 @@ public partial class MySql
var _finalUri = _response.GetFirstHeader(@"Location");
var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
var location = _response.GetFirstHeader(@"Location");
- while (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
{
// get the delay before polling. (default to 30 seconds if not present)
@@ -9791,33 +10027,35 @@ public partial class MySql
// check for cancellation
if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, $"Polling {_uri}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// drop the old response
_response?.Dispose();
// make the polling call
_response = await sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// if we got back an OK, take a peek inside and see if it's done
if( _response.StatusCode == global::System.Net.HttpStatusCode.OK)
{
+ var error = false;
try {
if( Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject json)
{
var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status");
if( state is null )
{
- // the body doesn't contain any information that has the state of the LRO
- // we're going to just get out, and let the consumer have the result
- break;
+ // the body doesn't contain any information that has the state of the LRO
+ // we're going to just get out, and let the consumer have the result
+ break;
}
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, $"Polled {_uri} provisioning state {state}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
switch( state?.ToString()?.ToLower() )
{
- case "succeeded":
case "failed":
+ error = true;
+ break;
+ case "succeeded":
case "canceled":
// we're done polling.
break;
@@ -9832,6 +10070,9 @@ public partial class MySql
// if we run into a problem peeking into the result,
// we really don't want to do anything special.
}
+ if (error) {
+ throw new Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.UndeclaredResponseException(_response);
+ }
}
// check for terminal status code
@@ -9931,8 +10172,8 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
+ global::System.Uri.EscapeDataString(resourceGroupName)
@@ -9941,15 +10182,16 @@ public partial class MySql
+ "/Administrators/activeDirectory"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.ServerAdministratorsGet_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -9984,8 +10226,8 @@ public partial class MySql
var resourceGroupName = _match.Groups["resourceGroupName"].Value;
var serverName = _match.Groups["serverName"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/resourceGroups/"
+ resourceGroupName
@@ -9994,15 +10236,16 @@ public partial class MySql
+ "/Administrators/activeDirectory"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.ServerAdministratorsGet_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -10025,8 +10268,9 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
@@ -10100,8 +10344,8 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
+ global::System.Uri.EscapeDataString(resourceGroupName)
@@ -10110,15 +10354,16 @@ public partial class MySql
+ "/administrators"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.ServerAdministratorsList_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -10153,8 +10398,8 @@ public partial class MySql
var resourceGroupName = _match.Groups["resourceGroupName"].Value;
var serverName = _match.Groups["serverName"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/resourceGroups/"
+ resourceGroupName
@@ -10163,15 +10408,16 @@ public partial class MySql
+ "/administrators"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.ServerAdministratorsList_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -10194,8 +10440,9 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
@@ -10271,8 +10518,8 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
+ global::System.Uri.EscapeDataString(resourceGroupName)
@@ -10282,19 +10529,20 @@ public partial class MySql
+ global::System.Uri.EscapeDataString(securityAlertPolicyName)
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Put, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// set body content
request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8);
request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.ServerSecurityAlertPoliciesCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -10331,8 +10579,8 @@ public partial class MySql
var securityAlertPolicyName = _match.Groups["securityAlertPolicyName"].Value;
var subscriptionId = _match.Groups["subscriptionId"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/resourceGroups/"
+ resourceGroupName
@@ -10342,19 +10590,20 @@ public partial class MySql
+ securityAlertPolicyName
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Put, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// set body content
request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8);
request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.ServerSecurityAlertPoliciesCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -10379,15 +10628,16 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// this operation supports x-ms-long-running-operation
var _originalUri = request.RequestUri.AbsoluteUri;
// declared final-state-via: default
var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
var location = _response.GetFirstHeader(@"Location");
- while (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
{
// get the delay before polling. (default to 30 seconds if not present)
@@ -10413,33 +10663,35 @@ public partial class MySql
// check for cancellation
if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, $"Polling {_uri}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// drop the old response
_response?.Dispose();
// make the polling call
_response = await sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// if we got back an OK, take a peek inside and see if it's done
if( _response.StatusCode == global::System.Net.HttpStatusCode.OK)
{
+ var error = false;
try {
if( Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject json)
{
var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status");
if( state is null )
{
- // the body doesn't contain any information that has the state of the LRO
- // we're going to just get out, and let the consumer have the result
- break;
+ // the body doesn't contain any information that has the state of the LRO
+ // we're going to just get out, and let the consumer have the result
+ break;
}
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, $"Polled {_uri} provisioning state {state}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
switch( state?.ToString()?.ToLower() )
{
- case "succeeded":
case "failed":
+ error = true;
+ break;
+ case "succeeded":
case "canceled":
// we're done polling.
break;
@@ -10454,6 +10706,9 @@ public partial class MySql
// if we run into a problem peeking into the result,
// we really don't want to do anything special.
}
+ if (error) {
+ throw new Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.UndeclaredResponseException(_response);
+ }
}
// check for terminal status code
@@ -10551,8 +10806,8 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
+ global::System.Uri.EscapeDataString(resourceGroupName)
@@ -10562,15 +10817,16 @@ public partial class MySql
+ global::System.Uri.EscapeDataString(securityAlertPolicyName)
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.ServerSecurityAlertPoliciesGet_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -10606,8 +10862,8 @@ public partial class MySql
var securityAlertPolicyName = _match.Groups["securityAlertPolicyName"].Value;
var subscriptionId = _match.Groups["subscriptionId"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/resourceGroups/"
+ resourceGroupName
@@ -10617,15 +10873,16 @@ public partial class MySql
+ securityAlertPolicyName
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.ServerSecurityAlertPoliciesGet_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -10648,8 +10905,9 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
@@ -10724,8 +10982,8 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
+ global::System.Uri.EscapeDataString(resourceGroupName)
@@ -10733,19 +10991,20 @@ public partial class MySql
+ global::System.Uri.EscapeDataString(serverName)
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Put, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// set body content
request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8);
request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.ServersCreate_Call(request,onOk,eventListener,sender);
}
@@ -10781,8 +11040,8 @@ public partial class MySql
var resourceGroupName = _match.Groups["resourceGroupName"].Value;
var serverName = _match.Groups["serverName"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/resourceGroups/"
+ resourceGroupName
@@ -10790,19 +11049,20 @@ public partial class MySql
+ serverName
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Put, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// set body content
request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8);
request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.ServersCreate_Call(request,onOk,eventListener,sender);
}
@@ -10823,15 +11083,16 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// this operation supports x-ms-long-running-operation
var _originalUri = request.RequestUri.AbsoluteUri;
// declared final-state-via: default
var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
var location = _response.GetFirstHeader(@"Location");
- while (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
{
// get the delay before polling. (default to 30 seconds if not present)
@@ -10857,33 +11118,35 @@ public partial class MySql
// check for cancellation
if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, $"Polling {_uri}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// drop the old response
_response?.Dispose();
// make the polling call
_response = await sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// if we got back an OK, take a peek inside and see if it's done
if( _response.StatusCode == global::System.Net.HttpStatusCode.OK)
{
+ var error = false;
try {
if( Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject json)
{
var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status");
if( state is null )
{
- // the body doesn't contain any information that has the state of the LRO
- // we're going to just get out, and let the consumer have the result
- break;
+ // the body doesn't contain any information that has the state of the LRO
+ // we're going to just get out, and let the consumer have the result
+ break;
}
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, $"Polled {_uri} provisioning state {state}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
switch( state?.ToString()?.ToLower() )
{
- case "succeeded":
case "failed":
+ error = true;
+ break;
+ case "succeeded":
case "canceled":
// we're done polling.
break;
@@ -10898,6 +11161,9 @@ public partial class MySql
// if we run into a problem peeking into the result,
// we really don't want to do anything special.
}
+ if (error) {
+ throw new Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.UndeclaredResponseException(_response);
+ }
}
// check for terminal status code
@@ -10991,8 +11257,8 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
+ global::System.Uri.EscapeDataString(resourceGroupName)
@@ -11000,15 +11266,16 @@ public partial class MySql
+ global::System.Uri.EscapeDataString(serverName)
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Delete, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.ServersDelete_Call(request,onOk,onNoContent,eventListener,sender);
}
@@ -11042,8 +11309,8 @@ public partial class MySql
var resourceGroupName = _match.Groups["resourceGroupName"].Value;
var serverName = _match.Groups["serverName"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/resourceGroups/"
+ resourceGroupName
@@ -11051,15 +11318,16 @@ public partial class MySql
+ serverName
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Delete, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.ServersDelete_Call(request,onOk,onNoContent,eventListener,sender);
}
@@ -11081,8 +11349,9 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// this operation supports x-ms-long-running-operation
var _originalUri = request.RequestUri.AbsoluteUri;
@@ -11090,7 +11359,7 @@ public partial class MySql
var _finalUri = _response.GetFirstHeader(@"Location");
var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
var location = _response.GetFirstHeader(@"Location");
- while (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
{
// get the delay before polling. (default to 30 seconds if not present)
@@ -11116,33 +11385,35 @@ public partial class MySql
// check for cancellation
if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, $"Polling {_uri}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// drop the old response
_response?.Dispose();
// make the polling call
_response = await sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// if we got back an OK, take a peek inside and see if it's done
if( _response.StatusCode == global::System.Net.HttpStatusCode.OK)
{
+ var error = false;
try {
if( Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject json)
{
var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status");
if( state is null )
{
- // the body doesn't contain any information that has the state of the LRO
- // we're going to just get out, and let the consumer have the result
- break;
+ // the body doesn't contain any information that has the state of the LRO
+ // we're going to just get out, and let the consumer have the result
+ break;
}
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, $"Polled {_uri} provisioning state {state}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
switch( state?.ToString()?.ToLower() )
{
- case "succeeded":
case "failed":
+ error = true;
+ break;
+ case "succeeded":
case "canceled":
// we're done polling.
break;
@@ -11157,6 +11428,9 @@ public partial class MySql
// if we run into a problem peeking into the result,
// we really don't want to do anything special.
}
+ if (error) {
+ throw new Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.UndeclaredResponseException(_response);
+ }
}
// check for terminal status code
@@ -11252,8 +11526,8 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
+ global::System.Uri.EscapeDataString(resourceGroupName)
@@ -11261,15 +11535,16 @@ public partial class MySql
+ global::System.Uri.EscapeDataString(serverName)
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.ServersGet_Call(request,onOk,eventListener,sender);
}
@@ -11302,8 +11577,8 @@ public partial class MySql
var resourceGroupName = _match.Groups["resourceGroupName"].Value;
var serverName = _match.Groups["serverName"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/resourceGroups/"
+ resourceGroupName
@@ -11311,15 +11586,16 @@ public partial class MySql
+ serverName
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.ServersGet_Call(request,onOk,eventListener,sender);
}
@@ -11340,8 +11616,9 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
@@ -11409,21 +11686,22 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/providers/Microsoft.DBForMySQL/servers"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.ServersList_Call(request,onOk,eventListener,sender);
}
@@ -11445,23 +11723,24 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
+ global::System.Uri.EscapeDataString(resourceGroupName)
+ "/providers/Microsoft.DBForMySQL/servers"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.ServersListByResourceGroup_Call(request,onOk,eventListener,sender);
}
@@ -11493,23 +11772,24 @@ public partial class MySql
var subscriptionId = _match.Groups["subscriptionId"].Value;
var resourceGroupName = _match.Groups["resourceGroupName"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/resourceGroups/"
+ resourceGroupName
+ "/providers/Microsoft.DBForMySQL/servers"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.ServersListByResourceGroup_Call(request,onOk,eventListener,sender);
}
@@ -11530,8 +11810,9 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
@@ -11607,21 +11888,22 @@ public partial class MySql
// replace URI parameters with values from identity
var subscriptionId = _match.Groups["subscriptionId"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/providers/Microsoft.DBForMySQL/servers"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.ServersList_Call(request,onOk,eventListener,sender);
}
@@ -11642,8 +11924,9 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
@@ -11708,8 +11991,8 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
+ global::System.Uri.EscapeDataString(resourceGroupName)
@@ -11718,15 +12001,16 @@ public partial class MySql
+ "/restart"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Post, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.ServersRestart_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -11761,8 +12045,8 @@ public partial class MySql
var resourceGroupName = _match.Groups["resourceGroupName"].Value;
var serverName = _match.Groups["serverName"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/resourceGroups/"
+ resourceGroupName
@@ -11771,15 +12055,16 @@ public partial class MySql
+ "/restart"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Post, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.ServersRestart_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -11802,8 +12087,9 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// this operation supports x-ms-long-running-operation
var _originalUri = request.RequestUri.AbsoluteUri;
@@ -11811,7 +12097,7 @@ public partial class MySql
var _finalUri = _response.GetFirstHeader(@"Location");
var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
var location = _response.GetFirstHeader(@"Location");
- while (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
{
// get the delay before polling. (default to 30 seconds if not present)
@@ -11837,33 +12123,35 @@ public partial class MySql
// check for cancellation
if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, $"Polling {_uri}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// drop the old response
_response?.Dispose();
// make the polling call
_response = await sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// if we got back an OK, take a peek inside and see if it's done
if( _response.StatusCode == global::System.Net.HttpStatusCode.OK)
{
+ var error = false;
try {
if( Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject json)
{
var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status");
if( state is null )
{
- // the body doesn't contain any information that has the state of the LRO
- // we're going to just get out, and let the consumer have the result
- break;
+ // the body doesn't contain any information that has the state of the LRO
+ // we're going to just get out, and let the consumer have the result
+ break;
}
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, $"Polled {_uri} provisioning state {state}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
switch( state?.ToString()?.ToLower() )
{
- case "succeeded":
case "failed":
+ error = true;
+ break;
+ case "succeeded":
case "canceled":
// we're done polling.
break;
@@ -11878,6 +12166,9 @@ public partial class MySql
// if we run into a problem peeking into the result,
// we really don't want to do anything special.
}
+ if (error) {
+ throw new Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.UndeclaredResponseException(_response);
+ }
}
// check for terminal status code
@@ -11972,8 +12263,8 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
+ global::System.Uri.EscapeDataString(resourceGroupName)
@@ -11981,19 +12272,20 @@ public partial class MySql
+ global::System.Uri.EscapeDataString(serverName)
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Patch, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// set body content
request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8);
request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.ServersUpdate_Call(request,onOk,eventListener,sender);
}
@@ -12029,8 +12321,8 @@ public partial class MySql
var resourceGroupName = _match.Groups["resourceGroupName"].Value;
var serverName = _match.Groups["serverName"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/resourceGroups/"
+ resourceGroupName
@@ -12038,19 +12330,20 @@ public partial class MySql
+ serverName
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Patch, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// set body content
request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8);
request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.ServersUpdate_Call(request,onOk,eventListener,sender);
}
@@ -12071,15 +12364,16 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// this operation supports x-ms-long-running-operation
var _originalUri = request.RequestUri.AbsoluteUri;
// declared final-state-via: default
var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
var location = _response.GetFirstHeader(@"Location");
- while (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
{
// get the delay before polling. (default to 30 seconds if not present)
@@ -12105,33 +12399,35 @@ public partial class MySql
// check for cancellation
if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, $"Polling {_uri}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// drop the old response
_response?.Dispose();
// make the polling call
_response = await sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// if we got back an OK, take a peek inside and see if it's done
if( _response.StatusCode == global::System.Net.HttpStatusCode.OK)
{
+ var error = false;
try {
if( Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject json)
{
var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status");
if( state is null )
{
- // the body doesn't contain any information that has the state of the LRO
- // we're going to just get out, and let the consumer have the result
- break;
+ // the body doesn't contain any information that has the state of the LRO
+ // we're going to just get out, and let the consumer have the result
+ break;
}
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, $"Polled {_uri} provisioning state {state}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
switch( state?.ToString()?.ToLower() )
{
- case "succeeded":
case "failed":
+ error = true;
+ break;
+ case "succeeded":
case "canceled":
// we're done polling.
break;
@@ -12146,6 +12442,9 @@ public partial class MySql
// if we run into a problem peeking into the result,
// we really don't want to do anything special.
}
+ if (error) {
+ throw new Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.UndeclaredResponseException(_response);
+ }
}
// check for terminal status code
@@ -12242,8 +12541,8 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
+ global::System.Uri.EscapeDataString(resourceGroupName)
@@ -12253,19 +12552,20 @@ public partial class MySql
+ global::System.Uri.EscapeDataString(virtualNetworkRuleName)
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Put, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// set body content
request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8);
request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.VirtualNetworkRulesCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -12302,8 +12602,8 @@ public partial class MySql
var subscriptionId = _match.Groups["subscriptionId"].Value;
var virtualNetworkRuleName = _match.Groups["virtualNetworkRuleName"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/resourceGroups/"
+ resourceGroupName
@@ -12313,19 +12613,20 @@ public partial class MySql
+ virtualNetworkRuleName
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Put, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// set body content
request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8);
request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.VirtualNetworkRulesCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -12348,15 +12649,16 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// this operation supports x-ms-long-running-operation
var _originalUri = request.RequestUri.AbsoluteUri;
// declared final-state-via: default
var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
var location = _response.GetFirstHeader(@"Location");
- while (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
{
// get the delay before polling. (default to 30 seconds if not present)
@@ -12382,33 +12684,35 @@ public partial class MySql
// check for cancellation
if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, $"Polling {_uri}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// drop the old response
_response?.Dispose();
// make the polling call
_response = await sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// if we got back an OK, take a peek inside and see if it's done
if( _response.StatusCode == global::System.Net.HttpStatusCode.OK)
{
+ var error = false;
try {
if( Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject json)
{
var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status");
if( state is null )
{
- // the body doesn't contain any information that has the state of the LRO
- // we're going to just get out, and let the consumer have the result
- break;
+ // the body doesn't contain any information that has the state of the LRO
+ // we're going to just get out, and let the consumer have the result
+ break;
}
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, $"Polled {_uri} provisioning state {state}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
switch( state?.ToString()?.ToLower() )
{
- case "succeeded":
case "failed":
+ error = true;
+ break;
+ case "succeeded":
case "canceled":
// we're done polling.
break;
@@ -12423,6 +12727,9 @@ public partial class MySql
// if we run into a problem peeking into the result,
// we really don't want to do anything special.
}
+ if (error) {
+ throw new Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.UndeclaredResponseException(_response);
+ }
}
// check for terminal status code
@@ -12523,8 +12830,8 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
+ global::System.Uri.EscapeDataString(resourceGroupName)
@@ -12534,15 +12841,16 @@ public partial class MySql
+ global::System.Uri.EscapeDataString(virtualNetworkRuleName)
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Delete, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.VirtualNetworkRulesDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender);
}
@@ -12579,8 +12887,8 @@ public partial class MySql
var virtualNetworkRuleName = _match.Groups["virtualNetworkRuleName"].Value;
var subscriptionId = _match.Groups["subscriptionId"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/resourceGroups/"
+ resourceGroupName
@@ -12590,15 +12898,16 @@ public partial class MySql
+ virtualNetworkRuleName
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Delete, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.VirtualNetworkRulesDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender);
}
@@ -12622,8 +12931,9 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// this operation supports x-ms-long-running-operation
var _originalUri = request.RequestUri.AbsoluteUri;
@@ -12631,7 +12941,7 @@ public partial class MySql
var _finalUri = _response.GetFirstHeader(@"Location");
var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
var location = _response.GetFirstHeader(@"Location");
- while (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
{
// get the delay before polling. (default to 30 seconds if not present)
@@ -12657,33 +12967,35 @@ public partial class MySql
// check for cancellation
if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, $"Polling {_uri}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// drop the old response
_response?.Dispose();
// make the polling call
_response = await sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// if we got back an OK, take a peek inside and see if it's done
if( _response.StatusCode == global::System.Net.HttpStatusCode.OK)
{
+ var error = false;
try {
if( Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject json)
{
var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status");
if( state is null )
{
- // the body doesn't contain any information that has the state of the LRO
- // we're going to just get out, and let the consumer have the result
- break;
+ // the body doesn't contain any information that has the state of the LRO
+ // we're going to just get out, and let the consumer have the result
+ break;
}
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.Polling, $"Polled {_uri} provisioning state {state}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
switch( state?.ToString()?.ToLower() )
{
- case "succeeded":
case "failed":
+ error = true;
+ break;
+ case "succeeded":
case "canceled":
// we're done polling.
break;
@@ -12698,6 +13010,9 @@ public partial class MySql
// if we run into a problem peeking into the result,
// we really don't want to do anything special.
}
+ if (error) {
+ throw new Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.UndeclaredResponseException(_response);
+ }
}
// check for terminal status code
@@ -12800,8 +13115,8 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
+ global::System.Uri.EscapeDataString(resourceGroupName)
@@ -12811,15 +13126,16 @@ public partial class MySql
+ global::System.Uri.EscapeDataString(virtualNetworkRuleName)
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.VirtualNetworkRulesGet_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -12855,8 +13171,8 @@ public partial class MySql
var subscriptionId = _match.Groups["subscriptionId"].Value;
var virtualNetworkRuleName = _match.Groups["virtualNetworkRuleName"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/resourceGroups/"
+ resourceGroupName
@@ -12866,15 +13182,16 @@ public partial class MySql
+ virtualNetworkRuleName
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.VirtualNetworkRulesGet_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -12897,8 +13214,9 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
@@ -12974,8 +13292,8 @@ public partial class MySql
using( NoSynchronizationContext )
{
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
+ global::System.Uri.EscapeDataString(resourceGroupName)
@@ -12984,15 +13302,16 @@ public partial class MySql
+ "/virtualNetworkRules"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.VirtualNetworkRulesListByServer_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -13027,8 +13346,8 @@ public partial class MySql
var serverName = _match.Groups["serverName"].Value;
var subscriptionId = _match.Groups["subscriptionId"].Value;
// construct URL
- var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
- "https://management.azure.com/subscriptions/"
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ subscriptionId
+ "/resourceGroups/"
+ resourceGroupName
@@ -13037,15 +13356,16 @@ public partial class MySql
+ "/virtualNetworkRules"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
await this.VirtualNetworkRulesListByServer_Call(request,onOk,onDefault,eventListener,sender);
}
@@ -13068,8 +13388,9 @@ public partial class MySql
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sender.SendAsync(request, eventListener);
+ _response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
diff --git a/src/MySql/generated/api/Support/CreateMode.cs b/src/MySql/generated/api/Support/CreateMode.cs
index 6f4f46fbef6b..282f67334fe0 100644
--- a/src/MySql/generated/api/Support/CreateMode.cs
+++ b/src/MySql/generated/api/Support/CreateMode.cs
@@ -25,7 +25,7 @@ public partial struct CreateMode :
/// the value to convert to an instance of .
internal static object CreateFrom(object value)
{
- return new CreateMode(System.Convert.ToString(value));
+ return new CreateMode(global::System.Convert.ToString(value));
}
/// Creates an instance of the
diff --git a/src/MySql/generated/api/Support/GeoRedundantBackup.cs b/src/MySql/generated/api/Support/GeoRedundantBackup.cs
index 17cd4db957d7..81310dfb680a 100644
--- a/src/MySql/generated/api/Support/GeoRedundantBackup.cs
+++ b/src/MySql/generated/api/Support/GeoRedundantBackup.cs
@@ -21,7 +21,7 @@ public partial struct GeoRedundantBackup :
/// the value to convert to an instance of .
internal static object CreateFrom(object value)
{
- return new GeoRedundantBackup(System.Convert.ToString(value));
+ return new GeoRedundantBackup(global::System.Convert.ToString(value));
}
/// Compares values of enum type GeoRedundantBackup
diff --git a/src/MySql/generated/api/Support/HaEnabledEnum.cs b/src/MySql/generated/api/Support/HaEnabledEnum.cs
index f070c288720c..4bb0690b555f 100644
--- a/src/MySql/generated/api/Support/HaEnabledEnum.cs
+++ b/src/MySql/generated/api/Support/HaEnabledEnum.cs
@@ -23,7 +23,7 @@ public partial struct HaEnabledEnum :
/// the value to convert to an instance of .
internal static object CreateFrom(object value)
{
- return new HaEnabledEnum(System.Convert.ToString(value));
+ return new HaEnabledEnum(global::System.Convert.ToString(value));
}
/// Compares values of enum type HaEnabledEnum
diff --git a/src/MySql/generated/api/Support/IdentityType.cs b/src/MySql/generated/api/Support/IdentityType.cs
index 0ea3bcd97987..bedd9a084ce2 100644
--- a/src/MySql/generated/api/Support/IdentityType.cs
+++ b/src/MySql/generated/api/Support/IdentityType.cs
@@ -22,7 +22,7 @@ public partial struct IdentityType :
/// the value to convert to an instance of .
internal static object CreateFrom(object value)
{
- return new IdentityType(System.Convert.ToString(value));
+ return new IdentityType(global::System.Convert.ToString(value));
}
/// Compares values of enum type IdentityType
diff --git a/src/MySql/generated/api/Support/InfrastructureEncryption.cs b/src/MySql/generated/api/Support/InfrastructureEncryption.cs
index e57fd103dea0..fe75ecfaee80 100644
--- a/src/MySql/generated/api/Support/InfrastructureEncryption.cs
+++ b/src/MySql/generated/api/Support/InfrastructureEncryption.cs
@@ -26,7 +26,7 @@ public partial struct InfrastructureEncryption :
/// the value to convert to an instance of .
internal static object CreateFrom(object value)
{
- return new InfrastructureEncryption(System.Convert.ToString(value));
+ return new InfrastructureEncryption(global::System.Convert.ToString(value));
}
/// Compares values of enum type InfrastructureEncryption
diff --git a/src/MySql/generated/api/Support/InfrastructureEncryptionEnum.cs b/src/MySql/generated/api/Support/InfrastructureEncryptionEnum.cs
index 00f260498889..08d6f658de8b 100644
--- a/src/MySql/generated/api/Support/InfrastructureEncryptionEnum.cs
+++ b/src/MySql/generated/api/Support/InfrastructureEncryptionEnum.cs
@@ -26,7 +26,7 @@ public partial struct InfrastructureEncryptionEnum :
/// the value to convert to an instance of .
internal static object CreateFrom(object value)
{
- return new InfrastructureEncryptionEnum(System.Convert.ToString(value));
+ return new InfrastructureEncryptionEnum(global::System.Convert.ToString(value));
}
/// Compares values of enum type InfrastructureEncryptionEnum
diff --git a/src/MySql/generated/api/Support/IsConfigPendingRestart.cs b/src/MySql/generated/api/Support/IsConfigPendingRestart.cs
index dfd3c081f048..14604914eb39 100644
--- a/src/MySql/generated/api/Support/IsConfigPendingRestart.cs
+++ b/src/MySql/generated/api/Support/IsConfigPendingRestart.cs
@@ -21,7 +21,7 @@ public partial struct IsConfigPendingRestart :
/// the value to convert to an instance of .
internal static object CreateFrom(object value)
{
- return new IsConfigPendingRestart(System.Convert.ToString(value));
+ return new IsConfigPendingRestart(global::System.Convert.ToString(value));
}
/// Compares values of enum type IsConfigPendingRestart
diff --git a/src/MySql/generated/api/Support/IsDynamicConfig.cs b/src/MySql/generated/api/Support/IsDynamicConfig.cs
index ae5357891782..a874bf04368b 100644
--- a/src/MySql/generated/api/Support/IsDynamicConfig.cs
+++ b/src/MySql/generated/api/Support/IsDynamicConfig.cs
@@ -21,7 +21,7 @@ public partial struct IsDynamicConfig :
/// the value to convert to an instance of .
internal static object CreateFrom(object value)
{
- return new IsDynamicConfig(System.Convert.ToString(value));
+ return new IsDynamicConfig(global::System.Convert.ToString(value));
}
/// Compares values of enum type IsDynamicConfig
diff --git a/src/MySql/generated/api/Support/IsReadOnly.cs b/src/MySql/generated/api/Support/IsReadOnly.cs
index 8df4d73400c5..eb44bcd03e8d 100644
--- a/src/MySql/generated/api/Support/IsReadOnly.cs
+++ b/src/MySql/generated/api/Support/IsReadOnly.cs
@@ -21,7 +21,7 @@ public partial struct IsReadOnly :
/// the value to convert to an instance of .
internal static object CreateFrom(object value)
{
- return new IsReadOnly(System.Convert.ToString(value));
+ return new IsReadOnly(global::System.Convert.ToString(value));
}
/// Compares values of enum type IsReadOnly
diff --git a/src/MySql/generated/api/Support/MinimalTlsVersionEnum.cs b/src/MySql/generated/api/Support/MinimalTlsVersionEnum.cs
index e7290a8797b6..d47a039f57e4 100644
--- a/src/MySql/generated/api/Support/MinimalTlsVersionEnum.cs
+++ b/src/MySql/generated/api/Support/MinimalTlsVersionEnum.cs
@@ -25,7 +25,7 @@ public partial struct MinimalTlsVersionEnum :
/// the value to convert to an instance of .
internal static object CreateFrom(object value)
{
- return new MinimalTlsVersionEnum(System.Convert.ToString(value));
+ return new MinimalTlsVersionEnum(global::System.Convert.ToString(value));
}
/// Compares values of enum type MinimalTlsVersionEnum
diff --git a/src/MySql/generated/api/Support/OperationOrigin.cs b/src/MySql/generated/api/Support/OperationOrigin.cs
index 18342df618a3..8affca3232f7 100644
--- a/src/MySql/generated/api/Support/OperationOrigin.cs
+++ b/src/MySql/generated/api/Support/OperationOrigin.cs
@@ -23,7 +23,7 @@ public partial struct OperationOrigin :
/// the value to convert to an instance of .
internal static object CreateFrom(object value)
{
- return new OperationOrigin(System.Convert.ToString(value));
+ return new OperationOrigin(global::System.Convert.ToString(value));
}
/// Compares values of enum type OperationOrigin
diff --git a/src/MySql/generated/api/Support/PrivateEndpointProvisioningState.cs b/src/MySql/generated/api/Support/PrivateEndpointProvisioningState.cs
index f7fda299b8f6..148871408a6d 100644
--- a/src/MySql/generated/api/Support/PrivateEndpointProvisioningState.cs
+++ b/src/MySql/generated/api/Support/PrivateEndpointProvisioningState.cs
@@ -29,7 +29,7 @@ public partial struct PrivateEndpointProvisioningState :
/// the value to convert to an instance of .
internal static object CreateFrom(object value)
{
- return new PrivateEndpointProvisioningState(System.Convert.ToString(value));
+ return new PrivateEndpointProvisioningState(global::System.Convert.ToString(value));
}
/// Compares values of enum type PrivateEndpointProvisioningState
diff --git a/src/MySql/generated/api/Support/PrivateLinkServiceConnectionStateActionsRequire.cs b/src/MySql/generated/api/Support/PrivateLinkServiceConnectionStateActionsRequire.cs
index ed86fd8c48b3..0a591f213c6b 100644
--- a/src/MySql/generated/api/Support/PrivateLinkServiceConnectionStateActionsRequire.cs
+++ b/src/MySql/generated/api/Support/PrivateLinkServiceConnectionStateActionsRequire.cs
@@ -24,7 +24,7 @@ public partial struct PrivateLinkServiceConnectionStateActionsRequire :
/// />.
internal static object CreateFrom(object value)
{
- return new PrivateLinkServiceConnectionStateActionsRequire(System.Convert.ToString(value));
+ return new PrivateLinkServiceConnectionStateActionsRequire(global::System.Convert.ToString(value));
}
/// Compares values of enum type PrivateLinkServiceConnectionStateActionsRequire
diff --git a/src/MySql/generated/api/Support/PrivateLinkServiceConnectionStateStatus.cs b/src/MySql/generated/api/Support/PrivateLinkServiceConnectionStateStatus.cs
index 3d73827b52c0..b5737254cb40 100644
--- a/src/MySql/generated/api/Support/PrivateLinkServiceConnectionStateStatus.cs
+++ b/src/MySql/generated/api/Support/PrivateLinkServiceConnectionStateStatus.cs
@@ -27,7 +27,7 @@ public partial struct PrivateLinkServiceConnectionStateStatus :
/// the value to convert to an instance of .
internal static object CreateFrom(object value)
{
- return new PrivateLinkServiceConnectionStateStatus(System.Convert.ToString(value));
+ return new PrivateLinkServiceConnectionStateStatus(global::System.Convert.ToString(value));
}
/// Compares values of enum type PrivateLinkServiceConnectionStateStatus
diff --git a/src/MySql/generated/api/Support/PublicNetworkAccessEnum.cs b/src/MySql/generated/api/Support/PublicNetworkAccessEnum.cs
index 28783da0b3b5..ba53b430a83c 100644
--- a/src/MySql/generated/api/Support/PublicNetworkAccessEnum.cs
+++ b/src/MySql/generated/api/Support/PublicNetworkAccessEnum.cs
@@ -24,7 +24,7 @@ public partial struct PublicNetworkAccessEnum :
/// the value to convert to an instance of .
internal static object CreateFrom(object value)
{
- return new PublicNetworkAccessEnum(System.Convert.ToString(value));
+ return new PublicNetworkAccessEnum(global::System.Convert.ToString(value));
}
/// Compares values of enum type PublicNetworkAccessEnum
diff --git a/src/MySql/generated/api/Support/ResourceIdentityType.cs b/src/MySql/generated/api/Support/ResourceIdentityType.cs
index f28720cfde74..995b88bbfa58 100644
--- a/src/MySql/generated/api/Support/ResourceIdentityType.cs
+++ b/src/MySql/generated/api/Support/ResourceIdentityType.cs
@@ -19,7 +19,7 @@ public partial struct ResourceIdentityType :
/// the value to convert to an instance of .
internal static object CreateFrom(object value)
{
- return new ResourceIdentityType(System.Convert.ToString(value));
+ return new ResourceIdentityType(global::System.Convert.ToString(value));
}
/// Compares values of enum type ResourceIdentityType
diff --git a/src/MySql/generated/api/Support/SecurityAlertPolicyName.cs b/src/MySql/generated/api/Support/SecurityAlertPolicyName.cs
index f11de907aabb..1373ae1af6d4 100644
--- a/src/MySql/generated/api/Support/SecurityAlertPolicyName.cs
+++ b/src/MySql/generated/api/Support/SecurityAlertPolicyName.cs
@@ -18,7 +18,7 @@ public partial struct SecurityAlertPolicyName :
/// the value to convert to an instance of .
internal static object CreateFrom(object value)
{
- return new SecurityAlertPolicyName(System.Convert.ToString(value));
+ return new SecurityAlertPolicyName(global::System.Convert.ToString(value));
}
/// Compares values of enum type SecurityAlertPolicyName
diff --git a/src/MySql/generated/api/Support/ServerHaState.cs b/src/MySql/generated/api/Support/ServerHaState.cs
index 5b3f6879cbe1..a6b31cdf43c9 100644
--- a/src/MySql/generated/api/Support/ServerHaState.cs
+++ b/src/MySql/generated/api/Support/ServerHaState.cs
@@ -29,7 +29,7 @@ public partial struct ServerHaState :
/// the value to convert to an instance of .
internal static object CreateFrom(object value)
{
- return new ServerHaState(System.Convert.ToString(value));
+ return new ServerHaState(global::System.Convert.ToString(value));
}
/// Compares values of enum type ServerHaState
diff --git a/src/MySql/generated/api/Support/ServerSecurityAlertPolicyState.cs b/src/MySql/generated/api/Support/ServerSecurityAlertPolicyState.cs
index ddbd78bd9c3e..cdf0479ea8d7 100644
--- a/src/MySql/generated/api/Support/ServerSecurityAlertPolicyState.cs
+++ b/src/MySql/generated/api/Support/ServerSecurityAlertPolicyState.cs
@@ -23,7 +23,7 @@ public partial struct ServerSecurityAlertPolicyState :
/// the value to convert to an instance of .
internal static object CreateFrom(object value)
{
- return new ServerSecurityAlertPolicyState(System.Convert.ToString(value));
+ return new ServerSecurityAlertPolicyState(global::System.Convert.ToString(value));
}
/// Compares values of enum type ServerSecurityAlertPolicyState
diff --git a/src/MySql/generated/api/Support/ServerState.cs b/src/MySql/generated/api/Support/ServerState.cs
index 047069050448..1ccd127393a0 100644
--- a/src/MySql/generated/api/Support/ServerState.cs
+++ b/src/MySql/generated/api/Support/ServerState.cs
@@ -33,7 +33,7 @@ public partial struct ServerState :
/// the value to convert to an instance of .
internal static object CreateFrom(object value)
{
- return new ServerState(System.Convert.ToString(value));
+ return new ServerState(global::System.Convert.ToString(value));
}
/// Compares values of enum type ServerState
diff --git a/src/MySql/generated/api/Support/ServerVersion.cs b/src/MySql/generated/api/Support/ServerVersion.cs
index fac335f363ae..378284935331 100644
--- a/src/MySql/generated/api/Support/ServerVersion.cs
+++ b/src/MySql/generated/api/Support/ServerVersion.cs
@@ -23,7 +23,7 @@ public partial struct ServerVersion :
/// the value to convert to an instance of .
internal static object CreateFrom(object value)
{
- return new ServerVersion(System.Convert.ToString(value));
+ return new ServerVersion(global::System.Convert.ToString(value));
}
/// Compares values of enum type ServerVersion
diff --git a/src/MySql/generated/api/Support/SkuTier.cs b/src/MySql/generated/api/Support/SkuTier.cs
index 336856258736..7224b99e7e0c 100644
--- a/src/MySql/generated/api/Support/SkuTier.cs
+++ b/src/MySql/generated/api/Support/SkuTier.cs
@@ -25,7 +25,7 @@ public partial struct SkuTier :
/// the value to convert to an instance of .
internal static object CreateFrom(object value)
{
- return new SkuTier(System.Convert.ToString(value));
+ return new SkuTier(global::System.Convert.ToString(value));
}
/// Compares values of enum type SkuTier
diff --git a/src/MySql/generated/api/Support/SslEnforcementEnum.cs b/src/MySql/generated/api/Support/SslEnforcementEnum.cs
index e552d6d2f48d..072db67c1bda 100644
--- a/src/MySql/generated/api/Support/SslEnforcementEnum.cs
+++ b/src/MySql/generated/api/Support/SslEnforcementEnum.cs
@@ -21,7 +21,7 @@ public partial struct SslEnforcementEnum :
/// the value to convert to an instance of .
internal static object CreateFrom(object value)
{
- return new SslEnforcementEnum(System.Convert.ToString(value));
+ return new SslEnforcementEnum(global::System.Convert.ToString(value));
}
/// Compares values of enum type SslEnforcementEnum
diff --git a/src/MySql/generated/api/Support/StorageAutogrow.cs b/src/MySql/generated/api/Support/StorageAutogrow.cs
index 94aff9b19d0c..db05e290d180 100644
--- a/src/MySql/generated/api/Support/StorageAutogrow.cs
+++ b/src/MySql/generated/api/Support/StorageAutogrow.cs
@@ -21,7 +21,7 @@ public partial struct StorageAutogrow :
/// the value to convert to an instance of .
internal static object CreateFrom(object value)
{
- return new StorageAutogrow(System.Convert.ToString(value));
+ return new StorageAutogrow(global::System.Convert.ToString(value));
}
/// Compares values of enum type StorageAutogrow
diff --git a/src/MySql/generated/api/Support/VirtualNetworkRuleState.cs b/src/MySql/generated/api/Support/VirtualNetworkRuleState.cs
index 2ac4d75c0f4e..e2133f2b9a7e 100644
--- a/src/MySql/generated/api/Support/VirtualNetworkRuleState.cs
+++ b/src/MySql/generated/api/Support/VirtualNetworkRuleState.cs
@@ -27,7 +27,7 @@ public partial struct VirtualNetworkRuleState :
/// the value to convert to an instance of .
internal static object CreateFrom(object value)
{
- return new VirtualNetworkRuleState(System.Convert.ToString(value));
+ return new VirtualNetworkRuleState(global::System.Convert.ToString(value));
}
/// Compares values of enum type VirtualNetworkRuleState
diff --git a/src/MySql/generated/cmdlets/NewAzMySqlFlexibleServer_CreateExpanded.cs b/src/MySql/generated/cmdlets/NewAzMySqlFlexibleServer_CreateExpanded.cs
index 8bc5ad66b450..18045305cff7 100644
--- a/src/MySql/generated/cmdlets/NewAzMySqlFlexibleServer_CreateExpanded.cs
+++ b/src/MySql/generated/cmdlets/NewAzMySqlFlexibleServer_CreateExpanded.cs
@@ -351,7 +351,7 @@ public partial class NewAzMySqlFlexibleServer_CreateExpanded : global::System.Ma
SerializedName = @"tier",
PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SkuTier) })]
[global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SkuTier))]
- public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SkuTier SkuTier { get => ParametersBody.SkuTier; set => ParametersBody.SkuTier = value; }
+ public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SkuTier SkuTier { get => ParametersBody.SkuTier ?? ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SkuTier)""); set => ParametersBody.SkuTier = value; }
/// The source MySQL server id.
[global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The source MySQL server id.")]
diff --git a/src/MySql/generated/cmdlets/NewAzMySqlFlexibleServer_CreateViaIdentityExpanded.cs b/src/MySql/generated/cmdlets/NewAzMySqlFlexibleServer_CreateViaIdentityExpanded.cs
index 62d36047598b..c25623216139 100644
--- a/src/MySql/generated/cmdlets/NewAzMySqlFlexibleServer_CreateViaIdentityExpanded.cs
+++ b/src/MySql/generated/cmdlets/NewAzMySqlFlexibleServer_CreateViaIdentityExpanded.cs
@@ -330,7 +330,7 @@ public partial class NewAzMySqlFlexibleServer_CreateViaIdentityExpanded : global
SerializedName = @"tier",
PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SkuTier) })]
[global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SkuTier))]
- public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SkuTier SkuTier { get => ParametersBody.SkuTier; set => ParametersBody.SkuTier = value; }
+ public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SkuTier SkuTier { get => ParametersBody.SkuTier ?? ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SkuTier)""); set => ParametersBody.SkuTier = value; }
/// The source MySQL server id.
[global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The source MySQL server id.")]
diff --git a/src/MySql/generated/cmdlets/NewAzMySqlServerSecurityAlertPolicy_CreateExpanded.cs b/src/MySql/generated/cmdlets/NewAzMySqlServerSecurityAlertPolicy_CreateExpanded.cs
index d0128e61ec8b..88b809a0c2fa 100644
--- a/src/MySql/generated/cmdlets/NewAzMySqlServerSecurityAlertPolicy_CreateExpanded.cs
+++ b/src/MySql/generated/cmdlets/NewAzMySqlServerSecurityAlertPolicy_CreateExpanded.cs
@@ -206,7 +206,7 @@ public partial class NewAzMySqlServerSecurityAlertPolicy_CreateExpanded : global
SerializedName = @"state",
PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.ServerSecurityAlertPolicyState) })]
[global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.ServerSecurityAlertPolicyState))]
- public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.ServerSecurityAlertPolicyState State { get => ParametersBody.State; set => ParametersBody.State = value; }
+ public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.ServerSecurityAlertPolicyState State { get => ParametersBody.State ?? ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.ServerSecurityAlertPolicyState)""); set => ParametersBody.State = value; }
/// Specifies the identifier key of the Threat Detection audit storage account.
[global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies the identifier key of the Threat Detection audit storage account.")]
diff --git a/src/MySql/generated/cmdlets/NewAzMySqlServerSecurityAlertPolicy_CreateViaIdentityExpanded.cs b/src/MySql/generated/cmdlets/NewAzMySqlServerSecurityAlertPolicy_CreateViaIdentityExpanded.cs
index 75a49a4b7ddc..07cdf027ebb7 100644
--- a/src/MySql/generated/cmdlets/NewAzMySqlServerSecurityAlertPolicy_CreateViaIdentityExpanded.cs
+++ b/src/MySql/generated/cmdlets/NewAzMySqlServerSecurityAlertPolicy_CreateViaIdentityExpanded.cs
@@ -186,7 +186,7 @@ public partial class NewAzMySqlServerSecurityAlertPolicy_CreateViaIdentityExpand
SerializedName = @"state",
PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.ServerSecurityAlertPolicyState) })]
[global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.ServerSecurityAlertPolicyState))]
- public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.ServerSecurityAlertPolicyState State { get => ParametersBody.State; set => ParametersBody.State = value; }
+ public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.ServerSecurityAlertPolicyState State { get => ParametersBody.State ?? ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.ServerSecurityAlertPolicyState)""); set => ParametersBody.State = value; }
/// Specifies the identifier key of the Threat Detection audit storage account.
[global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies the identifier key of the Threat Detection audit storage account.")]
diff --git a/src/MySql/generated/cmdlets/SetAzMySqlServerSecurityAlertPolicy_UpdateExpanded.cs b/src/MySql/generated/cmdlets/SetAzMySqlServerSecurityAlertPolicy_UpdateExpanded.cs
index c0980d2bfeab..fb103a99fbfa 100644
--- a/src/MySql/generated/cmdlets/SetAzMySqlServerSecurityAlertPolicy_UpdateExpanded.cs
+++ b/src/MySql/generated/cmdlets/SetAzMySqlServerSecurityAlertPolicy_UpdateExpanded.cs
@@ -206,7 +206,7 @@ public partial class SetAzMySqlServerSecurityAlertPolicy_UpdateExpanded : global
SerializedName = @"state",
PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.ServerSecurityAlertPolicyState) })]
[global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.ServerSecurityAlertPolicyState))]
- public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.ServerSecurityAlertPolicyState State { get => ParametersBody.State; set => ParametersBody.State = value; }
+ public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.ServerSecurityAlertPolicyState State { get => ParametersBody.State ?? ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.ServerSecurityAlertPolicyState)""); set => ParametersBody.State = value; }
/// Specifies the identifier key of the Threat Detection audit storage account.
[global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies the identifier key of the Threat Detection audit storage account.")]
diff --git a/src/MySql/generated/cmdlets/UpdateAzMySqlFlexibleServer_UpdateExpanded.cs b/src/MySql/generated/cmdlets/UpdateAzMySqlFlexibleServer_UpdateExpanded.cs
index 138eb318cd1b..5dd1a2245ef3 100644
--- a/src/MySql/generated/cmdlets/UpdateAzMySqlFlexibleServer_UpdateExpanded.cs
+++ b/src/MySql/generated/cmdlets/UpdateAzMySqlFlexibleServer_UpdateExpanded.cs
@@ -254,7 +254,7 @@ public partial class UpdateAzMySqlFlexibleServer_UpdateExpanded : global::System
SerializedName = @"tier",
PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SkuTier) })]
[global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SkuTier))]
- public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SkuTier SkuTier { get => ParametersBody.SkuTier; set => ParametersBody.SkuTier = value; }
+ public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SkuTier SkuTier { get => ParametersBody.SkuTier ?? ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SkuTier)""); set => ParametersBody.SkuTier = value; }
/// Enable ssl enforcement or not when connect to server.
[global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Enable ssl enforcement or not when connect to server.")]
diff --git a/src/MySql/generated/cmdlets/UpdateAzMySqlFlexibleServer_UpdateViaIdentityExpanded.cs b/src/MySql/generated/cmdlets/UpdateAzMySqlFlexibleServer_UpdateViaIdentityExpanded.cs
index adebd52eaa72..8c6b3fe04e95 100644
--- a/src/MySql/generated/cmdlets/UpdateAzMySqlFlexibleServer_UpdateViaIdentityExpanded.cs
+++ b/src/MySql/generated/cmdlets/UpdateAzMySqlFlexibleServer_UpdateViaIdentityExpanded.cs
@@ -233,7 +233,7 @@ public partial class UpdateAzMySqlFlexibleServer_UpdateViaIdentityExpanded : glo
SerializedName = @"tier",
PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SkuTier) })]
[global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SkuTier))]
- public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SkuTier SkuTier { get => ParametersBody.SkuTier; set => ParametersBody.SkuTier = value; }
+ public Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SkuTier SkuTier { get => ParametersBody.SkuTier ?? ((Microsoft.Azure.PowerShell.Cmdlets.MySql.Support.SkuTier)""); set => ParametersBody.SkuTier = value; }
/// Enable ssl enforcement or not when connect to server.
[global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Enable ssl enforcement or not when connect to server.")]
diff --git a/src/MySql/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs b/src/MySql/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs
index b13865c6783a..65337fe466dc 100644
--- a/src/MySql/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs
+++ b/src/MySql/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs
@@ -42,7 +42,7 @@ public class ExportProxyCmdlet : PSCmdlet
[ValidateNotNullOrEmpty]
public string DocsFolder { get; set; }
- [Parameter(Mandatory = true, ParameterSetName = "Docs")]
+ [Parameter(Mandatory = true)]
[ValidateNotNullOrEmpty]
public string ExamplesFolder { get; set; }
diff --git a/src/MySql/generated/runtime/UndeclaredResponseException.cs b/src/MySql/generated/runtime/UndeclaredResponseException.cs
index 495e38e8b6c7..b23196e8a477 100644
--- a/src/MySql/generated/runtime/UndeclaredResponseException.cs
+++ b/src/MySql/generated/runtime/UndeclaredResponseException.cs
@@ -42,8 +42,13 @@ public RestException(System.Net.Http.HttpResponseMessage response)
// try to parse the body as JSON, and see if a code and message are in there.
var json = Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonNode.Parse(ResponseBody) as Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject;
+ // error message could be in properties.statusMessage
+ { message = If(json?.Property("properties"), out var p)
+ && If(p?.PropertyT("statusMessage"), out var sm)
+ ? (string)sm : (string)Message; }
+
// see if there is an error block in the body
- json = json.Property("error") ?? json;
+ json = json?.Property("error") ?? json;
{ Code = If(json?.PropertyT("code"), out var c) ? (string)c : (string)StatusCode.ToString(); }
{ message = If(json?.PropertyT("message"), out var m) ? (string)m : (string)Message; }
diff --git a/src/MySql/help/Az.MySql.md b/src/MySql/help/Az.MySql.md
index dd32ccb6dd13..db26f57c70e7 100644
--- a/src/MySql/help/Az.MySql.md
+++ b/src/MySql/help/Az.MySql.md
@@ -1,6 +1,6 @@
---
Module Name: Az.MySql
-Module Guid: 8c7c6fcd-a96f-460b-89e2-ff822a3246c8
+Module Guid: 0b8ac9f4-b926-4ac8-b73f-937a0d218521
Download Help Link: https://docs.microsoft.com/en-us/powershell/module/az.mysql
Help Version: 1.0.0.0
Locale: en-US
@@ -26,12 +26,18 @@ Gets information about a server.
### [Get-AzMySqlFlexibleServerConfiguration](Get-AzMySqlFlexibleServerConfiguration.md)
Gets information about a configuration of server.
+### [Get-AzMySqlFlexibleServerConnectionString](Get-AzMySqlFlexibleServerConnectionString.md)
+Get the connection string according to client connection provider.
+
### [Get-AzMySqlFlexibleServerDatabase](Get-AzMySqlFlexibleServerDatabase.md)
Gets information about a database.
### [Get-AzMySqlFlexibleServerFirewallRule](Get-AzMySqlFlexibleServerFirewallRule.md)
Gets information about a server firewall rule.
+### [Get-AzMySqlFlexibleServerLocationBasedCapability](Get-AzMySqlFlexibleServerLocationBasedCapability.md)
+Get the available SKU information for the location
+
### [Get-AzMySqlFlexibleServerReplica](Get-AzMySqlFlexibleServerReplica.md)
List all the replicas for a given server.
@@ -48,7 +54,7 @@ Gets a virtual network rule.
Creates a new firewall rule or updates an existing firewall rule.
### [New-AzMySqlFlexibleServer](New-AzMySqlFlexibleServer.md)
-Creates a new server.
+Creates a new MySQL flexible server.
### [New-AzMySqlFlexibleServerDatabase](New-AzMySqlFlexibleServerDatabase.md)
Creates a new database or updates an existing database.
diff --git a/src/MySql/help/Get-AzMySqlConnectionString.md b/src/MySql/help/Get-AzMySqlConnectionString.md
index d586aefc49ad..3fa7f8a1bb44 100644
--- a/src/MySql/help/Get-AzMySqlConnectionString.md
+++ b/src/MySql/help/Get-AzMySqlConnectionString.md
@@ -80,7 +80,7 @@ Accept wildcard characters: False
```
### -InputObject
-The source server object to create replica from.
+The server for the connection string.
To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
```yaml
@@ -160,9 +160,8 @@ 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.
-INPUTOBJECT : The source server object to create replica from.
+INPUTOBJECT : The server for the connection string.
- `Location `: The geo-location where the resource lives
- - `SkuName `: The name of the sku, typically, tier + family + cores, e.g. B_Gen4_1, GP_Gen5_8.
- `[Tag ]`: Resource tags.
- `[(Any) ]`: This indicates any property can be added to this object.
- `[AdministratorLogin ]`: The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation).
@@ -177,6 +176,7 @@ INPUTOBJECT : The source server object to create replica from.
- `[ReplicationRole ]`: The replication role of the server.
- `[SkuCapacity ]`: The scale up/out capacity, representing server's compute units.
- `[SkuFamily ]`: The family of hardware.
+ - `[SkuName ]`: The name of the sku, typically, tier + family + cores, e.g. B_Gen4_1, GP_Gen5_8.
- `[SkuSize ]`: The size code, to be interpreted by resource as appropriate.
- `[SkuTier ]`: The tier of the particular SKU, e.g. Basic.
- `[SslEnforcement ]`: Enable ssl enforcement or not when connect to server.
diff --git a/src/MySql/help/Get-AzMySqlFlexibleServerConnectionString.md b/src/MySql/help/Get-AzMySqlFlexibleServerConnectionString.md
new file mode 100644
index 000000000000..b29ce7ca48fa
--- /dev/null
+++ b/src/MySql/help/Get-AzMySqlFlexibleServerConnectionString.md
@@ -0,0 +1,177 @@
+---
+external help file:
+Module Name: Az.MySql
+online version: https://docs.microsoft.com/en-us/powershell/module/az.mysql/get-azmysqlflexibleserverconnectionstring
+schema: 2.0.0
+---
+
+# Get-AzMySqlFlexibleServerConnectionString
+
+## SYNOPSIS
+Get the connection string according to client connection provider.
+
+## SYNTAX
+
+### Get (Default)
+```
+Get-AzMySqlFlexibleServerConnectionString -Client -Name