From 4b85421bbe470150e97d76238b2d6a86fa1175a0 Mon Sep 17 00:00:00 2001 From: Audunn Baldvinsson Date: Tue, 15 Oct 2024 17:47:14 +0000 Subject: [PATCH 1/2] update to 2024-07-01 --- .../Generated/INetAppResourceOperations.cs | 7 +- .../Generated/IVolumesOperations.cs | 262 ++++ .../Generated/Models/ActiveDirectory.cs | 4 +- .../Generated/Models/BackupPolicy.cs | 4 +- .../Generated/Models/BackupPolicyPatch.cs | 4 +- .../Models/BackupPolicyProperties.cs | 4 +- .../Models/ClusterPeerCommandResponse.cs | 52 + .../Models/FilePathAvailabilityRequest.cs | 17 +- .../PeerClusterForVolumeMigrationRequest.cs | 69 + .../Generated/Models/RemotePath.cs | 93 ++ .../Generated/Models/ReplicationObject.cs | 18 +- .../Models/SvmPeerCommandResponse.cs | 52 + .../Generated/Models/Volume.cs | 23 +- .../Models/VolumeGroupVolumeProperties.cs | 23 +- .../Generated/Models/VolumeProperties.cs | 23 +- ...umesAuthorizeExternalReplicationHeaders.cs | 45 + ...lumesFinalizeExternalReplicationHeaders.cs | 45 + .../VolumesPeerExternalClusterHeaders.cs | 45 + ...olumesPerformReplicationTransferHeaders.cs | 45 + .../Generated/NetAppManagementClient.cs | 2 +- .../Generated/NetAppResourceOperations.cs | 10 +- .../NetAppResourceOperationsExtensions.cs | 8 +- .../Generated/VolumesOperations.cs | 1237 +++++++++++++++++ .../Generated/VolumesOperationsExtensions.cs | 420 ++++++ .../NetAppFiles.Management.Sdk/README.md | 4 +- 25 files changed, 2484 insertions(+), 32 deletions(-) create mode 100644 src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/ClusterPeerCommandResponse.cs create mode 100644 src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/PeerClusterForVolumeMigrationRequest.cs create mode 100644 src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/RemotePath.cs create mode 100644 src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/SvmPeerCommandResponse.cs create mode 100644 src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/VolumesAuthorizeExternalReplicationHeaders.cs create mode 100644 src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/VolumesFinalizeExternalReplicationHeaders.cs create mode 100644 src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/VolumesPeerExternalClusterHeaders.cs create mode 100644 src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/VolumesPerformReplicationTransferHeaders.cs diff --git a/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/INetAppResourceOperations.cs b/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/INetAppResourceOperations.cs index 71463333bfa1..e45510e0b83e 100644 --- a/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/INetAppResourceOperations.cs +++ b/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/INetAppResourceOperations.cs @@ -61,6 +61,11 @@ public partial interface INetAppResourceOperations /// The Azure Resource URI for a delegated subnet. Must have the delegation /// Microsoft.NetApp/volumes /// + /// + /// The Azure Resource logical availability zone which is used within zone + /// mapping lookup for the subscription and region. The lookup will retrieve + /// the physical zone where volume is placed. + /// /// /// The headers that will be added to request. /// @@ -73,7 +78,7 @@ public partial interface INetAppResourceOperations /// /// Thrown when unable to deserialize the response /// - System.Threading.Tasks.Task> CheckFilePathAvailabilityWithHttpMessagesAsync(string location, string name, string subnetId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> CheckFilePathAvailabilityWithHttpMessagesAsync(string location, string name, string subnetId, string availabilityZone = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Check if a quota is available. diff --git a/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/IVolumesOperations.cs b/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/IVolumesOperations.cs index 53ea5b72566c..b7d2aaec0784 100644 --- a/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/IVolumesOperations.cs +++ b/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/IVolumesOperations.cs @@ -593,6 +593,137 @@ public partial interface IVolumesOperations /// System.Threading.Tasks.Task ReInitializeReplicationWithHttpMessagesAsync(string resourceGroupName, string accountName, string poolName, string volumeName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Starts peering the external cluster for this migration volume + /// + /// + /// Starts peering the external cluster for this migration volume + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the NetApp account + /// + /// + /// The name of the capacity pool + /// + /// + /// The name of the volume + /// + /// + /// Cluster peer request object supplied in the body of the operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> PeerExternalClusterWithHttpMessagesAsync(string resourceGroupName, string accountName, string poolName, string volumeName, PeerClusterForVolumeMigrationRequest body, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Starts SVM peering and returns a command to be run on the external ONTAP to + /// accept it. Once the SVM have been peered a SnapMirror will be created + /// + /// + /// Starts SVM peering and returns a command to be run on the external ONTAP to + /// accept it. Once the SVM have been peered a SnapMirror will be created + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the NetApp account + /// + /// + /// The name of the capacity pool + /// + /// + /// The name of the volume + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> AuthorizeExternalReplicationWithHttpMessagesAsync(string resourceGroupName, string accountName, string poolName, string volumeName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Finalizes the migration of an external volume by releasing the replication + /// and breaking the external cluster peering if no other migration is active. + /// + /// + /// Finalizes the migration of an external volume by releasing the replication + /// and breaking the external cluster peering if no other migration is active. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the NetApp account + /// + /// + /// The name of the capacity pool + /// + /// + /// The name of the volume + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + System.Threading.Tasks.Task> FinalizeExternalReplicationWithHttpMessagesAsync(string resourceGroupName, string accountName, string poolName, string volumeName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Performs an adhoc replication transfer on a volume with volumeType + /// Migration + /// + /// + /// Performs an adhoc replication transfer on a volume with volumeType + /// Migration + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the NetApp account + /// + /// + /// The name of the capacity pool + /// + /// + /// The name of the volume + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + System.Threading.Tasks.Task> PerformReplicationTransferWithHttpMessagesAsync(string resourceGroupName, string accountName, string poolName, string volumeName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Moves volume to another pool /// @@ -1172,6 +1303,137 @@ public partial interface IVolumesOperations /// System.Threading.Tasks.Task BeginReInitializeReplicationWithHttpMessagesAsync(string resourceGroupName, string accountName, string poolName, string volumeName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Starts peering the external cluster for this migration volume + /// + /// + /// Starts peering the external cluster for this migration volume + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the NetApp account + /// + /// + /// The name of the capacity pool + /// + /// + /// The name of the volume + /// + /// + /// Cluster peer request object supplied in the body of the operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> BeginPeerExternalClusterWithHttpMessagesAsync(string resourceGroupName, string accountName, string poolName, string volumeName, PeerClusterForVolumeMigrationRequest body, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Starts SVM peering and returns a command to be run on the external ONTAP to + /// accept it. Once the SVM have been peered a SnapMirror will be created + /// + /// + /// Starts SVM peering and returns a command to be run on the external ONTAP to + /// accept it. Once the SVM have been peered a SnapMirror will be created + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the NetApp account + /// + /// + /// The name of the capacity pool + /// + /// + /// The name of the volume + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> BeginAuthorizeExternalReplicationWithHttpMessagesAsync(string resourceGroupName, string accountName, string poolName, string volumeName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Finalizes the migration of an external volume by releasing the replication + /// and breaking the external cluster peering if no other migration is active. + /// + /// + /// Finalizes the migration of an external volume by releasing the replication + /// and breaking the external cluster peering if no other migration is active. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the NetApp account + /// + /// + /// The name of the capacity pool + /// + /// + /// The name of the volume + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + System.Threading.Tasks.Task> BeginFinalizeExternalReplicationWithHttpMessagesAsync(string resourceGroupName, string accountName, string poolName, string volumeName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Performs an adhoc replication transfer on a volume with volumeType + /// Migration + /// + /// + /// Performs an adhoc replication transfer on a volume with volumeType + /// Migration + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the NetApp account + /// + /// + /// The name of the capacity pool + /// + /// + /// The name of the volume + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + System.Threading.Tasks.Task> BeginPerformReplicationTransferWithHttpMessagesAsync(string resourceGroupName, string accountName, string poolName, string volumeName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Moves volume to another pool /// diff --git a/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/ActiveDirectory.cs b/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/ActiveDirectory.cs index b2d4101ced01..4b9fa397a1a4 100644 --- a/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/ActiveDirectory.cs +++ b/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/ActiveDirectory.cs @@ -66,7 +66,7 @@ public ActiveDirectory() /// list of unique usernames without domain specifier /// - /// kdc server IP addresses for the active directory machine. This optional + /// kdc server IP address for the active directory machine. This optional /// parameter is used only while creating kerberos volume. /// @@ -224,7 +224,7 @@ public ActiveDirectory() public System.Collections.Generic.IList Administrators {get; set; } /// - /// Gets or sets kdc server IP addresses for the active directory machine. This + /// Gets or sets kdc server IP address for the active directory machine. This /// optional parameter is used only while creating kerberos volume. /// [Newtonsoft.Json.JsonProperty(PropertyName = "kdcIP")] diff --git a/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/BackupPolicy.cs b/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/BackupPolicy.cs index adad6cef3f3a..932a06f6b2ed 100644 --- a/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/BackupPolicy.cs +++ b/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/BackupPolicy.cs @@ -49,7 +49,7 @@ public BackupPolicy() /// A unique read-only string that changes whenever the resource is updated. /// - /// Backup Policy Resource ID + /// Backup Policy GUID ID /// /// Azure lifecycle management @@ -102,7 +102,7 @@ public BackupPolicy() public string Etag {get; private set; } /// - /// Gets backup Policy Resource ID + /// Gets backup Policy GUID ID /// [Newtonsoft.Json.JsonProperty(PropertyName = "properties.backupPolicyId")] public string BackupPolicyId {get; private set; } diff --git a/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/BackupPolicyPatch.cs b/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/BackupPolicyPatch.cs index a82d87249e1d..0afa1659b04e 100644 --- a/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/BackupPolicyPatch.cs +++ b/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/BackupPolicyPatch.cs @@ -40,7 +40,7 @@ public BackupPolicyPatch() /// Resource tags /// - /// Backup Policy Resource ID + /// Backup Policy GUID ID /// /// Azure lifecycle management @@ -119,7 +119,7 @@ public BackupPolicyPatch() public System.Collections.Generic.IDictionary Tags {get; set; } /// - /// Gets backup Policy Resource ID + /// Gets backup Policy GUID ID /// [Newtonsoft.Json.JsonProperty(PropertyName = "properties.backupPolicyId")] public string BackupPolicyId {get; private set; } diff --git a/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/BackupPolicyProperties.cs b/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/BackupPolicyProperties.cs index d6388404c2dd..886890d46440 100644 --- a/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/BackupPolicyProperties.cs +++ b/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/BackupPolicyProperties.cs @@ -24,7 +24,7 @@ public BackupPolicyProperties() /// Initializes a new instance of the BackupPolicyProperties class. /// - /// Backup Policy Resource ID + /// Backup Policy GUID ID /// /// Azure lifecycle management @@ -68,7 +68,7 @@ public BackupPolicyProperties() /// - /// Gets backup Policy Resource ID + /// Gets backup Policy GUID ID /// [Newtonsoft.Json.JsonProperty(PropertyName = "backupPolicyId")] public string BackupPolicyId {get; private set; } diff --git a/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/ClusterPeerCommandResponse.cs b/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/ClusterPeerCommandResponse.cs new file mode 100644 index 000000000000..e6b92abe11c4 --- /dev/null +++ b/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/ClusterPeerCommandResponse.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.NetApp.Models +{ + using System.Linq; + + /// + /// Information about cluster peering process + /// + public partial class ClusterPeerCommandResponse + { + /// + /// Initializes a new instance of the ClusterPeerCommandResponse class. + /// + public ClusterPeerCommandResponse() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ClusterPeerCommandResponse class. + /// + + /// A command that needs to be run on the external ONTAP to accept cluster + /// peering. Will only be present if <code>clusterPeeringStatus</code> is + /// <code>pending</code> + /// + public ClusterPeerCommandResponse(string peerAcceptCommand = default(string)) + + { + this.PeerAcceptCommand = peerAcceptCommand; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets a command that needs to be run on the external ONTAP to accept + /// cluster peering. Will only be present if <code>clusterPeeringStatus</code> + /// is <code>pending</code> + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "peerAcceptCommand")] + public string PeerAcceptCommand {get; set; } + } +} \ No newline at end of file diff --git a/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/FilePathAvailabilityRequest.cs b/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/FilePathAvailabilityRequest.cs index dc5dd66486b5..2c3ea17b558f 100644 --- a/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/FilePathAvailabilityRequest.cs +++ b/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/FilePathAvailabilityRequest.cs @@ -31,11 +31,17 @@ public FilePathAvailabilityRequest() /// The Azure Resource URI for a delegated subnet. Must have the delegation /// Microsoft.NetApp/volumes /// - public FilePathAvailabilityRequest(string name, string subnetId) + + /// The Azure Resource logical availability zone which is used within zone + /// mapping lookup for the subscription and region. The lookup will retrieve + /// the physical zone where volume is placed. + /// + public FilePathAvailabilityRequest(string name, string subnetId, string availabilityZone = default(string)) { this.Name = name; this.SubnetId = subnetId; + this.AvailabilityZone = availabilityZone; CustomInit(); } @@ -57,6 +63,14 @@ public FilePathAvailabilityRequest(string name, string subnetId) /// [Newtonsoft.Json.JsonProperty(PropertyName = "subnetId")] public string SubnetId {get; set; } + + /// + /// Gets or sets the Azure Resource logical availability zone which is used + /// within zone mapping lookup for the subscription and region. The lookup will + /// retrieve the physical zone where volume is placed. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "availabilityZone")] + public string AvailabilityZone {get; set; } /// /// Validate the object. /// @@ -75,6 +89,7 @@ public virtual void Validate() } + } } } \ No newline at end of file diff --git a/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/PeerClusterForVolumeMigrationRequest.cs b/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/PeerClusterForVolumeMigrationRequest.cs new file mode 100644 index 000000000000..77d925d6faf0 --- /dev/null +++ b/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/PeerClusterForVolumeMigrationRequest.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.NetApp.Models +{ + using System.Linq; + + /// + /// Source Cluster properties for a cluster peer request + /// + public partial class PeerClusterForVolumeMigrationRequest + { + /// + /// Initializes a new instance of the PeerClusterForVolumeMigrationRequest class. + /// + public PeerClusterForVolumeMigrationRequest() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PeerClusterForVolumeMigrationRequest class. + /// + + /// A list of IC-LIF IPs that can be used to connect to the On-prem cluster + /// + public PeerClusterForVolumeMigrationRequest(System.Collections.Generic.IList peerIPAddresses) + + { + this.PeerIPAddresses = peerIPAddresses; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets a list of IC-LIF IPs that can be used to connect to the + /// On-prem cluster + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "peerIpAddresses")] + public System.Collections.Generic.IList PeerIPAddresses {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.PeerIPAddresses == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "PeerIPAddresses"); + } + if (this.PeerIPAddresses != null) + { + if (this.PeerIPAddresses.Count < 1) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinItems, "PeerIPAddresses", 1); + } + } + } + } +} \ No newline at end of file diff --git a/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/RemotePath.cs b/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/RemotePath.cs new file mode 100644 index 000000000000..ce99e719e4a5 --- /dev/null +++ b/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/RemotePath.cs @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.NetApp.Models +{ + using System.Linq; + + /// + /// The full path to a volume that is to be migrated into ANF. Required for + /// Migration volumes + /// + public partial class RemotePath + { + /// + /// Initializes a new instance of the RemotePath class. + /// + public RemotePath() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RemotePath class. + /// + + /// The Path to a ONTAP Host + /// + + /// The name of a server on the ONTAP Host + /// + + /// The name of a volume on the server + /// + public RemotePath(string externalHostName, string serverName, string volumeName) + + { + this.ExternalHostName = externalHostName; + this.ServerName = serverName; + this.VolumeName = volumeName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the Path to a ONTAP Host + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "externalHostName")] + public string ExternalHostName {get; set; } + + /// + /// Gets or sets the name of a server on the ONTAP Host + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "serverName")] + public string ServerName {get; set; } + + /// + /// Gets or sets the name of a volume on the server + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "volumeName")] + public string VolumeName {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.ExternalHostName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "ExternalHostName"); + } + if (this.ServerName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "ServerName"); + } + if (this.VolumeName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "VolumeName"); + } + + + + } + } +} \ No newline at end of file diff --git a/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/ReplicationObject.cs b/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/ReplicationObject.cs index c0fdac0f504d..e7d98efcd787 100644 --- a/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/ReplicationObject.cs +++ b/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/ReplicationObject.cs @@ -37,15 +37,20 @@ public ReplicationObject() /// The resource ID of the remote volume. /// + /// The full path to a volume that is to be migrated into ANF. Required for + /// Migration volumes + /// + /// The remote region for the other end of the Volume Replication. /// - public ReplicationObject(string remoteVolumeResourceId, string replicationId = default(string), string endpointType = default(string), string replicationSchedule = default(string), string remoteVolumeRegion = default(string)) + public ReplicationObject(string remoteVolumeResourceId, string replicationId = default(string), string endpointType = default(string), string replicationSchedule = default(string), RemotePath remotePath = default(RemotePath), string remoteVolumeRegion = default(string)) { this.ReplicationId = replicationId; this.EndpointType = endpointType; this.ReplicationSchedule = replicationSchedule; this.RemoteVolumeResourceId = remoteVolumeResourceId; + this.RemotePath = remotePath; this.RemoteVolumeRegion = remoteVolumeRegion; CustomInit(); } @@ -81,6 +86,13 @@ public ReplicationObject() [Newtonsoft.Json.JsonProperty(PropertyName = "remoteVolumeResourceId")] public string RemoteVolumeResourceId {get; set; } + /// + /// Gets or sets the full path to a volume that is to be migrated into ANF. + /// Required for Migration volumes + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "remotePath")] + public RemotePath RemotePath {get; set; } + /// /// Gets or sets the remote region for the other end of the Volume Replication. /// @@ -102,6 +114,10 @@ public virtual void Validate() + if (this.RemotePath != null) + { + this.RemotePath.Validate(); + } } } diff --git a/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/SvmPeerCommandResponse.cs b/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/SvmPeerCommandResponse.cs new file mode 100644 index 000000000000..40f44e1ae8f9 --- /dev/null +++ b/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/SvmPeerCommandResponse.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.NetApp.Models +{ + using System.Linq; + + /// + /// Information about svm peering process + /// + public partial class SvmPeerCommandResponse + { + /// + /// Initializes a new instance of the SvmPeerCommandResponse class. + /// + public SvmPeerCommandResponse() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SvmPeerCommandResponse class. + /// + + /// A command that needs to be run on the external ONTAP to accept svm peering. + /// Will only be present if <code>svmPeeringStatus</code> is + /// <code>pending</code> + /// + public SvmPeerCommandResponse(string svmPeeringCommand = default(string)) + + { + this.SvmPeeringCommand = svmPeeringCommand; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets a command that needs to be run on the external ONTAP to accept + /// svm peering. Will only be present if <code>svmPeeringStatus</code> is + /// <code>pending</code> + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "svmPeeringCommand")] + public string SvmPeeringCommand {get; set; } + } +} \ No newline at end of file diff --git a/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/Volume.cs b/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/Volume.cs index be6edcfe9b5d..7b9b0f88dca9 100644 --- a/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/Volume.cs +++ b/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/Volume.cs @@ -55,7 +55,8 @@ public Volume() /// The service level of the file system /// Possible values include: 'Standard', 'Premium', 'Ultra', 'StandardZRS' - /// Network features available to the volume, or current state of update. + /// The original value of the network features type available to the volume at + /// the time it was created. /// Possible values include: 'Basic', 'Standard', 'Basic_Standard', /// 'Standard_Basic' @@ -106,6 +107,11 @@ public Volume() /// Microsoft.NetApp/volumes /// + /// The effective value of the network features type available to the volume, + /// or current effective state of update. + /// Possible values include: 'Basic', 'Standard', 'Basic_Standard', + /// 'Standard_Basic' + /// Network Sibling Set ID for the the group of volumes sharing networking /// resources. /// @@ -263,7 +269,7 @@ public Volume() /// Id of the snapshot or backup that the volume is restored from. /// - public Volume(string location, string creationToken, long usageThreshold, string subnetId, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), string etag = default(string), System.Collections.Generic.IList zones = default(System.Collections.Generic.IList), string serviceLevel = default(string), string networkFeatures = default(string), string securityStyle = default(string), string enableSubvolumes = default(string), string fileSystemId = default(string), VolumePropertiesExportPolicy exportPolicy = default(VolumePropertiesExportPolicy), System.Collections.Generic.IList protocolTypes = default(System.Collections.Generic.IList), string provisioningState = default(string), string snapshotId = default(string), bool? deleteBaseSnapshot = default(bool?), string backupId = default(string), string baremetalTenantId = default(string), string networkSiblingSetId = default(string), string storageToNetworkProximity = default(string), System.Collections.Generic.IList mountTargets = default(System.Collections.Generic.IList), string volumeType = default(string), VolumePropertiesDataProtection dataProtection = default(VolumePropertiesDataProtection), bool? isRestoring = default(bool?), bool? snapshotDirectoryVisible = default(bool?), bool? kerberosEnabled = default(bool?), bool? smbEncryption = default(bool?), string smbAccessBasedEnumeration = default(string), string smbNonBrowsable = default(string), bool? smbContinuouslyAvailable = default(bool?), double? throughputMibps = default(double?), double? actualThroughputMibps = default(double?), string encryptionKeySource = default(string), string keyVaultPrivateEndpointResourceId = default(string), bool? ldapEnabled = default(bool?), bool? coolAccess = default(bool?), int? coolnessPeriod = default(int?), string coolAccessRetrievalPolicy = default(string), string unixPermissions = default(string), int? cloneProgress = default(int?), string fileAccessLogs = default(string), string avsDataStore = default(string), System.Collections.Generic.IList dataStoreResourceId = default(System.Collections.Generic.IList), bool? isDefaultQuotaEnabled = default(bool?), long? defaultUserQuotaInKiBs = default(long?), long? defaultGroupQuotaInKiBs = default(long?), long? maximumNumberOfFiles = default(long?), string volumeGroupName = default(string), string capacityPoolResourceId = default(string), string proximityPlacementGroup = default(string), string t2Network = default(string), string volumeSpecName = default(string), bool? encrypted = default(bool?), System.Collections.Generic.IList placementRules = default(System.Collections.Generic.IList), string provisionedAvailabilityZone = default(string), bool? isLargeVolume = default(bool?), string originatingResourceId = default(string)) + public Volume(string location, string creationToken, long usageThreshold, string subnetId, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), string etag = default(string), System.Collections.Generic.IList zones = default(System.Collections.Generic.IList), string serviceLevel = default(string), string networkFeatures = default(string), string securityStyle = default(string), string enableSubvolumes = default(string), string fileSystemId = default(string), VolumePropertiesExportPolicy exportPolicy = default(VolumePropertiesExportPolicy), System.Collections.Generic.IList protocolTypes = default(System.Collections.Generic.IList), string provisioningState = default(string), string snapshotId = default(string), bool? deleteBaseSnapshot = default(bool?), string backupId = default(string), string baremetalTenantId = default(string), string effectiveNetworkFeatures = default(string), string networkSiblingSetId = default(string), string storageToNetworkProximity = default(string), System.Collections.Generic.IList mountTargets = default(System.Collections.Generic.IList), string volumeType = default(string), VolumePropertiesDataProtection dataProtection = default(VolumePropertiesDataProtection), bool? isRestoring = default(bool?), bool? snapshotDirectoryVisible = default(bool?), bool? kerberosEnabled = default(bool?), bool? smbEncryption = default(bool?), string smbAccessBasedEnumeration = default(string), string smbNonBrowsable = default(string), bool? smbContinuouslyAvailable = default(bool?), double? throughputMibps = default(double?), double? actualThroughputMibps = default(double?), string encryptionKeySource = default(string), string keyVaultPrivateEndpointResourceId = default(string), bool? ldapEnabled = default(bool?), bool? coolAccess = default(bool?), int? coolnessPeriod = default(int?), string coolAccessRetrievalPolicy = default(string), string unixPermissions = default(string), int? cloneProgress = default(int?), string fileAccessLogs = default(string), string avsDataStore = default(string), System.Collections.Generic.IList dataStoreResourceId = default(System.Collections.Generic.IList), bool? isDefaultQuotaEnabled = default(bool?), long? defaultUserQuotaInKiBs = default(long?), long? defaultGroupQuotaInKiBs = default(long?), long? maximumNumberOfFiles = default(long?), string volumeGroupName = default(string), string capacityPoolResourceId = default(string), string proximityPlacementGroup = default(string), string t2Network = default(string), string volumeSpecName = default(string), bool? encrypted = default(bool?), System.Collections.Generic.IList placementRules = default(System.Collections.Generic.IList), string provisionedAvailabilityZone = default(string), bool? isLargeVolume = default(bool?), string originatingResourceId = default(string)) : base(location, id, name, type, systemData, tags) { @@ -284,6 +290,7 @@ public Volume() this.BackupId = backupId; this.BaremetalTenantId = baremetalTenantId; this.SubnetId = subnetId; + this.EffectiveNetworkFeatures = effectiveNetworkFeatures; this.NetworkSiblingSetId = networkSiblingSetId; this.StorageToNetworkProximity = storageToNetworkProximity; this.MountTargets = mountTargets; @@ -352,8 +359,8 @@ public Volume() public string ServiceLevel {get; set; } /// - /// Gets or sets network features available to the volume, or current state of - /// update. Possible values include: 'Basic', 'Standard', 'Basic_Standard', 'Standard_Basic' + /// Gets or sets the original value of the network features type available to + /// the volume at the time it was created. Possible values include: 'Basic', 'Standard', 'Basic_Standard', 'Standard_Basic' /// [Newtonsoft.Json.JsonProperty(PropertyName = "properties.networkFeatures")] public string NetworkFeatures {get; set; } @@ -446,6 +453,13 @@ public Volume() [Newtonsoft.Json.JsonProperty(PropertyName = "properties.subnetId")] public string SubnetId {get; set; } + /// + /// Gets the effective value of the network features type available to the + /// volume, or current effective state of update. Possible values include: 'Basic', 'Standard', 'Basic_Standard', 'Standard_Basic' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.effectiveNetworkFeatures")] + public string EffectiveNetworkFeatures {get; private set; } + /// /// Gets network Sibling Set ID for the the group of volumes sharing networking /// resources. @@ -792,6 +806,7 @@ public override void Validate() + if (this.NetworkSiblingSetId != null) { if (this.NetworkSiblingSetId.Length > 36) diff --git a/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/VolumeGroupVolumeProperties.cs b/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/VolumeGroupVolumeProperties.cs index b0d6930cf830..76adafd89da1 100644 --- a/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/VolumeGroupVolumeProperties.cs +++ b/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/VolumeGroupVolumeProperties.cs @@ -43,7 +43,8 @@ public VolumeGroupVolumeProperties() /// The service level of the file system /// Possible values include: 'Standard', 'Premium', 'Ultra', 'StandardZRS' - /// Network features available to the volume, or current state of update. + /// The original value of the network features type available to the volume at + /// the time it was created. /// Possible values include: 'Basic', 'Standard', 'Basic_Standard', /// 'Standard_Basic' @@ -94,6 +95,11 @@ public VolumeGroupVolumeProperties() /// Microsoft.NetApp/volumes /// + /// The effective value of the network features type available to the volume, + /// or current effective state of update. + /// Possible values include: 'Basic', 'Standard', 'Basic_Standard', + /// 'Standard_Basic' + /// Network Sibling Set ID for the the group of volumes sharing networking /// resources. /// @@ -251,7 +257,7 @@ public VolumeGroupVolumeProperties() /// Id of the snapshot or backup that the volume is restored from. /// - public VolumeGroupVolumeProperties(string creationToken, long usageThreshold, string subnetId, string id = default(string), string name = default(string), string type = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), System.Collections.Generic.IList zones = default(System.Collections.Generic.IList), string serviceLevel = default(string), string networkFeatures = default(string), string securityStyle = default(string), string enableSubvolumes = default(string), string fileSystemId = default(string), VolumePropertiesExportPolicy exportPolicy = default(VolumePropertiesExportPolicy), System.Collections.Generic.IList protocolTypes = default(System.Collections.Generic.IList), string provisioningState = default(string), string snapshotId = default(string), bool? deleteBaseSnapshot = default(bool?), string backupId = default(string), string baremetalTenantId = default(string), string networkSiblingSetId = default(string), string storageToNetworkProximity = default(string), System.Collections.Generic.IList mountTargets = default(System.Collections.Generic.IList), string volumeType = default(string), VolumePropertiesDataProtection dataProtection = default(VolumePropertiesDataProtection), bool? isRestoring = default(bool?), bool? snapshotDirectoryVisible = default(bool?), bool? kerberosEnabled = default(bool?), bool? smbEncryption = default(bool?), string smbAccessBasedEnumeration = default(string), string smbNonBrowsable = default(string), bool? smbContinuouslyAvailable = default(bool?), double? throughputMibps = default(double?), double? actualThroughputMibps = default(double?), string encryptionKeySource = default(string), string keyVaultPrivateEndpointResourceId = default(string), bool? ldapEnabled = default(bool?), bool? coolAccess = default(bool?), int? coolnessPeriod = default(int?), string coolAccessRetrievalPolicy = default(string), string unixPermissions = default(string), int? cloneProgress = default(int?), string fileAccessLogs = default(string), string avsDataStore = default(string), System.Collections.Generic.IList dataStoreResourceId = default(System.Collections.Generic.IList), bool? isDefaultQuotaEnabled = default(bool?), long? defaultUserQuotaInKiBs = default(long?), long? defaultGroupQuotaInKiBs = default(long?), long? maximumNumberOfFiles = default(long?), string volumeGroupName = default(string), string capacityPoolResourceId = default(string), string proximityPlacementGroup = default(string), string t2Network = default(string), string volumeSpecName = default(string), bool? encrypted = default(bool?), System.Collections.Generic.IList placementRules = default(System.Collections.Generic.IList), string provisionedAvailabilityZone = default(string), bool? isLargeVolume = default(bool?), string originatingResourceId = default(string)) + public VolumeGroupVolumeProperties(string creationToken, long usageThreshold, string subnetId, string id = default(string), string name = default(string), string type = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), System.Collections.Generic.IList zones = default(System.Collections.Generic.IList), string serviceLevel = default(string), string networkFeatures = default(string), string securityStyle = default(string), string enableSubvolumes = default(string), string fileSystemId = default(string), VolumePropertiesExportPolicy exportPolicy = default(VolumePropertiesExportPolicy), System.Collections.Generic.IList protocolTypes = default(System.Collections.Generic.IList), string provisioningState = default(string), string snapshotId = default(string), bool? deleteBaseSnapshot = default(bool?), string backupId = default(string), string baremetalTenantId = default(string), string effectiveNetworkFeatures = default(string), string networkSiblingSetId = default(string), string storageToNetworkProximity = default(string), System.Collections.Generic.IList mountTargets = default(System.Collections.Generic.IList), string volumeType = default(string), VolumePropertiesDataProtection dataProtection = default(VolumePropertiesDataProtection), bool? isRestoring = default(bool?), bool? snapshotDirectoryVisible = default(bool?), bool? kerberosEnabled = default(bool?), bool? smbEncryption = default(bool?), string smbAccessBasedEnumeration = default(string), string smbNonBrowsable = default(string), bool? smbContinuouslyAvailable = default(bool?), double? throughputMibps = default(double?), double? actualThroughputMibps = default(double?), string encryptionKeySource = default(string), string keyVaultPrivateEndpointResourceId = default(string), bool? ldapEnabled = default(bool?), bool? coolAccess = default(bool?), int? coolnessPeriod = default(int?), string coolAccessRetrievalPolicy = default(string), string unixPermissions = default(string), int? cloneProgress = default(int?), string fileAccessLogs = default(string), string avsDataStore = default(string), System.Collections.Generic.IList dataStoreResourceId = default(System.Collections.Generic.IList), bool? isDefaultQuotaEnabled = default(bool?), long? defaultUserQuotaInKiBs = default(long?), long? defaultGroupQuotaInKiBs = default(long?), long? maximumNumberOfFiles = default(long?), string volumeGroupName = default(string), string capacityPoolResourceId = default(string), string proximityPlacementGroup = default(string), string t2Network = default(string), string volumeSpecName = default(string), bool? encrypted = default(bool?), System.Collections.Generic.IList placementRules = default(System.Collections.Generic.IList), string provisionedAvailabilityZone = default(string), bool? isLargeVolume = default(bool?), string originatingResourceId = default(string)) { this.Id = id; @@ -274,6 +280,7 @@ public VolumeGroupVolumeProperties() this.BackupId = backupId; this.BaremetalTenantId = baremetalTenantId; this.SubnetId = subnetId; + this.EffectiveNetworkFeatures = effectiveNetworkFeatures; this.NetworkSiblingSetId = networkSiblingSetId; this.StorageToNetworkProximity = storageToNetworkProximity; this.MountTargets = mountTargets; @@ -359,8 +366,8 @@ public VolumeGroupVolumeProperties() public string ServiceLevel {get; set; } /// - /// Gets or sets network features available to the volume, or current state of - /// update. Possible values include: 'Basic', 'Standard', 'Basic_Standard', 'Standard_Basic' + /// Gets or sets the original value of the network features type available to + /// the volume at the time it was created. Possible values include: 'Basic', 'Standard', 'Basic_Standard', 'Standard_Basic' /// [Newtonsoft.Json.JsonProperty(PropertyName = "properties.networkFeatures")] public string NetworkFeatures {get; set; } @@ -453,6 +460,13 @@ public VolumeGroupVolumeProperties() [Newtonsoft.Json.JsonProperty(PropertyName = "properties.subnetId")] public string SubnetId {get; set; } + /// + /// Gets the effective value of the network features type available to the + /// volume, or current effective state of update. Possible values include: 'Basic', 'Standard', 'Basic_Standard', 'Standard_Basic' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.effectiveNetworkFeatures")] + public string EffectiveNetworkFeatures {get; private set; } + /// /// Gets network Sibling Set ID for the the group of volumes sharing networking /// resources. @@ -801,6 +815,7 @@ public virtual void Validate() + if (this.NetworkSiblingSetId != null) { if (this.NetworkSiblingSetId.Length > 36) diff --git a/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/VolumeProperties.cs b/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/VolumeProperties.cs index bf277a9c4a68..10d0d19ba928 100644 --- a/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/VolumeProperties.cs +++ b/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/VolumeProperties.cs @@ -67,7 +67,13 @@ public VolumeProperties() /// Microsoft.NetApp/volumes /// - /// Network features available to the volume, or current state of update. + /// The original value of the network features type available to the volume at + /// the time it was created. + /// Possible values include: 'Basic', 'Standard', 'Basic_Standard', + /// 'Standard_Basic' + + /// The effective value of the network features type available to the volume, + /// or current effective state of update. /// Possible values include: 'Basic', 'Standard', 'Basic_Standard', /// 'Standard_Basic' @@ -235,7 +241,7 @@ public VolumeProperties() /// Id of the snapshot or backup that the volume is restored from. /// - public VolumeProperties(string creationToken, long usageThreshold, string subnetId, string fileSystemId = default(string), string serviceLevel = default(string), VolumePropertiesExportPolicy exportPolicy = default(VolumePropertiesExportPolicy), System.Collections.Generic.IList protocolTypes = default(System.Collections.Generic.IList), string provisioningState = default(string), string snapshotId = default(string), bool? deleteBaseSnapshot = default(bool?), string backupId = default(string), string baremetalTenantId = default(string), string networkFeatures = default(string), string networkSiblingSetId = default(string), string storageToNetworkProximity = default(string), System.Collections.Generic.IList mountTargets = default(System.Collections.Generic.IList), string volumeType = default(string), VolumePropertiesDataProtection dataProtection = default(VolumePropertiesDataProtection), bool? isRestoring = default(bool?), bool? snapshotDirectoryVisible = default(bool?), bool? kerberosEnabled = default(bool?), string securityStyle = default(string), bool? smbEncryption = default(bool?), string smbAccessBasedEnumeration = default(string), string smbNonBrowsable = default(string), bool? smbContinuouslyAvailable = default(bool?), double? throughputMibps = default(double?), double? actualThroughputMibps = default(double?), string encryptionKeySource = default(string), string keyVaultPrivateEndpointResourceId = default(string), bool? ldapEnabled = default(bool?), bool? coolAccess = default(bool?), int? coolnessPeriod = default(int?), string coolAccessRetrievalPolicy = default(string), string unixPermissions = default(string), int? cloneProgress = default(int?), string fileAccessLogs = default(string), string avsDataStore = default(string), System.Collections.Generic.IList dataStoreResourceId = default(System.Collections.Generic.IList), bool? isDefaultQuotaEnabled = default(bool?), long? defaultUserQuotaInKiBs = default(long?), long? defaultGroupQuotaInKiBs = default(long?), long? maximumNumberOfFiles = default(long?), string volumeGroupName = default(string), string capacityPoolResourceId = default(string), string proximityPlacementGroup = default(string), string t2Network = default(string), string volumeSpecName = default(string), bool? encrypted = default(bool?), System.Collections.Generic.IList placementRules = default(System.Collections.Generic.IList), string enableSubvolumes = default(string), string provisionedAvailabilityZone = default(string), bool? isLargeVolume = default(bool?), string originatingResourceId = default(string)) + public VolumeProperties(string creationToken, long usageThreshold, string subnetId, string fileSystemId = default(string), string serviceLevel = default(string), VolumePropertiesExportPolicy exportPolicy = default(VolumePropertiesExportPolicy), System.Collections.Generic.IList protocolTypes = default(System.Collections.Generic.IList), string provisioningState = default(string), string snapshotId = default(string), bool? deleteBaseSnapshot = default(bool?), string backupId = default(string), string baremetalTenantId = default(string), string networkFeatures = default(string), string effectiveNetworkFeatures = default(string), string networkSiblingSetId = default(string), string storageToNetworkProximity = default(string), System.Collections.Generic.IList mountTargets = default(System.Collections.Generic.IList), string volumeType = default(string), VolumePropertiesDataProtection dataProtection = default(VolumePropertiesDataProtection), bool? isRestoring = default(bool?), bool? snapshotDirectoryVisible = default(bool?), bool? kerberosEnabled = default(bool?), string securityStyle = default(string), bool? smbEncryption = default(bool?), string smbAccessBasedEnumeration = default(string), string smbNonBrowsable = default(string), bool? smbContinuouslyAvailable = default(bool?), double? throughputMibps = default(double?), double? actualThroughputMibps = default(double?), string encryptionKeySource = default(string), string keyVaultPrivateEndpointResourceId = default(string), bool? ldapEnabled = default(bool?), bool? coolAccess = default(bool?), int? coolnessPeriod = default(int?), string coolAccessRetrievalPolicy = default(string), string unixPermissions = default(string), int? cloneProgress = default(int?), string fileAccessLogs = default(string), string avsDataStore = default(string), System.Collections.Generic.IList dataStoreResourceId = default(System.Collections.Generic.IList), bool? isDefaultQuotaEnabled = default(bool?), long? defaultUserQuotaInKiBs = default(long?), long? defaultGroupQuotaInKiBs = default(long?), long? maximumNumberOfFiles = default(long?), string volumeGroupName = default(string), string capacityPoolResourceId = default(string), string proximityPlacementGroup = default(string), string t2Network = default(string), string volumeSpecName = default(string), bool? encrypted = default(bool?), System.Collections.Generic.IList placementRules = default(System.Collections.Generic.IList), string enableSubvolumes = default(string), string provisionedAvailabilityZone = default(string), bool? isLargeVolume = default(bool?), string originatingResourceId = default(string)) { this.FileSystemId = fileSystemId; @@ -251,6 +257,7 @@ public VolumeProperties() this.BaremetalTenantId = baremetalTenantId; this.SubnetId = subnetId; this.NetworkFeatures = networkFeatures; + this.EffectiveNetworkFeatures = effectiveNetworkFeatures; this.NetworkSiblingSetId = networkSiblingSetId; this.StorageToNetworkProximity = storageToNetworkProximity; this.MountTargets = mountTargets; @@ -382,12 +389,19 @@ public VolumeProperties() public string SubnetId {get; set; } /// - /// Gets or sets network features available to the volume, or current state of - /// update. Possible values include: 'Basic', 'Standard', 'Basic_Standard', 'Standard_Basic' + /// Gets or sets the original value of the network features type available to + /// the volume at the time it was created. Possible values include: 'Basic', 'Standard', 'Basic_Standard', 'Standard_Basic' /// [Newtonsoft.Json.JsonProperty(PropertyName = "networkFeatures")] public string NetworkFeatures {get; set; } + /// + /// Gets the effective value of the network features type available to the + /// volume, or current effective state of update. Possible values include: 'Basic', 'Standard', 'Basic_Standard', 'Standard_Basic' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "effectiveNetworkFeatures")] + public string EffectiveNetworkFeatures {get; private set; } + /// /// Gets network Sibling Set ID for the the group of volumes sharing networking /// resources. @@ -743,6 +757,7 @@ public virtual void Validate() + if (this.NetworkSiblingSetId != null) { if (this.NetworkSiblingSetId.Length > 36) diff --git a/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/VolumesAuthorizeExternalReplicationHeaders.cs b/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/VolumesAuthorizeExternalReplicationHeaders.cs new file mode 100644 index 000000000000..6e80cb6df27f --- /dev/null +++ b/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/VolumesAuthorizeExternalReplicationHeaders.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.NetApp.Models +{ + using System.Linq; + + public partial class VolumesAuthorizeExternalReplicationHeaders + { + /// + /// Initializes a new instance of the VolumesAuthorizeExternalReplicationHeaders class. + /// + public VolumesAuthorizeExternalReplicationHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the VolumesAuthorizeExternalReplicationHeaders class. + /// + + /// + /// + public VolumesAuthorizeExternalReplicationHeaders(string location = default(string)) + + { + this.Location = location; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "Location")] + public string Location {get; set; } + } +} \ No newline at end of file diff --git a/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/VolumesFinalizeExternalReplicationHeaders.cs b/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/VolumesFinalizeExternalReplicationHeaders.cs new file mode 100644 index 000000000000..dfa4c1270f89 --- /dev/null +++ b/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/VolumesFinalizeExternalReplicationHeaders.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.NetApp.Models +{ + using System.Linq; + + public partial class VolumesFinalizeExternalReplicationHeaders + { + /// + /// Initializes a new instance of the VolumesFinalizeExternalReplicationHeaders class. + /// + public VolumesFinalizeExternalReplicationHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the VolumesFinalizeExternalReplicationHeaders class. + /// + + /// + /// + public VolumesFinalizeExternalReplicationHeaders(string location = default(string)) + + { + this.Location = location; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "Location")] + public string Location {get; set; } + } +} \ No newline at end of file diff --git a/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/VolumesPeerExternalClusterHeaders.cs b/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/VolumesPeerExternalClusterHeaders.cs new file mode 100644 index 000000000000..0bef5a9afd67 --- /dev/null +++ b/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/VolumesPeerExternalClusterHeaders.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.NetApp.Models +{ + using System.Linq; + + public partial class VolumesPeerExternalClusterHeaders + { + /// + /// Initializes a new instance of the VolumesPeerExternalClusterHeaders class. + /// + public VolumesPeerExternalClusterHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the VolumesPeerExternalClusterHeaders class. + /// + + /// + /// + public VolumesPeerExternalClusterHeaders(string location = default(string)) + + { + this.Location = location; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "Location")] + public string Location {get; set; } + } +} \ No newline at end of file diff --git a/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/VolumesPerformReplicationTransferHeaders.cs b/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/VolumesPerformReplicationTransferHeaders.cs new file mode 100644 index 000000000000..27c0017d1bbb --- /dev/null +++ b/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/Models/VolumesPerformReplicationTransferHeaders.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.NetApp.Models +{ + using System.Linq; + + public partial class VolumesPerformReplicationTransferHeaders + { + /// + /// Initializes a new instance of the VolumesPerformReplicationTransferHeaders class. + /// + public VolumesPerformReplicationTransferHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the VolumesPerformReplicationTransferHeaders class. + /// + + /// + /// + public VolumesPerformReplicationTransferHeaders(string location = default(string)) + + { + this.Location = location; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "Location")] + public string Location {get; set; } + } +} \ No newline at end of file diff --git a/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/NetAppManagementClient.cs b/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/NetAppManagementClient.cs index 785f5ca8fd1c..0903a68c08bb 100644 --- a/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/NetAppManagementClient.cs +++ b/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/NetAppManagementClient.cs @@ -386,7 +386,7 @@ private void Initialize() this.BackupsUnderVolume = new BackupsUnderVolumeOperations(this); this.BackupsUnderAccount = new BackupsUnderAccountOperations(this); this.BaseUri = new System.Uri("https://management.azure.com"); - this.ApiVersion = "2024-03-01"; + this.ApiVersion = "2024-07-01"; this.AcceptLanguage = "en-US"; this.LongRunningOperationRetryTimeout = 30; this.GenerateClientRequestId = true; diff --git a/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/NetAppResourceOperations.cs b/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/NetAppResourceOperations.cs index 7ba88ff757c8..c556e10cbb40 100644 --- a/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/NetAppResourceOperations.cs +++ b/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/NetAppResourceOperations.cs @@ -278,6 +278,11 @@ internal NetAppResourceOperations (NetAppManagementClient client) /// The Azure Resource URI for a delegated subnet. Must have the delegation /// Microsoft.NetApp/volumes /// + /// + /// The Azure Resource logical availability zone which is used within zone + /// mapping lookup for the subscription and region. The lookup will retrieve + /// the physical zone where volume is placed. + /// /// /// Headers that will be added to request. /// @@ -299,7 +304,7 @@ internal NetAppResourceOperations (NetAppManagementClient client) /// /// A response object containing the response body and response headers. /// - public async System.Threading.Tasks.Task> CheckFilePathAvailabilityWithHttpMessagesAsync(string location, string name, string subnetId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> CheckFilePathAvailabilityWithHttpMessagesAsync(string location, string name, string subnetId, string availabilityZone = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { @@ -327,10 +332,11 @@ internal NetAppResourceOperations (NetAppManagementClient client) } FilePathAvailabilityRequest body = new FilePathAvailabilityRequest(); - if(name != null||subnetId != null) + if(name != null||subnetId != null||availabilityZone != null) { body.Name = name; body.SubnetId = subnetId; + body.AvailabilityZone = availabilityZone; } // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; diff --git a/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/NetAppResourceOperationsExtensions.cs b/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/NetAppResourceOperationsExtensions.cs index a6bf19134e7c..7689a5f2efd8 100644 --- a/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/NetAppResourceOperationsExtensions.cs +++ b/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/NetAppResourceOperationsExtensions.cs @@ -54,9 +54,9 @@ public static CheckAvailabilityResponse CheckNameAvailability(this INetAppResour /// /// The name of the Azure region. /// - public static CheckAvailabilityResponse CheckFilePathAvailability(this INetAppResourceOperations operations, string location, string name, string subnetId) + public static CheckAvailabilityResponse CheckFilePathAvailability(this INetAppResourceOperations operations, string location, string name, string subnetId, string availabilityZone = default(string)) { - return ((INetAppResourceOperations)operations).CheckFilePathAvailabilityAsync(location, name, subnetId).GetAwaiter().GetResult(); + return ((INetAppResourceOperations)operations).CheckFilePathAvailabilityAsync(location, name, subnetId, availabilityZone).GetAwaiter().GetResult(); } /// @@ -71,9 +71,9 @@ public static CheckAvailabilityResponse CheckFilePathAvailability(this INetAppRe /// /// The cancellation token. /// - public static async System.Threading.Tasks.Task CheckFilePathAvailabilityAsync(this INetAppResourceOperations operations, string location, string name, string subnetId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public static async System.Threading.Tasks.Task CheckFilePathAvailabilityAsync(this INetAppResourceOperations operations, string location, string name, string subnetId, string availabilityZone = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - using (var _result = await operations.CheckFilePathAvailabilityWithHttpMessagesAsync(location, name, subnetId, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.CheckFilePathAvailabilityWithHttpMessagesAsync(location, name, subnetId, availabilityZone, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } diff --git a/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/VolumesOperations.cs b/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/VolumesOperations.cs index 09ea86722b74..318fd60e9e4e 100644 --- a/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/VolumesOperations.cs +++ b/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/VolumesOperations.cs @@ -1527,6 +1527,124 @@ internal VolumesOperations (NetAppManagementClient client) return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } + /// + /// Starts peering the external cluster for this migration volume + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the NetApp account + /// + /// + /// The name of the capacity pool + /// + /// + /// The name of the volume + /// + /// + /// Cluster peer request object supplied in the body of the operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async System.Threading.Tasks.Task> PeerExternalClusterWithHttpMessagesAsync(string resourceGroupName, string accountName, string poolName, string volumeName, PeerClusterForVolumeMigrationRequest body, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginPeerExternalClusterWithHttpMessagesAsync(resourceGroupName, accountName, poolName, volumeName, body, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Starts SVM peering and returns a command to be run on the external ONTAP to + /// accept it. Once the SVM have been peered a SnapMirror will be created + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the NetApp account + /// + /// + /// The name of the capacity pool + /// + /// + /// The name of the volume + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async System.Threading.Tasks.Task> AuthorizeExternalReplicationWithHttpMessagesAsync(string resourceGroupName, string accountName, string poolName, string volumeName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginAuthorizeExternalReplicationWithHttpMessagesAsync(resourceGroupName, accountName, poolName, volumeName, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Finalizes the migration of an external volume by releasing the replication + /// and breaking the external cluster peering if no other migration is active. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the NetApp account + /// + /// + /// The name of the capacity pool + /// + /// + /// The name of the volume + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async System.Threading.Tasks.Task> FinalizeExternalReplicationWithHttpMessagesAsync(string resourceGroupName, string accountName, string poolName, string volumeName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // Send Request + Microsoft.Rest.Azure.AzureOperationHeaderResponse _response = await BeginFinalizeExternalReplicationWithHttpMessagesAsync(resourceGroupName, accountName, poolName, volumeName, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Performs an adhoc replication transfer on a volume with volumeType + /// Migration + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the NetApp account + /// + /// + /// The name of the capacity pool + /// + /// + /// The name of the volume + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async System.Threading.Tasks.Task> PerformReplicationTransferWithHttpMessagesAsync(string resourceGroupName, string accountName, string poolName, string volumeName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // Send Request + Microsoft.Rest.Azure.AzureOperationHeaderResponse _response = await BeginPerformReplicationTransferWithHttpMessagesAsync(resourceGroupName, accountName, poolName, volumeName, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + /// /// Moves volume to another pool /// @@ -5448,6 +5566,1125 @@ internal VolumesOperations (NetAppManagementClient client) + } + /// + /// Starts peering the external cluster for this migration volume + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the NetApp account + /// + /// + /// The name of the capacity pool + /// + /// + /// The name of the volume + /// + /// + /// Cluster peer request object supplied in the body of the operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task> BeginPeerExternalClusterWithHttpMessagesAsync(string resourceGroupName, string accountName, string poolName, string volumeName, PeerClusterForVolumeMigrationRequest body, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (body == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); + } + } + if (accountName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "accountName"); + } + if (accountName != null) + { + if (!System.Text.RegularExpressions.Regex.IsMatch(accountName, "^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,127}$")) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "accountName", "^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,127}$"); + } + } + if (poolName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "poolName"); + } + if (poolName != null) + { + if (poolName.Length > 64) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "poolName", 64); + } + if (poolName.Length < 1) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "poolName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(poolName, "^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,63}$")) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "poolName", "^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,63}$"); + } + } + if (volumeName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "volumeName"); + } + if (volumeName != null) + { + if (volumeName.Length > 64) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "volumeName", 64); + } + if (volumeName.Length < 1) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "volumeName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(volumeName, "^[a-zA-Z][a-zA-Z0-9\\-_]{0,63}$")) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "volumeName", "^[a-zA-Z][a-zA-Z0-9\\-_]{0,63}$"); + } + } + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("accountName", accountName); + tracingParameters.Add("poolName", poolName); + tracingParameters.Add("volumeName", volumeName); + + tracingParameters.Add("body", body); + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginPeerExternalCluster", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/peerExternalCluster").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); + _url = _url.Replace("{poolName}", System.Uri.EscapeDataString(poolName)); + _url = _url.Replace("{volumeName}", System.Uri.EscapeDataString(volumeName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(body, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Starts SVM peering and returns a command to be run on the external ONTAP to + /// accept it. Once the SVM have been peered a SnapMirror will be created + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the NetApp account + /// + /// + /// The name of the capacity pool + /// + /// + /// The name of the volume + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task> BeginAuthorizeExternalReplicationWithHttpMessagesAsync(string resourceGroupName, string accountName, string poolName, string volumeName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); + } + } + if (accountName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "accountName"); + } + if (accountName != null) + { + if (!System.Text.RegularExpressions.Regex.IsMatch(accountName, "^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,127}$")) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "accountName", "^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,127}$"); + } + } + if (poolName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "poolName"); + } + if (poolName != null) + { + if (poolName.Length > 64) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "poolName", 64); + } + if (poolName.Length < 1) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "poolName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(poolName, "^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,63}$")) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "poolName", "^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,63}$"); + } + } + if (volumeName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "volumeName"); + } + if (volumeName != null) + { + if (volumeName.Length > 64) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "volumeName", 64); + } + if (volumeName.Length < 1) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "volumeName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(volumeName, "^[a-zA-Z][a-zA-Z0-9\\-_]{0,63}$")) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "volumeName", "^[a-zA-Z][a-zA-Z0-9\\-_]{0,63}$"); + } + } + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("accountName", accountName); + tracingParameters.Add("poolName", poolName); + tracingParameters.Add("volumeName", volumeName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginAuthorizeExternalReplication", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/authorizeExternalReplication").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); + _url = _url.Replace("{poolName}", System.Uri.EscapeDataString(poolName)); + _url = _url.Replace("{volumeName}", System.Uri.EscapeDataString(volumeName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Finalizes the migration of an external volume by releasing the replication + /// and breaking the external cluster peering if no other migration is active. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the NetApp account + /// + /// + /// The name of the capacity pool + /// + /// + /// The name of the volume + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task> BeginFinalizeExternalReplicationWithHttpMessagesAsync(string resourceGroupName, string accountName, string poolName, string volumeName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); + } + } + if (accountName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "accountName"); + } + if (accountName != null) + { + if (!System.Text.RegularExpressions.Regex.IsMatch(accountName, "^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,127}$")) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "accountName", "^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,127}$"); + } + } + if (poolName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "poolName"); + } + if (poolName != null) + { + if (poolName.Length > 64) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "poolName", 64); + } + if (poolName.Length < 1) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "poolName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(poolName, "^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,63}$")) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "poolName", "^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,63}$"); + } + } + if (volumeName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "volumeName"); + } + if (volumeName != null) + { + if (volumeName.Length > 64) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "volumeName", 64); + } + if (volumeName.Length < 1) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "volumeName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(volumeName, "^[a-zA-Z][a-zA-Z0-9\\-_]{0,63}$")) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "volumeName", "^[a-zA-Z][a-zA-Z0-9\\-_]{0,63}$"); + } + } + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("accountName", accountName); + tracingParameters.Add("poolName", poolName); + tracingParameters.Add("volumeName", volumeName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginFinalizeExternalReplication", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/finalizeExternalReplication").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); + _url = _url.Replace("{poolName}", System.Uri.EscapeDataString(poolName)); + _url = _url.Replace("{volumeName}", System.Uri.EscapeDataString(volumeName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 202) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationHeaderResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Performs an adhoc replication transfer on a volume with volumeType + /// Migration + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the NetApp account + /// + /// + /// The name of the capacity pool + /// + /// + /// The name of the volume + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task> BeginPerformReplicationTransferWithHttpMessagesAsync(string resourceGroupName, string accountName, string poolName, string volumeName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); + } + } + if (accountName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "accountName"); + } + if (accountName != null) + { + if (!System.Text.RegularExpressions.Regex.IsMatch(accountName, "^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,127}$")) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "accountName", "^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,127}$"); + } + } + if (poolName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "poolName"); + } + if (poolName != null) + { + if (poolName.Length > 64) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "poolName", 64); + } + if (poolName.Length < 1) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "poolName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(poolName, "^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,63}$")) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "poolName", "^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,63}$"); + } + } + if (volumeName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "volumeName"); + } + if (volumeName != null) + { + if (volumeName.Length > 64) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "volumeName", 64); + } + if (volumeName.Length < 1) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "volumeName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(volumeName, "^[a-zA-Z][a-zA-Z0-9\\-_]{0,63}$")) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "volumeName", "^[a-zA-Z][a-zA-Z0-9\\-_]{0,63}$"); + } + } + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("accountName", accountName); + tracingParameters.Add("poolName", poolName); + tracingParameters.Add("volumeName", volumeName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginPerformReplicationTransfer", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/performReplicationTransfer").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); + _url = _url.Replace("{poolName}", System.Uri.EscapeDataString(poolName)); + _url = _url.Replace("{volumeName}", System.Uri.EscapeDataString(volumeName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 202) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationHeaderResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + } /// /// Moves volume to another pool diff --git a/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/VolumesOperationsExtensions.cs b/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/VolumesOperationsExtensions.cs index a7b136449b73..0b79d610e6bd 100644 --- a/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/VolumesOperationsExtensions.cs +++ b/src/NetAppFiles/NetAppFiles.Management.Sdk/Generated/VolumesOperationsExtensions.cs @@ -917,6 +917,216 @@ public static void ReInitializeReplication(this IVolumesOperations operations, s (await operations.ReInitializeReplicationWithHttpMessagesAsync(resourceGroupName, accountName, poolName, volumeName, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// + /// Starts peering the external cluster for this migration volume + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the NetApp account + /// + /// + /// The name of the capacity pool + /// + /// + /// The name of the volume + /// + public static ClusterPeerCommandResponse PeerExternalCluster(this IVolumesOperations operations, string resourceGroupName, string accountName, string poolName, string volumeName, PeerClusterForVolumeMigrationRequest body) + { + return ((IVolumesOperations)operations).PeerExternalClusterAsync(resourceGroupName, accountName, poolName, volumeName, body).GetAwaiter().GetResult(); + } + + /// + /// Starts peering the external cluster for this migration volume + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the NetApp account + /// + /// + /// The name of the capacity pool + /// + /// + /// The name of the volume + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task PeerExternalClusterAsync(this IVolumesOperations operations, string resourceGroupName, string accountName, string poolName, string volumeName, PeerClusterForVolumeMigrationRequest body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.PeerExternalClusterWithHttpMessagesAsync(resourceGroupName, accountName, poolName, volumeName, body, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Starts SVM peering and returns a command to be run on the external ONTAP to + /// accept it. Once the SVM have been peered a SnapMirror will be created + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the NetApp account + /// + /// + /// The name of the capacity pool + /// + /// + /// The name of the volume + /// + public static SvmPeerCommandResponse AuthorizeExternalReplication(this IVolumesOperations operations, string resourceGroupName, string accountName, string poolName, string volumeName) + { + return ((IVolumesOperations)operations).AuthorizeExternalReplicationAsync(resourceGroupName, accountName, poolName, volumeName).GetAwaiter().GetResult(); + } + + /// + /// Starts SVM peering and returns a command to be run on the external ONTAP to + /// accept it. Once the SVM have been peered a SnapMirror will be created + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the NetApp account + /// + /// + /// The name of the capacity pool + /// + /// + /// The name of the volume + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task AuthorizeExternalReplicationAsync(this IVolumesOperations operations, string resourceGroupName, string accountName, string poolName, string volumeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.AuthorizeExternalReplicationWithHttpMessagesAsync(resourceGroupName, accountName, poolName, volumeName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Finalizes the migration of an external volume by releasing the replication + /// and breaking the external cluster peering if no other migration is active. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the NetApp account + /// + /// + /// The name of the capacity pool + /// + /// + /// The name of the volume + /// + public static VolumesFinalizeExternalReplicationHeaders FinalizeExternalReplication(this IVolumesOperations operations, string resourceGroupName, string accountName, string poolName, string volumeName) + { + return ((IVolumesOperations)operations).FinalizeExternalReplicationAsync(resourceGroupName, accountName, poolName, volumeName).GetAwaiter().GetResult(); + } + + /// + /// Finalizes the migration of an external volume by releasing the replication + /// and breaking the external cluster peering if no other migration is active. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the NetApp account + /// + /// + /// The name of the capacity pool + /// + /// + /// The name of the volume + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task FinalizeExternalReplicationAsync(this IVolumesOperations operations, string resourceGroupName, string accountName, string poolName, string volumeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.FinalizeExternalReplicationWithHttpMessagesAsync(resourceGroupName, accountName, poolName, volumeName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Headers; + } + } + /// + /// Performs an adhoc replication transfer on a volume with volumeType + /// Migration + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the NetApp account + /// + /// + /// The name of the capacity pool + /// + /// + /// The name of the volume + /// + public static VolumesPerformReplicationTransferHeaders PerformReplicationTransfer(this IVolumesOperations operations, string resourceGroupName, string accountName, string poolName, string volumeName) + { + return ((IVolumesOperations)operations).PerformReplicationTransferAsync(resourceGroupName, accountName, poolName, volumeName).GetAwaiter().GetResult(); + } + + /// + /// Performs an adhoc replication transfer on a volume with volumeType + /// Migration + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the NetApp account + /// + /// + /// The name of the capacity pool + /// + /// + /// The name of the volume + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task PerformReplicationTransferAsync(this IVolumesOperations operations, string resourceGroupName, string accountName, string poolName, string volumeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.PerformReplicationTransferWithHttpMessagesAsync(resourceGroupName, accountName, poolName, volumeName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Headers; + } + } + /// /// Moves volume to another pool /// /// @@ -1817,6 +2027,216 @@ public static void BeginReInitializeReplication(this IVolumesOperations operatio (await operations.BeginReInitializeReplicationWithHttpMessagesAsync(resourceGroupName, accountName, poolName, volumeName, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// + /// Starts peering the external cluster for this migration volume + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the NetApp account + /// + /// + /// The name of the capacity pool + /// + /// + /// The name of the volume + /// + public static ClusterPeerCommandResponse BeginPeerExternalCluster(this IVolumesOperations operations, string resourceGroupName, string accountName, string poolName, string volumeName, PeerClusterForVolumeMigrationRequest body) + { + return ((IVolumesOperations)operations).BeginPeerExternalClusterAsync(resourceGroupName, accountName, poolName, volumeName, body).GetAwaiter().GetResult(); + } + + /// + /// Starts peering the external cluster for this migration volume + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the NetApp account + /// + /// + /// The name of the capacity pool + /// + /// + /// The name of the volume + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginPeerExternalClusterAsync(this IVolumesOperations operations, string resourceGroupName, string accountName, string poolName, string volumeName, PeerClusterForVolumeMigrationRequest body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginPeerExternalClusterWithHttpMessagesAsync(resourceGroupName, accountName, poolName, volumeName, body, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Starts SVM peering and returns a command to be run on the external ONTAP to + /// accept it. Once the SVM have been peered a SnapMirror will be created + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the NetApp account + /// + /// + /// The name of the capacity pool + /// + /// + /// The name of the volume + /// + public static SvmPeerCommandResponse BeginAuthorizeExternalReplication(this IVolumesOperations operations, string resourceGroupName, string accountName, string poolName, string volumeName) + { + return ((IVolumesOperations)operations).BeginAuthorizeExternalReplicationAsync(resourceGroupName, accountName, poolName, volumeName).GetAwaiter().GetResult(); + } + + /// + /// Starts SVM peering and returns a command to be run on the external ONTAP to + /// accept it. Once the SVM have been peered a SnapMirror will be created + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the NetApp account + /// + /// + /// The name of the capacity pool + /// + /// + /// The name of the volume + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginAuthorizeExternalReplicationAsync(this IVolumesOperations operations, string resourceGroupName, string accountName, string poolName, string volumeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginAuthorizeExternalReplicationWithHttpMessagesAsync(resourceGroupName, accountName, poolName, volumeName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Finalizes the migration of an external volume by releasing the replication + /// and breaking the external cluster peering if no other migration is active. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the NetApp account + /// + /// + /// The name of the capacity pool + /// + /// + /// The name of the volume + /// + public static VolumesFinalizeExternalReplicationHeaders BeginFinalizeExternalReplication(this IVolumesOperations operations, string resourceGroupName, string accountName, string poolName, string volumeName) + { + return ((IVolumesOperations)operations).BeginFinalizeExternalReplicationAsync(resourceGroupName, accountName, poolName, volumeName).GetAwaiter().GetResult(); + } + + /// + /// Finalizes the migration of an external volume by releasing the replication + /// and breaking the external cluster peering if no other migration is active. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the NetApp account + /// + /// + /// The name of the capacity pool + /// + /// + /// The name of the volume + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginFinalizeExternalReplicationAsync(this IVolumesOperations operations, string resourceGroupName, string accountName, string poolName, string volumeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginFinalizeExternalReplicationWithHttpMessagesAsync(resourceGroupName, accountName, poolName, volumeName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Headers; + } + } + /// + /// Performs an adhoc replication transfer on a volume with volumeType + /// Migration + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the NetApp account + /// + /// + /// The name of the capacity pool + /// + /// + /// The name of the volume + /// + public static VolumesPerformReplicationTransferHeaders BeginPerformReplicationTransfer(this IVolumesOperations operations, string resourceGroupName, string accountName, string poolName, string volumeName) + { + return ((IVolumesOperations)operations).BeginPerformReplicationTransferAsync(resourceGroupName, accountName, poolName, volumeName).GetAwaiter().GetResult(); + } + + /// + /// Performs an adhoc replication transfer on a volume with volumeType + /// Migration + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the NetApp account + /// + /// + /// The name of the capacity pool + /// + /// + /// The name of the volume + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginPerformReplicationTransferAsync(this IVolumesOperations operations, string resourceGroupName, string accountName, string poolName, string volumeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginPerformReplicationTransferWithHttpMessagesAsync(resourceGroupName, accountName, poolName, volumeName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Headers; + } + } + /// /// Moves volume to another pool /// /// diff --git a/src/NetAppFiles/NetAppFiles.Management.Sdk/README.md b/src/NetAppFiles/NetAppFiles.Management.Sdk/README.md index 56ae8b9300e1..1659b1f6ac48 100644 --- a/src/NetAppFiles/NetAppFiles.Management.Sdk/README.md +++ b/src/NetAppFiles/NetAppFiles.Management.Sdk/README.md @@ -25,9 +25,9 @@ description: Microsoft NetApp Files Azure Resource Provider specification ### ``` yaml -commit: aa23ddc02b2b1c5a34c56a49d83b77c0a1aaa614 +commit: f37b54b187bac95237c62478a10b94e9cff236f3 input-file: - - https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/netapp.json + - https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/netapp.json output-folder: Generated namespace: Microsoft.Azure.Management.NetApp From 2dbc169718330f9043bc451c099e7c984c3e221c Mon Sep 17 00:00:00 2001 From: Audunn Baldvinsson Date: Tue, 15 Oct 2024 17:48:12 +0000 Subject: [PATCH 2/2] update to 2024-07-01 --- src/NetAppFiles/NetAppFiles/Helpers/ModelExtensions.cs | 1 + .../NetAppFiles/Helpers/VolumeGroupExtensions.cs | 1 + .../NetAppFiles/Models/PSNetAppFilesVolume.cs | 9 +++++++++ 3 files changed, 11 insertions(+) diff --git a/src/NetAppFiles/NetAppFiles/Helpers/ModelExtensions.cs b/src/NetAppFiles/NetAppFiles/Helpers/ModelExtensions.cs index acf91c36c74c..878c4a83f115 100644 --- a/src/NetAppFiles/NetAppFiles/Helpers/ModelExtensions.cs +++ b/src/NetAppFiles/NetAppFiles/Helpers/ModelExtensions.cs @@ -468,6 +468,7 @@ public static PSNetAppFilesVolume ToPsNetAppFilesVolume(this Management.NetApp.M DefaultUserQuotaInKiBs = volume.DefaultUserQuotaInKiBs, DefaultGroupQuotaInKiBs = volume.DefaultGroupQuotaInKiBs, NetworkFeatures = volume.NetworkFeatures, + EffectiveNetworkFeatures = volume.EffectiveNetworkFeatures, NetworkSiblingSetId = volume.NetworkSiblingSetId, StorageToNetworkProximity = volume.StorageToNetworkProximity, VolumeGroupName = volume.VolumeGroupName, diff --git a/src/NetAppFiles/NetAppFiles/Helpers/VolumeGroupExtensions.cs b/src/NetAppFiles/NetAppFiles/Helpers/VolumeGroupExtensions.cs index 5654d831096e..7a0c30eeb090 100644 --- a/src/NetAppFiles/NetAppFiles/Helpers/VolumeGroupExtensions.cs +++ b/src/NetAppFiles/NetAppFiles/Helpers/VolumeGroupExtensions.cs @@ -95,6 +95,7 @@ public static PSNetAppFilesVolume ConvertToPs(this Management.NetApp.Models.Volu BaremetalTenantId = volumeGroupVolumeProperties.BaremetalTenantId, SubnetId = volumeGroupVolumeProperties.SubnetId, NetworkFeatures = volumeGroupVolumeProperties.NetworkFeatures, + EffectiveNetworkFeatures = volumeGroupVolumeProperties.EffectiveNetworkFeatures, NetworkSiblingSetId = volumeGroupVolumeProperties.NetworkSiblingSetId, StorageToNetworkProximity = volumeGroupVolumeProperties.StorageToNetworkProximity, MountTargets = volumeGroupVolumeProperties.MountTargets, diff --git a/src/NetAppFiles/NetAppFiles/Models/PSNetAppFilesVolume.cs b/src/NetAppFiles/NetAppFiles/Models/PSNetAppFilesVolume.cs index e8074ce5ebe5..2ba722ad92c2 100644 --- a/src/NetAppFiles/NetAppFiles/Models/PSNetAppFilesVolume.cs +++ b/src/NetAppFiles/NetAppFiles/Models/PSNetAppFilesVolume.cs @@ -328,6 +328,15 @@ public class PSNetAppFilesVolume /// public string NetworkFeatures { get; set; } + /// + /// Gets or sets effectiveNetworkFeatures + /// + /// + /// The effective value of the network features type available to the volume, + /// or current effective state of update. Possible values include: 'Basic', 'Standard', 'Basic_Standard', + /// + public string EffectiveNetworkFeatures { get; set; } + /// /// Gets or sets NetworkSiblingSetId ///