-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Upgrade MySql to API version 2024-12-01-preview #52193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
74339b8
Upgrade MySql to API version 2024-12-01-preview
ArthurMa1978 f1305e4
update
ArthurMa1978 ecea66d
update
ArthurMa1978 87f4ba9
update
ArthurMa1978 4e76dbe
update
ArthurMa1978 6302879
update
ArthurMa1978 cea19bb
update
ArthurMa1978 ad36a88
Merge branch 'main' into mgmt-mysql
ArthurMa1978 d2dc5da
Merge branch 'main' into mgmt-mysql
ArthurMa1978 da2f423
update
ArthurMa1978 75de795
update
ArthurMa1978 95811df
update
ArthurMa1978 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
206 changes: 202 additions & 4 deletions
206
sdk/mysql/Azure.ResourceManager.MySql/api/Azure.ResourceManager.MySql.net8.0.cs
Large diffs are not rendered by default.
Oops, something went wrong.
206 changes: 202 additions & 4 deletions
206
sdk/mysql/Azure.ResourceManager.MySql/api/Azure.ResourceManager.MySql.netstandard2.0.cs
Large diffs are not rendered by default.
Oops, something went wrong.
153 changes: 153 additions & 0 deletions
153
...ourceManager.MySql/src/MySqlFlexibleServers/Custom/ArmMySqlFlexibleServersModelFactory.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,153 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. | ||
|
|
||
| #nullable disable | ||
|
|
||
| using System; | ||
| using System.Collections.Generic; | ||
| using System.ComponentModel; | ||
| using System.Linq; | ||
| using Azure.Core; | ||
| using Azure.ResourceManager.Models; | ||
|
|
||
| namespace Azure.ResourceManager.MySql.FlexibleServers.Models | ||
| { | ||
| /// <summary> Model factory for models. </summary> | ||
| public static partial class ArmMySqlFlexibleServersModelFactory | ||
| { | ||
| /// <summary> Initializes a new instance of <see cref="FlexibleServers.MySqlFlexibleServerData"/>. </summary> | ||
| /// <param name="id"> The id. </param> | ||
| /// <param name="name"> The name. </param> | ||
| /// <param name="resourceType"> The resourceType. </param> | ||
| /// <param name="systemData"> The systemData. </param> | ||
| /// <param name="tags"> The tags. </param> | ||
| /// <param name="location"> The location. </param> | ||
| /// <param name="identity"> The cmk identity for the server. Current supported identity types: UserAssigned. </param> | ||
| /// <param name="sku"> The SKU (pricing tier) of the server. </param> | ||
| /// <param name="administratorLogin"> The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation). </param> | ||
| /// <param name="administratorLoginPassword"> The password of the administrator login (required for server creation). </param> | ||
| /// <param name="version"> Server version. </param> | ||
| /// <param name="availabilityZone"> availability Zone information of the server. </param> | ||
| /// <param name="createMode"> The mode to create a new MySQL server. </param> | ||
| /// <param name="sourceServerResourceId"> The source MySQL server id. </param> | ||
| /// <param name="restorePointInTime"> Restore point creation time (ISO8601 format), specifying the time to restore from. </param> | ||
| /// <param name="replicationRole"> The replication role. </param> | ||
| /// <param name="replicaCapacity"> The maximum number of replicas that a primary server can have. </param> | ||
| /// <param name="dataEncryption"> The Data Encryption for CMK. </param> | ||
| /// <param name="state"> The state of a server. </param> | ||
| /// <param name="fullyQualifiedDomainName"> The fully qualified domain name of a server. </param> | ||
| /// <param name="storage"> Storage related properties of a server. </param> | ||
| /// <param name="backup"> Backup related properties of a server. </param> | ||
| /// <param name="highAvailability"> High availability related properties of a server. </param> | ||
| /// <param name="network"> Network related properties of a server. </param> | ||
| /// <param name="privateEndpointConnections"> PrivateEndpointConnections related properties of a server. </param> | ||
| /// <param name="maintenanceWindow"> Maintenance window of a server. </param> | ||
| /// <param name="importSourceProperties"> Source properties for import from storage. </param> | ||
| /// <returns> A new <see cref="FlexibleServers.MySqlFlexibleServerData"/> instance for mocking. </returns> | ||
| [EditorBrowsable(EditorBrowsableState.Never)] | ||
| public static MySqlFlexibleServerData MySqlFlexibleServerData(ResourceIdentifier id, string name, ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, IDictionary<string, string> tags, AzureLocation location, ManagedServiceIdentity identity, MySqlFlexibleServerSku sku, string administratorLogin, string administratorLoginPassword, MySqlFlexibleServerVersion? version, string availabilityZone, MySqlFlexibleServerCreateMode? createMode, ResourceIdentifier sourceServerResourceId, DateTimeOffset? restorePointInTime, MySqlFlexibleServerReplicationRole? replicationRole, int? replicaCapacity, MySqlFlexibleServerDataEncryption dataEncryption, MySqlFlexibleServerState? state, string fullyQualifiedDomainName, MySqlFlexibleServerStorage storage, MySqlFlexibleServerBackupProperties backup, MySqlFlexibleServerHighAvailability highAvailability, MySqlFlexibleServerNetwork network, IEnumerable<MySqlFlexibleServersPrivateEndpointConnection> privateEndpointConnections, MySqlFlexibleServerMaintenanceWindow maintenanceWindow, ImportSourceProperties importSourceProperties) | ||
| { | ||
| tags ??= new Dictionary<string, string>(); | ||
|
|
||
| var list = new List<MySqlFlexibleServersPrivateEndpointConnectionData>(); | ||
| if (privateEndpointConnections != null) | ||
| { | ||
| foreach (var item in privateEndpointConnections) | ||
| { | ||
| var model = new MySqlFlexibleServersPrivateEndpointConnectionData(); | ||
| if (item.GroupIds != null && model.GroupIds is IList<string> modelGroupIds) | ||
| { | ||
| foreach (var gid in item.GroupIds) | ||
| modelGroupIds.Add(gid); | ||
| } | ||
| model.PrivateEndpoint = item.PrivateEndpoint; | ||
| model.ConnectionState = item.ConnectionState; | ||
| list.Add(model); | ||
| } | ||
| } | ||
|
|
||
| return new MySqlFlexibleServerData( | ||
| id, | ||
| name, | ||
| resourceType, | ||
| systemData, | ||
| tags, | ||
| location, | ||
| identity, | ||
| sku, | ||
| administratorLogin, | ||
| administratorLoginPassword, | ||
| version, | ||
| null, | ||
| availabilityZone, | ||
| createMode, | ||
| sourceServerResourceId, | ||
| restorePointInTime, | ||
| replicationRole, | ||
| replicaCapacity, | ||
| dataEncryption, | ||
| state, | ||
| fullyQualifiedDomainName, | ||
| null, | ||
| storage, | ||
| backup, | ||
| highAvailability, | ||
| network, | ||
| list.ToList(), | ||
| null, | ||
| maintenanceWindow, | ||
| importSourceProperties, | ||
| serializedAdditionalRawData: null); | ||
| } | ||
|
|
||
| /// <summary> Initializes a new instance of <see cref="FlexibleServers.MySqlFlexibleServersCapabilityData"/>. </summary> | ||
| /// <param name="id"> The id. </param> | ||
| /// <param name="name"> The name. </param> | ||
| /// <param name="resourceType"> The resourceType. </param> | ||
| /// <param name="systemData"> The systemData. </param> | ||
| /// <param name="supportedGeoBackupRegions"> supported geo backup regions. </param> | ||
| /// <param name="supportedFlexibleServerEditions"> A list of supported flexible server editions. </param> | ||
| /// <param name="supportedServerVersions"> A list of supported server versions. </param> | ||
| /// <returns> A new <see cref="FlexibleServers.MySqlFlexibleServersCapabilityData"/> instance for mocking. </returns> | ||
| public static MySqlFlexibleServersCapabilityData MySqlFlexibleServersCapabilityData(ResourceIdentifier id, string name, ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, IEnumerable<string> supportedGeoBackupRegions, IEnumerable<ServerEditionCapabilityV2> supportedFlexibleServerEditions, IEnumerable<ServerVersionCapabilityV2> supportedServerVersions) | ||
| => MySqlFlexibleServersCapabilityData(id, name, resourceType, systemData, supportedGeoBackupRegions, supportedFlexibleServerEditions, supportedServerVersions, supportedFeatures: null); | ||
|
|
||
| /// <summary> Initializes a new instance of <see cref="Models.MySqlFlexibleServersPrivateEndpointConnection"/>. </summary> | ||
| /// <param name="id"> The id. </param> | ||
| /// <param name="name"> The name. </param> | ||
| /// <param name="resourceType"> The resourceType. </param> | ||
| /// <param name="systemData"> The systemData. </param> | ||
| /// <param name="groupIds"> The group ids for the private endpoint resource. </param> | ||
| /// <param name="privateEndpointId"> The private endpoint resource. </param> | ||
| /// <param name="connectionState"> A collection of information about the state of the connection between service consumer and provider. </param> | ||
| /// <param name="provisioningState"> The provisioning state of the private endpoint connection resource. </param> | ||
| /// <returns> A new <see cref="Models.MySqlFlexibleServersPrivateEndpointConnection"/> instance for mocking. </returns> | ||
| [EditorBrowsable(EditorBrowsableState.Never)] | ||
| public static MySqlFlexibleServersPrivateEndpointConnection MySqlFlexibleServersPrivateEndpointConnection(ResourceIdentifier id, string name, ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, IEnumerable<string> groupIds, ResourceIdentifier privateEndpointId, MySqlFlexibleServersPrivateLinkServiceConnectionState connectionState, MySqlFlexibleServersPrivateEndpointConnectionProvisioningState? provisioningState) | ||
| { | ||
| groupIds ??= new List<string>(); | ||
|
|
||
| return new MySqlFlexibleServersPrivateEndpointConnection( | ||
| id, | ||
| name, | ||
| resourceType, | ||
| systemData, | ||
| groupIds?.ToList(), | ||
| privateEndpointId != null ? ResourceManagerModelFactory.SubResource(privateEndpointId) : null, | ||
| connectionState, | ||
| provisioningState, | ||
| serializedAdditionalRawData: null); | ||
| } | ||
|
|
||
| /// <summary> Initializes a new instance of <see cref="Models.MySqlFlexibleServerStorage"/>. </summary> | ||
| /// <param name="storageSizeInGB"> Max storage size allowed for a server. </param> | ||
| /// <param name="iops"> Storage IOPS for a server. </param> | ||
| /// <param name="autoGrow"> Enable Storage Auto Grow or not. </param> | ||
| /// <param name="logOnDisk"> Enable Log On Disk or not. </param> | ||
| /// <param name="storageSku"> The sku name of the server storage. </param> | ||
| /// <param name="autoIoScaling"> Enable IO Auto Scaling or not. </param> | ||
| /// <returns> A new <see cref="Models.MySqlFlexibleServerStorage"/> instance for mocking. </returns> | ||
| public static MySqlFlexibleServerStorage MySqlFlexibleServerStorage(int? storageSizeInGB, int? iops, MySqlFlexibleServerEnableStatusEnum? autoGrow, MySqlFlexibleServerEnableStatusEnum? logOnDisk, string storageSku, MySqlFlexibleServerEnableStatusEnum? autoIoScaling) | ||
| => MySqlFlexibleServerStorage(storageSizeInGB, iops, autoGrow, logOnDisk, storageSku, autoIoScaling, null); | ||
| } | ||
| } | ||
3 changes: 3 additions & 0 deletions
3
...ResourceManager.MySql/src/MySqlFlexibleServers/Custom/AzureResourceManagerMySqlContext.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,14 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. | ||
|
|
||
| using System.ClientModel.Primitives; | ||
| using Azure.Core; | ||
| using Azure.ResourceManager.MySql.FlexibleServers.Models; | ||
|
|
||
| namespace Azure.ResourceManager.MySql; | ||
|
|
||
| [CodeGenType("AzureResourceManagerMySqlFlexibleServersContext")] | ||
| [ModelReaderWriterBuildable(typeof(MySqlFlexibleServersPrivateEndpointConnection))] | ||
| public partial class AzureResourceManagerMySqlContext | ||
| { | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
...ql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Custom/MySqlFlexibleServerData.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. | ||
|
|
||
| #nullable disable | ||
|
|
||
| using System.Collections.Generic; | ||
| using System.ComponentModel; | ||
| using Azure.ResourceManager.Models; | ||
| using Azure.ResourceManager.MySql.FlexibleServers.Models; | ||
|
|
||
| namespace Azure.ResourceManager.MySql.FlexibleServers | ||
| { | ||
| /// <summary> | ||
| /// A class representing the MySqlFlexibleServer data model. | ||
| /// Represents a server. | ||
| /// </summary> | ||
| public partial class MySqlFlexibleServerData : TrackedResourceData | ||
| { | ||
| /// <summary> PrivateEndpointConnections related properties of a server. </summary> | ||
| [EditorBrowsable(EditorBrowsableState.Never)] | ||
| public IReadOnlyList<MySqlFlexibleServersPrivateEndpointConnection> PrivateEndpointConnections | ||
| { | ||
| get | ||
| { | ||
| if (ServerPrivateEndpointConnections == null) | ||
| return null; | ||
| var list = new List<MySqlFlexibleServersPrivateEndpointConnection>(); | ||
| foreach (var item in ServerPrivateEndpointConnections) | ||
| { | ||
| var model = new MySqlFlexibleServersPrivateEndpointConnection(); | ||
| if (item.GroupIds != null && model.GroupIds is IList<string> modelGroupIds) | ||
| { | ||
| foreach (var gid in item.GroupIds) | ||
| modelGroupIds.Add(gid); | ||
| } | ||
| model.PrivateEndpoint = item.PrivateEndpoint; | ||
| model.ConnectionState = item.ConnectionState; | ||
| list.Add(model); | ||
| } | ||
| return list; | ||
| } | ||
| } | ||
ArthurMa1978 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
| } | ||
20 changes: 10 additions & 10 deletions
20
...rceManager.MySql/src/MySqlFlexibleServers/Generated/AdvancedThreatProtectionCollection.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.